/* ============================================
   全局样式 - 英语单词对战游戏
   ============================================ */

/* CSS变量定义 */
:root {
    --color-primary: #6C63FF;
    --color-secondary: #4ECDC4;
    --color-accent: #FF6B9D;
    --color-success: #2ECC71;
    --color-error: #E74C3C;
    --color-warning: #F39C12;
    --color-text: #FFFFFF;
    --color-text-dim: #8892B0;
    --color-bg-dark: #1a1a2e;
    --color-bg-darker: #0f0f1a;
    --color-card: rgba(255, 255, 255, 0.03);
    --color-border: rgba(255, 255, 255, 0.08);
    
    --font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    --border-radius: 8px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 页面容器 */
.page {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.page.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================
   主菜单样式
   ============================================ */
.menu-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.game-title {
    font-size: 3rem;
    font-weight: 300;
    color: var(--color-text);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    position: relative;
}

.game-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
    margin: 1rem auto 0;
    border-radius: 2px;
}

.game-subtitle {
    font-size: 1rem;
    color: var(--color-text-dim);
    font-weight: 300;
    letter-spacing: 0.2em;
    margin-bottom: 3rem;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    width: 240px;
}

.menu-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.menu-btn.primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border: none;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.menu-btn.primary:hover {
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.5);
}

.menu-btn:active {
    transform: translateY(0);
}

/* 装饰元素 */
.menu-decoration {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.menu-decoration.top-left {
    top: -100px;
    left: -100px;
}

.menu-decoration.bottom-right {
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
}

/* 背景装饰 */
.menu-bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.03;
}

.bg-circle-1 {
    width: 400px;
    height: 400px;
    background: var(--color-primary);
    top: -100px;
    right: -100px;
}

.bg-circle-2 {
    width: 300px;
    height: 300px;
    background: var(--color-secondary);
    bottom: -50px;
    left: -50px;
}

.bg-circle-3 {
    width: 200px;
    height: 200px;
    background: var(--color-accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 版本信息 */
.version-info {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--color-text-dim);
    opacity: 0.5;
    letter-spacing: 0.1em;
}

/* 标题区域 */
.title-area {
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease;
}

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

/* 菜单按钮动画 */
.menu-buttons {
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* 浮动装饰文字 */
.floating-text {
    position: fixed;
    font-size: 0.875rem;
    color: var(--color-text-dim);
    opacity: 0.15;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

.floating-text:nth-child(1) {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.floating-text:nth-child(2) {
    top: 25%;
    right: 15%;
    animation-delay: 1s;
}

.floating-text:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 单词装饰 */
.word-decoration {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    opacity: 0.3;
}

.word-decoration span {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-text-dim);
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* ============================================
   角色选择页面
   ============================================ */
.character-container {
    text-align: center;
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    animation: fadeIn 0.5s ease;
}

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

.page-title {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-dim);
    margin-bottom: 2.5rem;
}

.character-list {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.character-card {
    width: 150px;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.character-card:hover {
    transform: translateY(-8px);
    border-color: rgba(108, 99, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.character-card:hover::before {
    opacity: 1;
}

.character-card.selected {
    border-color: var(--color-primary);
    background: rgba(108, 99, 255, 0.1);
    box-shadow: 0 0 30px rgba(108, 99, 255, 0.2);
}

.character-card.selected::before {
    opacity: 1;
}

.character-card .icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    display: block;
    transition: transform 0.3s ease;
}

.character-card:hover .icon {
    transform: scale(1.1);
}

.character-card .name {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.character-card .skill-desc {
    font-size: 0.75rem;
    color: var(--color-text-dim);
    line-height: 1.4;
}

.character-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* 角色选择动画 */
.character-card {
    animation: cardSlideUp 0.5s ease backwards;
}

.character-card:nth-child(1) { animation-delay: 0.1s; }
.character-card:nth-child(2) { animation-delay: 0.15s; }
.character-card:nth-child(3) { animation-delay: 0.2s; }
.character-card:nth-child(4) { animation-delay: 0.25s; }
.character-card:nth-child(5) { animation-delay: 0.3s; }

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

/* ============================================
   游戏页面
   ============================================ */
#game-page {
    flex-direction: column;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* 难度背景效果 - 基础层 */
.chaos-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 1s ease;
}

#chaos-bg {
    opacity: 0;
}

/* 难度1 - 初级：微妙的紫色光晕 */
.bg-difficulty-1 {
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, rgba(15, 15, 26, 0.95) 0%, rgba(26, 26, 46, 0.98) 100%);
}

/* 难度2 - 初中级：增加粉色光晕 */
.bg-difficulty-2 {
    background: 
        radial-gradient(ellipse at 30% 70%, rgba(236, 72, 153, 0.2) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 30%, rgba(139, 92, 246, 0.2) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 90%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        linear-gradient(180deg, rgba(20, 15, 30, 0.95) 0%, rgba(35, 25, 50, 0.98) 100%);
    animation: bgShift2 8s ease-in-out infinite;
}

/* 难度3 - 中级：彩虹光效 */
.bg-difficulty-3 {
    background: 
        radial-gradient(ellipse at 20% 60%, rgba(236, 72, 153, 0.25) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 20%, rgba(139, 92, 246, 0.25) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 70%, rgba(6, 182, 212, 0.2) 0%, transparent 40%),
        radial-gradient(ellipse at 40% 90%, rgba(245, 158, 11, 0.15) 0%, transparent 50%),
        linear-gradient(180deg, rgba(25, 18, 35, 0.95) 0%, rgba(40, 25, 55, 0.98) 100%);
    animation: bgShift3 6s ease-in-out infinite, rainbowHue 15s linear infinite;
}

/* 难度4 - 中高级：更强的彩色光效 */
.bg-difficulty-4 {
    background: 
        radial-gradient(ellipse at 15% 75%, rgba(239, 68, 68, 0.25) 0%, transparent 35%),
        radial-gradient(ellipse at 50% 25%, rgba(236, 72, 153, 0.3) 0%, transparent 35%),
        radial-gradient(ellipse at 85% 55%, rgba(139, 92, 246, 0.3) 0%, transparent 35%),
        radial-gradient(ellipse at 25% 15%, rgba(6, 182, 212, 0.25) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 85%, rgba(34, 197, 94, 0.2) 0%, transparent 40%),
        linear-gradient(180deg, rgba(30, 15, 40, 0.95) 0%, rgba(50, 20, 60, 0.98) 100%);
    animation: bgShift4 5s ease-in-out infinite, rainbowHue 12s linear infinite;
}

/* 难度5 - 高级：混乱的彩色世界 */
.bg-difficulty-5 {
    background: 
        radial-gradient(ellipse at 10% 90%, rgba(251, 191, 36, 0.3) 0%, transparent 30%),
        radial-gradient(ellipse at 90% 10%, rgba(239, 68, 68, 0.3) 0%, transparent 30%),
        radial-gradient(ellipse at 30% 40%, rgba(236, 72, 153, 0.35) 0%, transparent 30%),
        radial-gradient(ellipse at 70% 60%, rgba(139, 92, 246, 0.35) 0%, transparent 30%),
        radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.3) 0%, transparent 35%),
        radial-gradient(ellipse at 80% 40%, rgba(34, 197, 94, 0.25) 0%, transparent 35%),
        linear-gradient(180deg, rgba(35, 10, 45, 0.95) 0%, rgba(55, 15, 65, 0.98) 100%);
    animation: bgShift5 4s ease-in-out infinite, rainbowHue 8s linear infinite, chaosWobble 3s ease-in-out infinite;
}

/* 难度6 - 究极：完全混乱的彩色世界 */
.bg-difficulty-6 {
    background: 
        radial-gradient(ellipse at 5% 95%, rgba(251, 191, 36, 0.4) 0%, transparent 25%),
        radial-gradient(ellipse at 95% 5%, rgba(239, 68, 68, 0.4) 0%, transparent 25%),
        radial-gradient(ellipse at 25% 35%, rgba(236, 72, 153, 0.45) 0%, transparent 25%),
        radial-gradient(ellipse at 75% 65%, rgba(139, 92, 246, 0.45) 0%, transparent 25%),
        radial-gradient(ellipse at 45% 75%, rgba(6, 182, 212, 0.4) 0%, transparent 30%),
        radial-gradient(ellipse at 65% 35%, rgba(34, 197, 94, 0.35) 0%, transparent 30%),
        radial-gradient(ellipse at 15% 55%, rgba(168, 85, 247, 0.35) 0%, transparent 30%),
        radial-gradient(ellipse at 85% 85%, rgba(244, 114, 182, 0.35) 0%, transparent 30%),
        linear-gradient(180deg, rgba(40, 5, 50, 0.95) 0%, rgba(60, 10, 70, 0.98) 100%);
    animation: bgShift6 3s ease-in-out infinite, rainbowHue 5s linear infinite, chaosWobble 2s ease-in-out infinite, extremeChaos 2.5s ease-in-out infinite;
}

/* 究极难度：粒子乱飞层 */
#chaos-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 1.5s ease;
    overflow: hidden;
}

.chaos-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: chaosFloat 4s ease-in-out infinite;
}

@keyframes chaosFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(30px, -50px) scale(1.5);
        opacity: 0.9;
    }
    50% {
        transform: translate(-20px, -100px) scale(1);
        opacity: 0.5;
    }
    75% {
        transform: translate(40px, -30px) scale(1.3);
        opacity: 0.8;
    }
}

/* 究极难度：扫描线效果 */
#chaos-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 1s ease;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.01) 2px,
        rgba(255, 255, 255, 0.01) 4px
    );
    animation: scanlineMove 0.1s linear infinite;
}

@keyframes scanlineMove {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 0 4px;
    }
}

/* 究极难度：色差效果 */
#chaos-chromatic {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 998;
    opacity: 0;
    transition: opacity 1s ease;
    mix-blend-mode: screen;
    background: 
        linear-gradient(90deg, rgba(255, 0, 0, 0.03) 0%, transparent 50%),
        linear-gradient(270deg, rgba(0, 255, 255, 0.03) 0%, transparent 50%);
    animation: chromaticShift 3s ease-in-out infinite;
}

@keyframes chromaticShift {
    0%, 100% {
        transform: translateX(-2px);
    }
    50% {
        transform: translateX(2px);
    }
}

/* 背景动画关键帧 */
@keyframes bgShift2 {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(10deg) brightness(1.05); }
}

@keyframes bgShift3 {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); transform: scale(1); }
    33% { filter: hue-rotate(15deg) brightness(1.1); transform: scale(1.02); }
    66% { filter: hue-rotate(-10deg) brightness(0.95); transform: scale(0.98); }
}

@keyframes bgShift4 {
    0%, 100% { filter: hue-rotate(0deg) brightness(1) saturate(1); transform: scale(1) rotate(0deg); }
    25% { filter: hue-rotate(20deg) brightness(1.15) saturate(1.2); transform: scale(1.03) rotate(0.5deg); }
    50% { filter: hue-rotate(-15deg) brightness(0.9) saturate(1.1); transform: scale(0.97) rotate(-0.5deg); }
    75% { filter: hue-rotate(10deg) brightness(1.1) saturate(1.3); transform: scale(1.02) rotate(0.3deg); }
}

@keyframes bgShift5 {
    0%, 100% { filter: hue-rotate(0deg) brightness(1) saturate(1.2) contrast(1); transform: scale(1) rotate(0deg); }
    20% { filter: hue-rotate(30deg) brightness(1.2) saturate(1.4) contrast(1.1); transform: scale(1.04) rotate(1deg); }
    40% { filter: hue-rotate(-20deg) brightness(0.85) saturate(1) contrast(0.9); transform: scale(0.96) rotate(-0.5deg); }
    60% { filter: hue-rotate(25deg) brightness(1.15) saturate(1.5) contrast(1.15); transform: scale(1.03) rotate(0.8deg); }
    80% { filter: hue-rotate(-30deg) brightness(1.1) saturate(1.3) contrast(0.95); transform: scale(0.98) rotate(-1deg); }
}

@keyframes bgShift6 {
    0%, 100% { filter: hue-rotate(0deg) brightness(1) saturate(1.5) contrast(1.1) blur(0px); transform: scale(1) rotate(0deg); }
    15% { filter: hue-rotate(45deg) brightness(1.3) saturate(1.8) contrast(1.2) blur(0.5px); transform: scale(1.05) rotate(1.5deg); }
    30% { filter: hue-rotate(-25deg) brightness(0.8) saturate(1.2) contrast(0.85) blur(1px); transform: scale(0.94) rotate(-1deg); }
    45% { filter: hue-rotate(35deg) brightness(1.25) saturate(1.9) contrast(1.25) blur(0.3px); transform: scale(1.04) rotate(1.2deg); }
    60% { filter: hue-rotate(-40deg) brightness(1.1) saturate(1.5) contrast(1) blur(0.8px); transform: scale(0.97) rotate(-1.5deg); }
    75% { filter: hue-rotate(20deg) brightness(1.35) saturate(2) contrast(1.3) blur(0.2px); transform: scale(1.06) rotate(0.8deg); }
    90% { filter: hue-rotate(-15deg) brightness(0.9) saturate(1.3) contrast(0.9) blur(0.6px); transform: scale(0.99) rotate(-0.5deg); }
}

@keyframes rainbowHue {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes chaosWobble {
    0%, 100% { transform: skewX(0deg) skewY(0deg); }
    25% { transform: skewX(0.5deg) skewY(0.3deg); }
    50% { transform: skewX(-0.3deg) skewY(-0.5deg); }
    75% { transform: skewX(0.3deg) skewY(0.5deg); }
}

@keyframes extremeChaos {
    0%, 100% { transform: scale(1) rotate(0deg) translate(0, 0); }
    10% { transform: scale(1.02) rotate(0.5deg) translate(2px, -2px); }
    20% { transform: scale(0.98) rotate(-0.5deg) translate(-2px, 2px); }
    30% { transform: scale(1.01) rotate(0.3deg) translate(1px, 1px); }
    40% { transform: scale(0.99) rotate(-0.3deg) translate(-1px, -1px); }
    50% { transform: scale(1.03) rotate(0.8deg) translate(3px, -1px); }
    60% { transform: scale(0.97) rotate(-0.8deg) translate(-3px, 1px); }
    70% { transform: scale(1.02) rotate(0.5deg) translate(2px, 2px); }
    80% { transform: scale(0.98) rotate(-0.5deg) translate(-2px, -2px); }
    90% { transform: scale(1.01) rotate(0.2deg) translate(1px, -1px); }
}

/* 浮动几何图形层 */
#chaos-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 1.2s ease;
    overflow: hidden;
}

.chaos-shape {
    position: absolute;
    opacity: 0.15;
    animation: shapeFloat 8s ease-in-out infinite;
}

.chaos-shape.triangle {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid;
}

.chaos-shape.diamond {
    width: 40px;
    height: 40px;
    transform: rotate(45deg);
}

.chaos-shape.circle {
    border-radius: 50%;
}

.chaos-shape.hexagon {
    width: 50px;
    height: 28.87px;
    position: relative;
}

.chaos-shape.hexagon::before,
.chaos-shape.hexagon::after {
    content: "";
    position: absolute;
    width: 0;
    left: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
}

.chaos-shape.hexagon::before {
    bottom: 100%;
    border-bottom: 14.43px solid;
}

.chaos-shape.hexagon::after {
    top: 100%;
    border-top: 14.43px solid;
}

@keyframes shapeFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.1;
    }
    25% {
        transform: translate(50px, -80px) rotate(90deg) scale(1.2);
        opacity: 0.2;
    }
    50% {
        transform: translate(-30px, -150px) rotate(180deg) scale(0.8);
        opacity: 0.15;
    }
    75% {
        transform: translate(70px, -60px) rotate(270deg) scale(1.1);
        opacity: 0.18;
    }
}

/* 背景过渡效果 */
.bg-transition {
    transition: background 1.5s ease, filter 1s ease !important;
}

.game-header {
    width: 100%;
    margin-bottom: 2rem;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--color-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.health-display, .streak-display, .score-display, .character-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.health-icon {
    font-size: 1.5rem;
    transition: var(--transition-fast);
}

.health-icon.lost {
    opacity: 0.3;
    transform: scale(0.8);
}

.streak-count, .score-count {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-warning);
}

.game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.question-area {
    text-align: center;
    padding: 2rem 4rem;
    background: var(--color-card);
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
    animation: questionPulse 2s ease-in-out infinite;
}

@keyframes questionPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 50px rgba(139, 92, 246, 0.5);
    }
}

#question-text {
    font-size: 3rem;
    font-weight: bold;
}

.options-area {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.option-btn {
    min-width: 200px;
    padding: 1.25rem 2rem;
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
}

.option-btn:hover:not(:disabled) {
    transform: scale(1.05);
    border-color: var(--color-secondary);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
}

.option-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.option-btn.correct {
    border-color: var(--color-success);
    background: rgba(46, 204, 113, 0.2);
    animation: correctPulse 0.5s ease;
}

.option-btn.wrong {
    border-color: var(--color-error);
    background: rgba(231, 76, 60, 0.2);
    animation: shake 0.3s ease;
}

.option-btn.highlight {
    border-color: var(--color-success);
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.5);
}

/* 更难选项标记 */
.option-btn.hard-option {
    border-color: rgba(255, 107, 157, 0.4);
}

.option-btn.hard-option::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 24px 24px 0;
    border-color: transparent var(--color-accent) transparent transparent;
}

.option-level {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.75rem;
    color: var(--color-accent);
}

/* 技能栏 */
.skill-bar {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
}

.skill-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-card);
    border: 2px solid var(--color-border);
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.skill-btn:not(:disabled):hover {
    transform: scale(1.1);
    border-color: var(--color-warning);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.skill-btn.ready {
    border-color: var(--color-warning);
    animation: skillReady 1s ease-in-out infinite;
}

@keyframes skillReady {
    0%, 100% {
        box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
    }
}

.skill-btn .skill-icon {
    font-size: 1.5rem;
}

.skill-btn .skill-count {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: var(--color-warning);
    color: var(--color-bg-dark);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

/* 结果遮罩 */
.result-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 100;
}

.result-overlay.show {
    display: block;
    animation: resultPop 0.3s ease;
}

@keyframes resultPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }
    70% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.result-icon {
    font-size: 8rem;
}

.result-text {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* 粒子画布 */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

/* ============================================
   结果页面
   ============================================ */
.result-container {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--color-card);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-dim);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-warning);
}

.collected-words {
    background: var(--color-card);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.collected-words h3 {
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

.word-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.word-tag {
    background: var(--color-bg-darker);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ============================================
   错题本页面
   ============================================ */
.wrong-words-container {
    text-align: center;
    max-width: 800px;
    width: 100%;
    padding: 2rem;
}

.wrong-words-list {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 2rem;
    padding: 1rem;
}

.wrong-word-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--color-card);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--color-error);
}

.wrong-word-item .word {
    font-weight: bold;
    color: var(--color-text);
}

.wrong-word-item .meaning {
    color: var(--color-text-dim);
}

.wrong-word-item .wrong-count {
    color: var(--color-error);
    font-size: 0.875rem;
}

/* ============================================
   连击记录页面
   ============================================ */
.streak-record-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    padding: 2rem;
}

.record-list {
    margin-bottom: 2rem;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--color-card);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.record-label {
    color: var(--color-text-dim);
}

.record-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-warning);
}

/* ============================================
   通用组件
   ============================================ */
.btn {
    padding: 0.875rem 2rem;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.primary {
    background: linear-gradient(135deg, var(--color-primary), #8B7FFF);
    color: var(--color-text);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
}

.btn.primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn.secondary:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.05);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--color-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    text-align: center;
}

.modal-message {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 暂停菜单 */
.pause-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 150;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.pause-menu.show {
    display: flex;
}

.pause-menu-content {
    background: var(--color-card);
    padding: 3rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--color-primary);
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.pause-menu h2 {
    margin-bottom: 2rem;
}

.pause-menu button {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
}

.pause-menu button:last-child {
    margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }
    
    #question-text {
        font-size: 2rem;
    }
    
    .option-btn {
        min-width: 150px;
        font-size: 1.25rem;
        padding: 1rem 1.5rem;
    }
    
    .character-card {
        width: 150px;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .status-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
}

/* ============================================
   难度系统样式
   ============================================ */

/* 难度指示器 */
.level-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.level-badge {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
    color: white;
}

.level-progress {
    color: var(--color-text-dim);
    font-size: 0.7rem;
}

.level-max {
    color: var(--color-accent);
    font-weight: 600;
}

/* 升级动画 */
.level-up-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.level-up-overlay.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

.level-up-content {
    text-align: center;
    animation: levelUpBounce 0.5s ease;
}

.level-up-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 1s ease infinite;
}

.level-up-text {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.level-up-name {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes levelUpBounce {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

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