/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B4513;
    --primary-light: #A0522D;
    --primary-dark: #5D2E0C;
    --gold: #FFD700;
    --gold-dark: #DAA520;
    --bg-dark: #1a1a1a;
    --bg-darker: #0d0d0d;
    --text-light: #e0e0e0;
    --text-muted: #888888;
    --accent-blue: #87CEEB;
    --danger: #dc3545;
    --success: #28a745;
    --keyword-highlight: #B8A068;
}

/* 关键词高亮样式 */
.keyword-bold {
    color: var(--keyword-highlight);
    font-weight: bold;
}

.keyword-normal {
    color: var(--keyword-highlight);
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    background: var(--bg-darker);
    color: var(--text-light);
    overflow: hidden;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* 主菜单 */
#main-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.menu-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

.menu-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%23ffffff10"/></svg>');
    background-size: 50px 50px;
    opacity: 0.5;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.menu-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 50px rgba(139, 69, 19, 0.3);
}

.game-title {
    font-size: 64px;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 10px;
    letter-spacing: 10px;
}

.game-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 50px;
    letter-spacing: 5px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-btn {
    padding: 18px 60px;
    font-size: 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 2px solid var(--gold-dark);
    border-radius: 10px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 3px;
}

.menu-btn:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.4);
}

.menu-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.menu-btn.locked {
    opacity: 0.6;
}

.menu-btn .lock-icon {
    margin-right: 8px;
    font-size: 14px;
}

/* 游戏容器 */
#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 场景展示区 */
#scene-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #000;
    min-height: 0;
    transition: opacity 0.3s ease;
}

#scene-background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

#hotspot-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 人物立绘层（Galgame风格） */
#character-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 30%;
}

.character-sprite {
    position: relative;
    height: 90%;
    max-width: 40%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: all 0.5s ease;
}

.character-sprite img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

.character-sprite.speaking img {
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5)) brightness(1.1);
}

.character-sprite.dimmed img {
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5)) brightness(0.6);
}

#character-left {
    justify-content: flex-start;
}

#character-center {
    justify-content: center;
}

#character-right {
    justify-content: flex-end;
}

/* 序章播放界面 */
#prologue-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

#prologue-scene {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#prologue-background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.8s ease;
}

#prologue-character-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 15%;
    pointer-events: none;
}

.prologue-character {
    position: relative;
    height: 85%;
    max-width: 50%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

.prologue-character.visible {
    opacity: 1;
    transform: translateY(0);
}

.prologue-character img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.6));
    transition: all 0.3s ease;
}

.prologue-character.speaking img {
    filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.6)) brightness(1.15);
    transform: scale(1.02);
}

.prologue-character.dimmed img {
    filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.6)) brightness(0.5) grayscale(0.3);
}

#prologue-char-left {
    justify-content: flex-start;
}

#prologue-char-center {
    justify-content: center;
}

#prologue-char-right {
    justify-content: flex-end;
}

/* 序章对话面板 */
#prologue-dialogue-panel {
    min-height: 200px;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.9), rgba(0, 0, 0, 0.95));
    border-top: 3px solid var(--gold-dark);
    padding: 25px 40px;
    position: relative;
    cursor: pointer;
}

#prologue-speaker-name {
    font-size: 20px;
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 4px solid var(--gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

#prologue-speaker-name .speaker-note {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: normal;
    margin-left: 15px;
}

#prologue-dialogue-text {
    font-size: 18px;
    line-height: 2;
    color: var(--text-light);
    min-height: 80px;
    padding: 0 15px;
}

#prologue-dialogue-text .typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--gold);
    animation: blink 0.7s infinite;
    margin-left: 3px;
    vertical-align: text-bottom;
}

#prologue-click-hint {
    position: absolute;
    bottom: 15px;
    right: 30px;
    color: var(--text-muted);
    font-size: 14px;
    animation: fadeInOut 1.5s infinite;
}

/* 剧情对话框容器 */
.prologue-dialogue-box {
    position: relative;
}

/* 选项遮罩层 */
.story-options-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.story-options-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* 剧情选项容器 */
.story-options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 30px 40px;
    background: linear-gradient(135deg, rgba(30, 20, 10, 0.95), rgba(50, 35, 20, 0.95));
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    min-width: 400px;
}

.story-options-container:empty {
    display: none;
}

/* 剧情选项按钮 */
.story-option {
    padding: 18px 30px;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.4), rgba(139, 69, 19, 0.2));
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 17px;
    text-align: center;
    animation: optionFadeIn 0.3s ease forwards;
    opacity: 0;
}

.story-option:nth-child(1) { animation-delay: 0s; }
.story-option:nth-child(2) { animation-delay: 0.1s; }
.story-option:nth-child(3) { animation-delay: 0.2s; }
.story-option:nth-child(4) { animation-delay: 0.3s; }

@keyframes optionFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.story-option:hover {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.7), rgba(139, 69, 19, 0.4));
    border-color: var(--gold);
    transform: scale(1.03);
    box-shadow: 0 5px 25px rgba(139, 69, 19, 0.4);
}

.story-option:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(139, 69, 19, 0.2);
}

.story-option::before {
    content: '▸';
    margin-right: 10px;
    color: var(--gold);
    opacity: 0;
    transition: opacity 0.3s;
}

.story-option:hover::before {
    opacity: 1;
}

/* 音量控制按钮 */
.mute-btn {
    position: absolute;
    top: 20px;
    right: 140px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mute-btn:hover {
    background: rgba(139, 69, 19, 0.6);
    border-color: var(--gold);
}

.mute-btn .mute-icon {
    font-size: 18px;
    line-height: 1;
}

.mute-btn.muted {
    border-color: var(--danger);
}

.mute-btn.muted:hover {
    background: rgba(220, 53, 69, 0.4);
    border-color: var(--danger);
}

#skip-prologue-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 25px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    font-size: 14px;
}

#skip-prologue-btn:hover {
    background: rgba(139, 69, 19, 0.6);
    border-color: var(--gold);
}

/* 场景过渡动画 */
.scene-fade-out {
    animation: sceneFadeOut 0.5s ease forwards;
}

.scene-fade-in {
    animation: sceneFadeIn 0.5s ease forwards;
}

@keyframes sceneFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes sceneFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 人物入场动画 */
.character-enter-left {
    animation: charEnterLeft 0.6s ease forwards;
}

.character-enter-right {
    animation: charEnterRight 0.6s ease forwards;
}

.character-enter-center {
    animation: charEnterCenter 0.6s ease forwards;
}

@keyframes charEnterLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes charEnterRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes charEnterCenter {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 热点样式 */
.hotspot {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hotspot:hover {
    transform: scale(1.1);
}

.hotspot-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8) 0%, rgba(255, 215, 0, 0) 70%);
    animation: pulse 2s infinite;
    position: relative;
}

.hotspot-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold);
}

.hotspot-npc .hotspot-indicator {
    background: radial-gradient(circle, rgba(135, 206, 235, 0.8) 0%, rgba(135, 206, 235, 0) 70%);
}

.hotspot-npc .hotspot-indicator::after {
    background: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue);
}

.hotspot-transition .hotspot-indicator {
    background: radial-gradient(circle, rgba(144, 238, 144, 0.8) 0%, rgba(144, 238, 144, 0) 70%);
}

.hotspot-transition .hotspot-indicator::after {
    background: #90EE90;
    box-shadow: 0 0 10px #90EE90;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.8; 
    }
    50% { 
        transform: scale(1.3); 
        opacity: 1; 
    }
}

/* 热点标签 */
.hotspot-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

/* 靠近底部的热点，标签显示在上方 */
.hotspot-label.label-top {
    bottom: auto;
    top: -25px;
}

.hotspot:hover .hotspot-label {
    opacity: 1;
}

/* 谜团状态热点标签 - 常驻显示 */
.hotspot-label.quiz-status-label {
    opacity: 1;
    font-size: 14px;
    font-weight: bold;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 6px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

/* 谜团状态热点特殊样式 */
.hotspot-quiz_status {
    width: 60px;
    height: 40px;
}

.hotspot-quiz_status:hover .quiz-status-label {
    background: rgba(0, 0, 0, 1);
}

/* 场景导航 - 已隐藏，使用热点切换场景 */
#scene-nav {
    display: none;
}

.scene-nav-btn {
    display: none;
}

/* 信息栏 */
#info-bar {
    height: 56px;
    background: linear-gradient(to bottom, rgba(20, 20, 20, 0.95), rgba(0, 0, 0, 0.95));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
    z-index: 100;
}

#act-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

#game-time {
    color: var(--accent-blue);
    font-size: 16px;
}

/* 第二幕跳过按钮 */
#skip-act-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

#skip-act-btn:hover {
    background: rgba(139, 69, 19, 0.6);
    border-color: var(--gold);
}

/* 全局音量控制按钮 */
.global-mute-btn {
    position: absolute;
    top: 15px;
    right: 100px;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-mute-btn:hover {
    background: rgba(139, 69, 19, 0.6);
    border-color: var(--gold);
}

.global-mute-btn .mute-icon {
    font-size: 16px;
    line-height: 1;
}

.global-mute-btn.muted {
    border-color: var(--danger);
}

.global-mute-btn.muted:hover {
    background: rgba(220, 53, 69, 0.4);
    border-color: var(--danger);
}

/* 主菜单音量控制按钮 */
.menu-mute-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-mute-btn:hover {
    background: rgba(139, 69, 19, 0.6);
    border-color: var(--gold);
}

.menu-mute-btn .mute-icon {
    font-size: 20px;
    line-height: 1;
}

.menu-mute-btn.muted {
    border-color: var(--danger);
}

.menu-mute-btn.muted:hover {
    background: rgba(220, 53, 69, 0.4);
    border-color: var(--danger);
}

/* 主菜单耳机提示 */
.headphone-hint {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.headphone-hint:hover {
    opacity: 1;
}

.headphone-icon {
    width: 24px;
    height: 24px;
    color: var(--gold-dark);
    flex-shrink: 0;
    margin-top: 2px;
}

.hint-text-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hint-text-group .disclaimer {
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.7;
}

.info-bar-buttons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    min-width: 60px;
    height: 42px;
    padding: 4px 10px;
    background: rgba(139, 69, 19, 0.3);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.icon-btn .btn-icon {
    font-size: 18px;
    line-height: 1;
}

.icon-btn .btn-label {
    font-size: 10px;
    line-height: 1;
    color: var(--text-muted);
}

.icon-btn:hover {
    background: rgba(139, 69, 19, 0.6);
    transform: scale(1.05);
    border-color: var(--gold);
}

.icon-btn:hover .btn-label {
    color: var(--gold);
}

/* 对话面板 */
#dialogue-panel {
    min-height: 180px;
    max-height: 250px;
    background: linear-gradient(to bottom, rgba(20, 20, 20, 0.95), rgba(0, 0, 0, 0.98));
    border-top: 2px solid var(--primary-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}

#dialogue-content {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

#npc-portrait {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--gold-dark);
    background: var(--bg-dark);
    flex-shrink: 0;
    overflow: hidden;
    display: none;
}

#npc-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#dialogue-box {
    flex: 1;
}

#npc-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#npc-name::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--gold-dark), transparent);
}

#dialogue-text {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-light);
    min-height: 50px;
}

#dialogue-text .typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--gold);
    animation: blink 0.7s infinite;
    margin-left: 2px;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 对话选项 */
#dialogue-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
}

.dialogue-option {
    padding: 12px 20px;
    background: rgba(139, 69, 19, 0.2);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-light);
    text-align: left;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.dialogue-option::before {
    content: '▸';
    margin-right: 10px;
    color: var(--gold);
}

.dialogue-option:hover {
    background: rgba(139, 69, 19, 0.5);
    transform: translateX(5px);
    border-color: var(--gold);
}

.dialogue-option:active {
    transform: translateX(3px);
}

/* 继续按钮 */
#continue-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 10px 25px;
    background: rgba(139, 69, 19, 0.3);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    animation: fadeInOut 1.5s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

#continue-btn:hover {
    background: rgba(139, 69, 19, 0.6);
}

/* 自由对话输入 */
#free-dialogue {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#user-input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(30, 30, 30, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 15px;
}

#user-input:focus {
    outline: none;
    border-color: var(--gold);
}

#send-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 2px solid var(--gold-dark);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
}

#send-btn:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

/* LLM角色对话面板（常驻显示） */
#llm-chat-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(139, 69, 19, 0.3);
}

#llm-chat-panel.hidden {
    display: none;
}

#llm-character-select {
    width: 120px;
    padding: 8px 10px;
    background: rgba(30, 30, 30, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
}

#llm-character-select:focus {
    outline: none;
    border-color: var(--gold);
}

#llm-character-select option {
    background: #1a1a1a;
    color: var(--text-light);
}

#llm-chat-input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(30, 30, 30, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 13px;
}

#llm-chat-input:focus {
    outline: none;
    border-color: var(--gold);
}

#llm-chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#llm-chat-send {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 2px solid var(--gold-dark);
    border-radius: 6px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    flex-shrink: 0;
}

#llm-chat-send:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-color: var(--gold);
}

#llm-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#llm-chat-loading {
    position: absolute;
    right: 100px;
    display: flex;
    align-items: center;
}

#llm-chat-loading.hidden {
    display: none;
}

.loading-dots {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold-dark);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 通知提示 */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(20, 20, 20, 0.95);
    border: 2px solid var(--gold);
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 3000;
    animation: slideIn 0.5s ease;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

/* 关键词通知 - 位于线索通知下方，更小更简洁 */
.notification.keyword-notification {
    top: 160px;
    padding: 8px 16px;
    background: rgba(20, 20, 22, 0.9);
    border: 1px solid #505055;
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

.notification.keyword-notification .keyword-tag {
    font-size: 13px;
    color: #B8A068;
    font-family: 'Noto Serif SC', serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 通知隐藏时的退出动画 */
.notification.hiding {
    animation: slideOut 0.4s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-icon {
    font-size: 30px;
}

.notification-content strong {
    color: var(--gold);
    display: block;
    margin-bottom: 5px;
}

.notification-content p {
    color: var(--text-light);
    font-size: 14px;
}

/* 幕间过渡 */
#act-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.transition-content {
    text-align: center;
    animation: zoomIn 1s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#transition-title {
    font-size: 48px;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    margin-bottom: 20px;
}

#transition-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    letter-spacing: 5px;
}

/* 加载动画 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 结局界面 */
#ending-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.ending-content {
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

#ending-title {
    font-size: 48px;
    color: var(--gold);
    margin-bottom: 30px;
}

#ending-text {
    font-size: 18px;
    line-height: 2;
    color: var(--text-light);
    margin-bottom: 30px;
}

#ending-stats {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: left;
}

#ending-stats h3 {
    color: var(--gold);
    margin-bottom: 15px;
}

#ending-stats p {
    margin: 8px 0;
    color: var(--text-light);
}

/* 投凶结果样式 */
.vote-correct {
    color: #27ae60;
    font-weight: bold;
}

.vote-wrong {
    color: #e74c3c;
    font-weight: bold;
}


.restoration-rate {
    color: var(--gold);
    font-weight: bold;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-title {
        font-size: 36px;
        letter-spacing: 5px;
    }
    
    .menu-content {
        padding: 40px 30px;
        margin: 20px;
    }
    
    #info-bar {
        padding: 0 10px;
    }
    
    #act-name {
        font-size: 14px;
    }
    
    #dialogue-panel {
        padding: 15px;
    }
    
    #dialogue-text {
        font-size: 15px;
    }
    
    .dialogue-option {
        padding: 10px 15px;
        font-size: 14px;
    }
}
