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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.page {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.page.active {
    display: block;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.title {
    font-size: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(17, 153, 142, 0.4);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.page-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.scene-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.scene-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.scene-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.scene-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #e8eef8 0%, #d0d8e8 100%);
}

.scene-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.scene-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.scene-info {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.scene-info h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.scene-info p {
    color: #666;
    line-height: 1.6;
}

.tips {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 10px;
    padding: 15px 20px;
    color: #856404;
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.8;
}

.tips br + span {
    display: block;
    margin-top: 8px;
    font-weight: 500;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.timer {
    font-size: 1.5rem;
    font-weight: 600;
}

.progress {
    font-size: 1.2rem;
    font-weight: 500;
}

.scene-title-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 1.1rem;
    font-weight: 500;
}

.text-display {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 2.5;
    color: #333;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

.text-display .blank {
    display: inline-block;
    padding: 1px 2px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 6px;
    min-width: 30px;
    text-align: center;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 2px;
}

.text-display .blank.selected {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.text-display .blank.correct {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.text-display .blank.wrong {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
}

.text-display .blank.correct-answer {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.option-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.option-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.option-item.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #e8eef8 0%, #d0d8e8 100%);
}

.option-item.selected.correct {
    border-color: #11998e;
    background: linear-gradient(135deg, #e8f5f1 0%, #d0e8e0 100%);
}

.option-item.selected.wrong {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #ffeaea 0%, #ffd6d6 100%);
}

.option-item.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: 600;
    color: #666;
}

.option-item.selected .option-letter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.option-item.selected.correct .option-letter {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.option-item.selected.wrong .option-letter {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
}

.option-text {
    font-size: 1rem;
    color: #333;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.nav-buttons .btn {
    min-width: 120px;
}

.answer-status {
    text-align: center;
}

.status-label {
    color: #666;
    margin-right: 10px;
}

/* 名场面卡片样式 */
.scene-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.scene-card-title {
    margin: 0;
}

.scene-card-id {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.scene-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.scene-card-count {
    color: #667eea;
    font-size: 0.85rem;
}

.scene-card-number {
    background: #ff6b6b;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* 确认对话框样式 */
.confirm-unanswered {
    color: #ff6b6b;
    font-weight: bold;
}

.status-dots {
    display: inline-flex;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s ease;
}

.status-dot.answered {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.result-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
}

.result-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    font-size: 1.1rem;
    font-weight: 500;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-value.correct-count {
    color: #11998e;
}

.stat-value.wrong-count {
    color: #ff6b6b;
}

.stat-value.total-time {
    color: #667eea;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.score-display {
    margin-top: 20px;
}

.score-circle {
    display: inline-flex;
    align-items: baseline;
    background: white;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

#final-score {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-unit {
    font-size: 1.5rem;
    color: #666;
    margin-left: 5px;
}

.answer-details {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.answer-details h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.answer-list {
    max-height: 400px;
    overflow-y: auto;
}

.answer-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: white;
    border-left: 4px solid;
}

.answer-item.correct {
    border-left-color: #11998e;
}

.answer-item.wrong {
    border-left-color: #ff6b6b;
}

.answer-number {
    font-weight: 600;
    color: #666;
    margin-right: 15px;
    min-width: 30px;
}

.answer-content {
    flex: 1;
}

.answer-selected {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 5px;
}

.answer-correct {
    font-size: 0.85rem;
    color: #11998e;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }

    .title {
        font-size: 1.8rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .result-stats {
        gap: 30px;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .nav-buttons {
        flex-wrap: wrap;
    }

    .game-header {
        padding: 15px 20px;
    }

    .timer {
        font-size: 1.2rem;
    }
}

/* 自定义确认对话框 */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

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

.confirm-modal {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.confirm-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.confirm-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.confirm-message {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

@media (max-width: 400px) {
    .confirm-modal {
        padding: 30px 20px;
    }
}