/* Basic styles */
:root {
    --primary-color: #4a148c;
    --secondary-color: #7b1fa2;
    --accent-color: #00e5ff;
    --background-color: #071e3d;
    --card-bg-color: #1a3156;
    --light-text: #ffffff;
    --dark-text: #333333;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --correct-color: #4caf50;
    --incorrect-color: #f44336;
}

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

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background-color: var(--background-color);
    background-image: linear-gradient(to bottom, #071e3d, #0a2e5e);
    background-attachment: fixed;
    color: var(--light-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1462331940025-496dfbfc7564?q=80&w=2000');
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(26, 49, 86, 0.9);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        transparent 30%,
        rgba(0, 229, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(30deg);
    animation: headerShine 8s linear infinite;
}

@keyframes headerShine {
    0% {
        transform: translateX(-100%) rotate(30deg);
    }
    100% {
        transform: translateX(100%) rotate(30deg);
    }
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
    position: relative;
}

header p {
    font-size: 1.2rem;
    color: #c5cae9;
}

/* Main content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Wheel styles */
.wheel-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.wheel-outer {
    width: 100%;
    height: 100%;
    position: relative;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(0, 229, 255, 0.5), 
        0 0 40px rgba(0, 0, 0, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.4);
    transform: rotate(0deg);
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.13, 0.99), box-shadow 0.5s ease;
    animation: glowEffect 3s ease-in-out infinite alternate;
    background-image: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(0, 0, 0, 0.05) 100%
    );
    border: 2px solid rgba(0, 229, 255, 0.2);
    /* 添加宇宙主题纹理 */
    background-image: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, 0.05) 100%),
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
}

.wheel.spinning {
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.8), 0 0 50px rgba(0, 0, 0, 0.5);
    animation: none;
    border: 2px solid rgba(0, 229, 255, 0.6);
}

@keyframes glowEffect {
    0% {
        box-shadow: 0 0 20px rgba(0, 229, 255, 0.5), 0 0 40px rgba(0, 0, 0, 0.3);
    }
    100% {
        box-shadow: 0 0 30px rgba(0, 229, 255, 0.7), 0 0 50px rgba(0, 0, 0, 0.4);
    }
}

.wheel-segment {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 50%;
    transform-origin: 0% 100%;
    background-color: var(--primary-color);
    box-shadow: 
        inset 0 0 5px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    background-image: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    /* 添加星系纹理 */
    overflow: hidden;
}

.wheel-segment:hover {
    filter: brightness(1.1);
}

.wheel-segment::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 20%),
        radial-gradient(circle at 70% 65%, rgba(255, 255, 255, 0.15) 0%, transparent 25%);
    opacity: 0.4;
}

/* 替换数字标签为图标样式 */
.wheel-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    border-radius: 50%;
}

.wheel-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.8rem;
    background-color: rgba(0, 10, 20, 0.6);
    border-radius: 50%;
    box-shadow: 
        0 0 10px rgba(0, 0, 0, 0.5),
        inset 0 0 10px rgba(255, 255, 255, 0.5);
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 1px 3px rgba(0, 0, 0, 0.6);
    animation: iconPulse 2s infinite alternate;
    transform: translate(-50%, -50%);
    overflow: hidden;
    /* 3D效果 */
    transform-style: preserve-3d;
    perspective: 300px;
}

.wheel-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.9) 0%,
        transparent 70%
    );
    opacity: 0.5;
    animation: starShine 3s infinite alternate;
}

.wheel-icon::after {
    content: '';
    position: absolute;
    width: 140%;
    height: 140%;
    top: -20%;
    left: -20%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 60%
    );
    filter: blur(3px);
    animation: starGlow 4s infinite alternate;
}

@keyframes iconPulse {
    0% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    }
}

@keyframes starShine {
    0% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    100% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

@keyframes starGlow {
    0% {
        opacity: 0.3;
        transform: scale(0.8) rotate(0deg);
    }
    100% {
        opacity: 0.7;
        transform: scale(1.1) rotate(360deg);
    }
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25%;
    height: 25%;
    background-color: var(--card-bg-color);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    background-image: radial-gradient(
        circle at center,
        var(--accent-color) 0%,
        transparent 70%
    );
    border: 3px solid transparent;
    background-clip: padding-box;
}

.wheel-center::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: conic-gradient(
        transparent 0%,
        var(--accent-color) 25%,
        transparent 50%,
        var(--accent-color) 75%,
        transparent 100%
    );
    border-radius: 50%;
    z-index: -1;
    animation: rotateConic 5s linear infinite;
}

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

.spin-btn {
    background-color: var(--accent-color);
    color: var(--dark-text);
    border: none;
    border-radius: 50%;
    width: 80%;
    height: 80%;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.8);
}

.spin-btn:disabled {
    background-color: rgba(0, 229, 255, 0.4);
    cursor: not-allowed;
}

.wheel-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid var(--accent-color);
    z-index: 5;
    filter: drop-shadow(0 0 5px rgba(0, 229, 255, 0.6));
}

/* Question styles */
.question-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.question-container.show {
    opacity: 1;
    transform: translateY(0);
}

.question-card {
    background-color: rgba(26, 49, 86, 0.95);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0, 229, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.question-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.question-number, .question-type {
    font-size: 1.2rem;
    padding: 8px 15px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.question-content {
    margin-bottom: 20px;
}

.question-content p {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--light-text);
    font-weight: 500;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
    font-size: 1.1rem;
}

.option:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.option.selected {
    border-color: var(--accent-color);
    background-color: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.option.correct {
    border-color: var(--correct-color);
    background-color: rgba(76, 175, 80, 0.1);
    animation: correctGlow 2s infinite alternate;
}

.option.incorrect {
    border-color: var(--incorrect-color);
    background-color: rgba(244, 67, 54, 0.1);
}

@keyframes correctGlow {
    0% {
        box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
    }
    100% {
        box-shadow: 0 0 15px rgba(76, 175, 80, 0.8);
    }
}

.question-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

.btn-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

.btn {
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: var(--dark-text);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    background-color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn.submit-btn {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn.submit-btn:hover {
    background-color: var(--secondary-color);
}

.answer-text {
    padding: 15px;
    background-color: rgba(0, 229, 255, 0.1);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
    width: 100%;
    font-size: 1.1rem;
    text-align: left;
}

/* Score display */
.score-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
    background-color: rgba(26, 49, 86, 0.8);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.score-label {
    font-size: 0.9rem;
    color: #c5cae9;
}

.score-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.counter {
    background-color: var(--primary-color);
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: translateX(-100%);
    animation: counterShine 3s linear infinite;
}

@keyframes counterShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

#remainingQuestions {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.5rem;
}

/* Results modal */
.results-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.results-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.results-content {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    max-width: 600px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.5s ease;
}

.results-modal.show .results-content {
    transform: scale(1);
}

.results-title {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.final-score {
    font-size: 3rem;
    font-weight: bold;
    color: var(--light-text);
    margin: 20px 0;
}

.score-percent {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.close-results {
    margin-top: 20px;
}

/* Confetti animation for correct answers */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    opacity: 0.7;
    top: 0;
    border-radius: 0 5px 0 5px;
    animation: confetti-fall 3s linear forwards;
    z-index: 50;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Utility classes */
.hidden {
    display: none;
}

/* Footer styles */
footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    background-color: rgba(26, 49, 86, 0.9);
    border-radius: var(--border-radius);
    position: relative;
    z-index: 1;
}

/* Responsive styles */
@media (max-width: 768px) {
    .wheel-container {
        max-width: 350px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .question-content p {
        font-size: 1rem;
    }
    
    .btn-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .wheel-container {
        max-width: 300px;
    }
    
    .question-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .score-container {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

/* 为辐射线添加样式 */
.wheel-ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform-origin: left center;
    z-index: 1;
    opacity: 0.3;
}

/* 宇宙背景效果 */
.wheel-container::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: 
        radial-gradient(white, rgba(255, 255, 255, 0.2) 2px, transparent 4px), 
        radial-gradient(white, rgba(255, 255, 255, 0.15) 1px, transparent 3px),
        radial-gradient(white, rgba(255, 255, 255, 0.1) 2px, transparent 4px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
    animation: starsMoving 120s linear infinite;
}

@keyframes starsMoving {
    0% {
        background-position: 0 0, 40px 60px, 130px 270px;
    }
    100% {
        background-position: 550px 550px, 390px 410px, 380px 520px;
    }
}

/* 背景视频样式 */
.background-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background-color: rgba(7, 30, 61, 0.5); /* 深蓝色背景，与现有主题匹配 */
}

.background-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6; /* 稍微提高透明度，让视频更可见 */
    filter: blur(3px) hue-rotate(-10deg) saturate(1.2); /* 添加滤镜效果 */
    mix-blend-mode: luminosity; /* 使用混合模式与背景融合 */
    transition: opacity 1s ease; /* 平滑过渡 */
}

/* 音频控制样式 */
.audio-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.audio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: var(--dark-text);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
}

.audio-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.8);
}

.audio-btn.muted i:before {
    content: "\f6a9"; /* Font Awesome icon for volume-mute */
}

/* 隐藏音频元素 */
audio {
    display: none;
} 