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

:root {
    --gold: #D4AF37;
    --dark-gold: #B8941E;
    --light-gold: #F4E4C1;
    --black: #0A0A0A;
    --dark-gray: #1A1A1A;
    --medium-gray: #2A2A2A;
    --white: #FFFFFF;
}

body {
    font-family: 'Noto Serif SC', serif;
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
    color: var(--white);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* 游戏容器 */
.game-container {
    max-width: 900px;
    width: 90%;
    margin: 50px auto 50px auto;
    position: relative;
}

/* 章节标题 */
.chapter-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease;
}

.chapter-number {
    font-size: 1rem;
    color: var(--gold);
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.chapter-title {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 10px;
    font-weight: 700;
}

.chapter-time {
    font-size: 1.1rem;
    color: var(--light-gold);
    font-style: italic;
}

/* 场景卡片 */
.scene-card {
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--medium-gray) 100%);
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.3);
    animation: fadeInUp 1s ease;
}

/* 场景图片 */
.scene-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 3px solid var(--gold);
}

/* 对话框 */
.dialogue {
    margin-bottom: 25px;
    line-height: 2;
    font-size: 1.1rem;
}

.dialogue p {
    margin-bottom: 15px;
    animation: typewriter 0.05s steps(1) forwards;
}

.narrator {
    color: var(--light-gold);
    font-style: italic;
    padding: 15px;
    background: rgba(212, 175, 55, 0.1);
    border-left: 4px solid var(--gold);
    border-radius: 5px;
    margin-bottom: 20px;
}

.character-name {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.2rem;
}

.character-speech {
    color: var(--white);
    margin-left: 20px;
}

/* 选择按钮区域 */
.choices {
    margin-top: 40px;
}

.choices-title {
    text-align: center;
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 25px;
    font-weight: 600;
}

.choice-btn {
    width: 100%;
    padding: 20px 30px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--medium-gray) 0%, var(--dark-gray) 100%);
    border: 2px solid var(--gold);
    border-radius: 15px;
    color: var(--white);
    font-size: 1.1rem;
    font-family: 'Noto Serif SC', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.choice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    transition: left 0.5s ease;
}

.choice-btn:hover::before {
    left: 100%;
}

.choice-btn:hover {
    background: linear-gradient(135deg, var(--gold) 0%, var(--dark-gold) 100%);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
}

.choice-label {
    color: var(--gold);
    font-weight: 700;
    margin-right: 10px;
}

/* 属性显示 */
.stats-panel {
    display: none !important;
}

.stats-title {
    color: var(--gold);
    font-size: 1rem;
    font-weight: 600;
    margin-right: 10px;
}

.stat-item {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.9rem;
}

.stat-name {
    color: var(--light-gold);
}

.stat-value {
    color: var(--gold);
    font-weight: 700;
}

/* 进度条 */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--dark-gray);
    z-index: 9999;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold) 0%, var(--dark-gold) 100%);
    transition: width 0.5s ease;
}

/* 结果提示 */
.result-hint {
    margin-top: 30px;
    padding: 20px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--gold);
    border-radius: 10px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.result-hint.positive {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.result-hint.negative {
    border-color: #F44336;
    background: rgba(244, 67, 54, 0.1);
}

.result-text {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.result-effect {
    color: var(--gold);
    font-weight: 700;
}

/* 继续按钮 */
.continue-btn {
    display: block;
    width: 100%;
    padding: 20px;
    margin-top: 30px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--dark-gold) 100%);
    border: none;
    border-radius: 15px;
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Noto Serif SC', serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.continue-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.6);
}

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        width: 95%;
        margin: 20px auto;
    }
    
    .chapter-title {
        font-size: 2rem;
    }
    
    .scene-card {
        padding: 25px;
    }
    
    .scene-image {
        height: 200px;
    }
    
    .dialogue {
        font-size: 1rem;
    }
    
    .choice-btn {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .stats-panel {
        position: fixed;
        top: 5px;
        left: 50%;
        transform: translateX(-50%);
        flex-wrap: wrap;
        padding: 10px 15px;
        gap: 15px;
        font-size: 0.8rem;
    }
    
    .choice-btn:hover {
        transform: translateX(0);
    }
}

/* 结局页面特殊样式 */
.ending-container {
    text-align: center;
}

.ending-icon {
    font-size: 5rem;
    margin-bottom: 30px;
    animation: celebrate 1s ease infinite;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-10deg); }
    75% { transform: scale(1.1) rotate(10deg); }
}

.ending-title {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.ending-subtitle {
    font-size: 1.3rem;
    color: var(--light-gold);
    margin-bottom: 40px;
}

.achievements {
    text-align: left;
    margin: 40px 0;
}

.achievement-item {
    padding: 15px;
    margin-bottom: 15px;
    background: var(--medium-gray);
    border-left: 4px solid var(--gold);
    border-radius: 10px;
}

.achievement-item strong {
    color: var(--gold);
}

.ending-message {
    font-size: 1.2rem;
    line-height: 2;
    color: var(--light-gold);
    margin: 40px 0;
    padding: 30px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 15px;
}

.restart-btn {
    display: inline-block;
    padding: 20px 50px;
    margin: 20px 10px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--dark-gold) 100%);
    border: none;
    border-radius: 15px;
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Noto Serif SC', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.restart-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.6);
}


/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    color: var(--gold);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(218, 165, 32, 0.2);
    border-top: 4px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 1.2rem;
    color: var(--gold);
    margin-top: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
