/* ================================
   篝火模式（fireside） —— 首页沉浸式
   不与图书馆样式（style.css）共存
   ================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #12100e;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.5) 100%);
}

.ui-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.title-group {
    text-align: center;
    margin-bottom: 20vh;
    transition: opacity 1s ease, transform 1s ease;
}

.title-group.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.title {
    font-size: clamp(28px, 6vw, 52px);
    font-weight: 200;
    color: #e8e0d5;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    opacity: 0.95;
}

.subtitle {
    font-size: clamp(14px, 2.5vw, 20px);
    font-weight: 300;
    color: #8a7f72;
    letter-spacing: 0.3em;
}

.input-area {
    position: absolute;
    bottom: 8vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(80vw, 480px);
    pointer-events: auto;
}

.input-area input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(138, 127, 114, 0.25);
    padding: 14px 4px;
    font-size: 16px;
    color: #e8e0d5;
    text-align: center;
    letter-spacing: 0.05em;
    outline: none;
    transition: border-color 0.4s ease;
    font-family: inherit;
}

.input-area input::placeholder {
    color: rgba(138, 127, 114, 0.5);
    font-weight: 300;
}

.input-area input:focus {
    border-bottom-color: #ff9f43;
}

.input-area input:focus::placeholder {
    color: transparent;
}

.glow-hint {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: rgba(138, 127, 114, 0.35);
    letter-spacing: 0.2em;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    white-space: nowrap;
}

.input-area input:focus ~ .glow-hint {
    opacity: 1;
}

/* ================================
   右上角图书馆入口
   平时几乎隐形，悬停 / 触摸时浮现
   ================================ */
.library-entry {
    position: fixed;
    top: clamp(16px, 3vh, 28px);
    right: clamp(16px, 3vw, 28px);
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(138, 127, 114, 0.18);
    border-radius: 999px;
    background: rgba(18, 16, 14, 0.4);
    color: rgba(232, 224, 213, 0.55);
    font-size: 13px;
    letter-spacing: 0.12em;
    text-decoration: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: color 0.4s ease, border-color 0.4s ease, background 0.4s ease, opacity 0.6s ease;
    opacity: 0.5;
}

.library-entry:hover,
.library-entry:focus-visible {
    color: #ff9f43;
    border-color: rgba(255, 159, 67, 0.5);
    background: rgba(18, 16, 14, 0.7);
    opacity: 1;
}

.library-entry__icon {
    font-size: 14px;
    line-height: 1;
}

@media (max-width: 480px) {
    .library-entry__label {
        display: none;
    }
    .library-entry {
        padding: 8px 10px;
    }
}

/* ================================
   占位回应（对话功能未接入时）
   ================================ */
.placeholder-reply {
    position: fixed;
    left: 50%;
    bottom: calc(8vh + 80px);
    transform: translate(-50%, 12px);
    z-index: 4;
    max-width: min(78vw, 460px);
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.placeholder-reply.visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.placeholder-reply__text {
    color: rgba(232, 224, 213, 0.75);
    font-size: clamp(14px, 2.4vw, 17px);
    line-height: 1.7;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}

.placeholder-reply__link {
    display: inline-block;
    color: #ff9f43;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 159, 67, 0.35);
    padding-bottom: 2px;
    transition: border-color 0.3s ease;
}

.placeholder-reply__link:hover {
    border-color: #ff9f43;
}
