/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 1.8em;
    color: #4a90e2;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    font-size: 1em;
    color: #666;
}

/* 导航栏样式 */
.nav-container {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 15px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-link {
    color: #4a90e2;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 25px;
    background: rgba(74, 144, 226, 0.1);
    transition: all 0.3s ease;
    font-size: 0.85em;
    font-weight: 500;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.nav-link:hover::before {
    width: 300px;
    height: 300px;
}

.nav-link:hover {
    color: #4a90e2;
    background: rgba(74, 144, 226, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.2);
    border-color: #4a90e2;
}

.nav-link.active {
    background: rgba(74, 144, 226, 0.4);
    font-weight: bold;
    border-color: #4a90e2;
    color: white;
}

/* 控制面板 */
.controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 8px 16px;
    font-size: 0.9em;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.95);
    color: #4a90e2;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
    background: #4a90e2;
    color: white;
}

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

/* 进度信息 */
.progress-info {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1em;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* 闪卡容器 */
.flashcard-container {
    perspective: 1000px;
    margin-bottom: 30px;
    height: auto;
    min-height: 300px;
}

.flashcard {
    width: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
    height: auto;
    min-height: 300px;
}

.card-front,
.card-back {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 300px;
    backface-visibility: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
}

.card-back {
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    justify-content: flex-start;
}

.flashcard.flipped .card-front {
    display: none;
}

.flashcard.flipped .card-back {
    display: flex;
}

.symbol-display {
    font-size: 5em;
    font-weight: bold;
    color: #4a90e2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}

.card-back .symbol-display {
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    font-size: 4em;
}

.card-hint {
    font-size: 1.2em;
    color: #999;
    margin-top: 20px;
}

.words-list {
    width: 100%;
    max-width: 600px;
    margin-top: 20px;
    overflow: visible;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.word-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    margin: 0;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.word-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

.word-text {
    font-size: 1.2em;
    font-weight: bold;
}

.word-phonetic {
    font-size: 1em;
    opacity: 0.9;
}

.vowel-highlight {
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 0 12px rgba(255, 215, 0, 0.6);
    background: rgba(255, 215, 0, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
}

/* 音频控制 */
.audio-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.audio-btn {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.95);
    color: #4a90e2;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.audio-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
    background: #4a90e2;
    color: white;
}

.audio-btn:active {
    transform: translateY(-1px);
}

.audio-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 导航指示器 */
.nav-indicator {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.indicator-dots {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 600px;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator-dot.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}

.indicator-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* 全屏模式样式 - 当卡片容器全屏时 */
:fullscreen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

:fullscreen .flashcard-container {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

:fullscreen .flashcard {
    max-height: 90vh;
    height: auto;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

:fullscreen .card-front,
:fullscreen .card-back {
    max-height: 90vh;
    height: 100%;
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

:fullscreen .symbol-display {
    font-size: 12em;
}

:fullscreen .card-back .symbol-display {
    font-size: 10em;
}

:fullscreen .word-text {
    font-size: 1.8em;
}

:fullscreen .word-phonetic {
    font-size: 1.5em;
}

:fullscreen .word-item {
    padding: 15px 20px;
    margin-bottom: 15px;
}

/* 全屏时隐藏其他元素 */
:fullscreen .header,
:fullscreen .controls,
:fullscreen .progress-info,
:fullscreen .audio-controls,
:fullscreen .nav-indicator {
    display: none !important;
}

/* WebKit浏览器全屏样式 */
:-webkit-full-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

:-webkit-full-screen .flashcard-container {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

:-webkit-full-screen .flashcard {
    max-height: 90vh;
    height: auto;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

:-webkit-full-screen .card-front,
:-webkit-full-screen .card-back {
    max-height: 90vh;
    height: 100%;
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

:-webkit-full-screen .symbol-display {
    font-size: 12em;
}

:-webkit-full-screen .card-back .symbol-display {
    font-size: 10em;
}

:-webkit-full-screen .word-text {
    font-size: 1.8em;
}

:-webkit-full-screen .word-phonetic {
    font-size: 1.5em;
}

:-webkit-full-screen .word-item {
    padding: 15px 20px;
    margin-bottom: 15px;
}

/* WebKit全屏时隐藏其他元素 */
:-webkit-full-screen .header,
:-webkit-full-screen .controls,
:-webkit-full-screen .progress-info,
:-webkit-full-screen .audio-controls,
:-webkit-full-screen .nav-indicator {
    display: none !important;
}

/* Mozilla浏览器全屏样式 */
:-moz-full-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

:-moz-full-screen .flashcard-container {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

:-moz-full-screen .flashcard {
    max-height: 90vh;
    height: auto;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

:-moz-full-screen .card-front,
:-moz-full-screen .card-back {
    max-height: 90vh;
    height: 100%;
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

:-moz-full-screen .symbol-display {
    font-size: 12em;
}

:-moz-full-screen .card-back .symbol-display {
    font-size: 10em;
}

:-moz-full-screen .word-text {
    font-size: 1.8em;
}

:-moz-full-screen .word-phonetic {
    font-size: 1.5em;
}

:-moz-full-screen .word-item {
    padding: 15px 20px;
    margin-bottom: 15px;
}

/* Mozilla全屏时隐藏其他元素 */
:-moz-full-screen .header,
:-moz-full-screen .controls,
:-moz-full-screen .progress-info,
:-moz-full-screen .audio-controls,
:-moz-full-screen .nav-indicator {
    display: none !important;
}

/* IE浏览器全屏样式 */
:-ms-fullscreen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

:-ms-fullscreen .flashcard-container {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

:-ms-fullscreen .flashcard {
    max-height: 90vh;
    height: auto;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

:-ms-fullscreen .card-front,
:-ms-fullscreen .card-back {
    max-height: 90vh;
    height: 100%;
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

:-ms-fullscreen .symbol-display {
    font-size: 12em;
}

:-ms-fullscreen .card-back .symbol-display {
    font-size: 10em;
}

:-ms-fullscreen .word-text {
    font-size: 1.8em;
}

:-ms-fullscreen .word-phonetic {
    font-size: 1.5em;
}

:-ms-fullscreen .word-item {
    padding: 15px 20px;
    margin-bottom: 15px;
}

/* IE全屏时隐藏其他元素 */
:-ms-fullscreen .header,
:-ms-fullscreen .controls,
:-ms-fullscreen .progress-info,
:-ms-fullscreen .audio-controls,
:-ms-fullscreen .nav-indicator {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .symbol-display {
        font-size: 5em;
    }
    
    .word-text {
        font-size: 1.2em;
    }
    
    .word-phonetic {
        font-size: 1em;
    }
    
    .flashcard-container {
        height: 350px;
    }
    
    .control-btn {
        padding: 10px 16px;
        font-size: 0.9em;
    }
}

/* 移动设备全屏样式 */
@media (max-width: 768px) {
    :fullscreen .symbol-display,
    :-webkit-full-screen .symbol-display,
    :-moz-full-screen .symbol-display,
    :-ms-fullscreen .symbol-display {
        font-size: 8em;
    }
    
    :fullscreen .card-back .symbol-display,
    :-webkit-full-screen .card-back .symbol-display,
    :-moz-full-screen .card-back .symbol-display,
    :-ms-fullscreen .card-back .symbol-display {
        font-size: 7em;
    }
    
    :fullscreen .word-text,
    :-webkit-full-screen .word-text,
    :-moz-full-screen .word-text,
    :-ms-fullscreen .word-text {
        font-size: 1.5em;
    }
    
    :fullscreen .word-phonetic,
    :-webkit-full-screen .word-phonetic,
    :-moz-full-screen .word-phonetic,
    :-ms-fullscreen .word-phonetic {
        font-size: 1.2em;
    }
    
    :fullscreen .word-item,
    :-webkit-full-screen .word-item,
    :-moz-full-screen .word-item,
    :-ms-fullscreen .word-item {
        padding: 10px 15px;
        margin-bottom: 10px;
    }
}

/* 动画效果 */
@keyframes flip {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(180deg);
    }
}

.flashcard.flipping {
    animation: flip 0.6s;
}

