/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.filter-controls, .navigation-controls, .action-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-btn, .nav-btn, .action-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

.filter-btn:hover, .nav-btn:hover, .action-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.filter-btn.active {
    background: rgba(255,255,255,0.4);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.card-counter {
    color: white;
    font-weight: bold;
    margin: 0 10px;
    font-size: 1.1rem;
}

/* Flashcard Container */
.flashcard-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    margin-bottom: 30px;
}

.flashcard {
    width: 400px;
    height: 600px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    cursor: pointer;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Front of Card */
.card-front {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 2px solid rgba(255,255,255,0.8);
}

.zhuyin-character {
    font-size: 8rem;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pinyin-equivalent {
    font-size: 2rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 30px;
    background: rgba(102, 126, 234, 0.1);
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

/* Tone Description for tone cards */
.tone-description {
    font-size: 1.2rem;
    color: #805ad5;
    font-weight: 500;
    margin-bottom: 20px;
    background: rgba(128, 90, 213, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid rgba(128, 90, 213, 0.3);
    font-style: italic;
}

/* Front Audio Controls */
.front-audio-controls {
    margin-bottom: 20px;
}

.front-audio-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.front-audio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.front-audio-btn.playing {
    background: linear-gradient(135deg, #48bb78, #38a169);
    animation: pulse-playing 1s infinite;
}

.card-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #718096;
    font-size: 0.9rem;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Back of Card */
.card-back {
    background: linear-gradient(145deg, #f7fafc, #edf2f7);
    transform: rotateY(180deg);
    padding: 20px;
}

.card-content {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.card-content::-webkit-scrollbar {
    width: 6px;
}

.card-content::-webkit-scrollbar-track {
    background: transparent;
}

.card-content::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.info-section {
    margin-bottom: 25px;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}

.info-section h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-section h3 i {
    color: #667eea;
}

/* Word Info */
.word-info {
    text-align: center;
    margin-bottom: 15px;
}

.characters {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 8px;
}

.pinyin {
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 5px;
    font-style: italic;
}

.meaning {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 10px;
}

.zhuyin-typing {
    font-size: 1.2rem;
    color: #805ad5;
    background: rgba(128, 90, 213, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: monospace;
    border: 1px solid rgba(128, 90, 213, 0.3);
}

/* Sentence Info */
.sentence-chars {
    font-size: 1.4rem;
    color: #2d3748;
    margin-bottom: 10px;
    text-align: center;
    line-height: 1.4;
}

.sentence-translation {
    font-size: 1rem;
    color: #718096;
    text-align: center;
    font-style: italic;
}

/* Audio Controls */
.audio-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.audio-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.audio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.audio-btn.playing {
    background: linear-gradient(135deg, #48bb78, #38a169);
    animation: pulse-playing 1s infinite;
}

@keyframes pulse-playing {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Word Breakdown */
.word-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.word-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.word-chars {
    font-weight: bold;
    font-size: 1.1rem;
    color: #2d3748;
}

.word-pinyin {
    color: #667eea;
    font-style: italic;
    margin-left: 8px;
}

.word-zhuyin {
    color: #805ad5;
    font-family: monospace;
    font-size: 0.9rem;
    margin-left: 8px;
    background: rgba(128, 90, 213, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(128, 90, 213, 0.3);
}

.word-meaning {
    color: #718096;
    font-size: 0.9rem;
}

.word-audio {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.word-audio:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

/* Notes and Mnemotecnia Section */
.notes-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.note-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid #667eea;
}

.note-item h4 {
    color: #4a5568;
    font-size: 1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.note-item h4 i {
    color: #667eea;
    font-size: 0.9rem;
}

.note-item p {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

#mnemotecniaContent {
    border-left-color: #805ad5;
}

#mnemotecniaContent h4 i {
    color: #805ad5;
}

/* Back Button */
.back-button {
    text-align: center;
    margin-top: 20px;
}

.flip-btn {
    background: linear-gradient(135deg, #718096, #4a5568);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.flip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(113, 128, 150, 0.4);
}

/* Overview Mode Styles */
.overview-container {
    flex: 1;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 30px;
}

.overview-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.overview-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.overview-stats {
    font-size: 1.1rem;
    opacity: 0.9;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Mini Cards */
.mini-card {
    width: 180px;
    height: 240px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    cursor: pointer;
    margin: 0 auto;
}

.mini-card.flipped {
    transform: rotateY(180deg);
}

.mini-card-front,
.mini-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-align: center;
}

.mini-card-front {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 2px solid rgba(255,255,255,0.8);
}

.mini-card-back {
    background: linear-gradient(145deg, #f7fafc, #edf2f7);
    transform: rotateY(180deg);
    border: 2px solid rgba(247, 250, 252, 0.8);
}

/* Mini Card Expand Button */
.mini-expand-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.mini-card:hover .mini-expand-btn {
    opacity: 1;
    transform: scale(1);
}

.mini-expand-btn:hover {
    background: rgba(102, 126, 234, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.mini-expand-btn:active {
    transform: scale(0.95);
}

/* Mini Card Elements */
.mini-zhuyin {
    font-size: 3.5rem;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.mini-pinyin {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 8px;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.mini-tone-desc {
    font-size: 0.8rem;
    color: #805ad5;
    font-weight: 500;
    margin-bottom: 8px;
    background: rgba(128, 90, 213, 0.1);
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid rgba(128, 90, 213, 0.3);
    font-style: italic;
    text-align: center;
}

.mini-word-chars {
    font-size: 2rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 8px;
}

.mini-word-pinyin {
    font-size: 1rem;
    color: #667eea;
    margin-bottom: 5px;
    font-style: italic;
}

.mini-word-meaning {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 8px;
}

.mini-zhuyin-typing {
    font-size: 0.8rem;
    color: #805ad5;
    font-family: monospace;
    background: rgba(128, 90, 213, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(128, 90, 213, 0.3);
    margin-bottom: 10px;
    word-break: break-all;
}

.mini-audio-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.mini-audio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.mini-audio-btn.playing {
    background: linear-gradient(135deg, #48bb78, #38a169);
    animation: pulse-playing 1s infinite;
}

/* Expanded Card Overlay */
.expanded-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expanded-overlay-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.expanded-card-container {
    position: relative;
    perspective: 1000px;
    z-index: 10000;
}

.expanded-close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.expanded-close-btn:hover {
    background: white;
    transform: scale(1.1);
}

.expanded-flashcard {
    width: 400px;
    height: 600px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    cursor: pointer;
}

.expanded-flashcard.flipped {
    transform: rotateY(180deg);
}

/* Responsive for expanded overlay */
@media (max-width: 768px) {
    .expanded-flashcard {
        width: 350px;
        height: 500px;
    }
    
    .expanded-close-btn {
        top: -40px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .expanded-flashcard {
        width: 300px;
        height: 450px;
    }
    
    .expanded-close-btn {
        top: -35px;
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* Hover effects for mini cards */
.mini-card:hover {
    transform: translateY(-5px);
}

.mini-card.flipped:hover {
    transform: rotateY(180deg) translateY(-5px);
}

/* Progress */
.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 20px;
    right: -300px;
    width: 280px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: right 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.3);
}

.settings-panel.open {
    right: 20px;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.settings-header h3 {
    margin: 0;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-settings {
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.close-settings:hover {
    background: rgba(113, 128, 150, 0.2);
    color: #4a5568;
    transform: rotate(90deg);
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a5568;
    font-size: 0.9rem;
}

.setting-item input[type="checkbox"] {
    accent-color: #667eea;
}

.settings-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.settings-toggle:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Error Message */
.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fed7d7;
    color: #c53030;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #feb2b2;
    z-index: 2000;
    text-align: center;
    max-width: 400px;
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-controls, .navigation-controls, .action-controls {
        width: 100%;
        justify-content: center;
    }
    
    .flashcard {
        width: 350px;
        height: 500px;
    }
    
    .zhuyin-character {
        font-size: 6rem;
    }
    
    .pinyin-equivalent {
        font-size: 1.5rem;
    }
    
    .tone-description {
        font-size: 1rem;
    }
    
    .front-audio-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .settings-panel {
        width: 250px;
        right: -250px;
    }
    
    .settings-panel.open {
        right: 10px;
    }
    
    .settings-toggle {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
    }
    
    /* Overview responsive */
    .overview-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .mini-card {
        width: 150px;
        height: 200px;
    }
    
    .mini-zhuyin {
        font-size: 2.8rem;
    }
    
    .mini-pinyin {
        font-size: 1rem;
    }
    
    .mini-word-chars {
        font-size: 1.6rem;
    }
    
    .overview-header h2 {
        font-size: 1.6rem;
    }
    
    .mini-expand-btn {
        width: 24px;
        height: 24px;
        top: 6px;
        right: 6px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .flashcard {
        width: 300px;
        height: 450px;
    }
    
    .zhuyin-character {
        font-size: 5rem;
    }
    
    .card-face {
        border-radius: 15px;
    }
    
    .filter-btn, .nav-btn, .action-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .audio-controls {
        gap: 5px;
    }
    
    .audio-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    /* Overview mobile responsive */
    .overview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
        padding: 10px 0;
    }
    
    .mini-card {
        width: 120px;
        height: 160px;
    }
    
    .mini-zhuyin {
        font-size: 2.2rem;
        margin-bottom: 6px;
    }
    
    .mini-pinyin {
        font-size: 0.8rem;
        padding: 2px 6px;
        margin-bottom: 6px;
    }
    
    .mini-tone-desc {
        font-size: 0.7rem;
        padding: 2px 6px;
        margin-bottom: 6px;
    }
    
    .mini-word-chars {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }
    
    .mini-word-pinyin {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    .mini-word-meaning {
        font-size: 0.7rem;
        margin-bottom: 8px;
    }
    
    .mini-audio-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
        padding: 4px;
    }
    
    .overview-header h2 {
        font-size: 1.4rem;
    }
    
    .overview-container {
        padding: 15px;
    }
    
    .mini-expand-btn {
        width: 22px;
        height: 22px;
        top: 4px;
        right: 4px;
        font-size: 0.6rem;
    }
}

/* Print Styles */
@media print {
    .controls, .settings-panel, .settings-toggle, .progress-container {
        display: none;
    }
    
    .flashcard {
        break-inside: avoid;
    }
    
    body {
        background: white;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .flashcard, .mini-card {
        transition: none;
    }
    
    .zhuyin-character {
        animation: none;
    }
    
    .card-hint {
        animation: none;
    }
}

/* Focus styles for accessibility */
button:focus,
input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card-front, .mini-card-front {
        background: white;
        border: 3px solid black;
    }
    
    .card-back, .mini-card-back {
        background: white;
        border: 3px solid black;
    }
    
    .zhuyin-character, .mini-zhuyin {
        color: black;
    }
    
    .pinyin-equivalent, .mini-pinyin {
        color: black;
        border-color: black;
    }
    
    .tone-description, .mini-tone-desc {
        color: black;
        border-color: black;
    }
}