/**
 * Typing Game Styles
 * Fun and engaging design for children's vocabulary learning
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

h1 {
    text-align: center;
    color: white;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 2em;
}

/* ==========================================================================
   Game Stats Bar
   ========================================================================== */

.game-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.stat-value.warning {
    color: #f44336;
    animation: pulse 0.5s infinite;
}

.stat-value.combo-fire {
    color: #ff6b6b;
    animation: comboFire 0.3s infinite alternate;
}

/* ==========================================================================
   Game Container
   ========================================================================== */

.game-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.screen {
    transition: opacity 0.3s ease;
}

.screen.hidden {
    display: none;
}

/* ==========================================================================
   Start Screen
   ========================================================================== */

.start-content {
    text-align: center;
}

.start-content h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.start-content p {
    color: #666;
    margin-bottom: 30px;
}

/* High Score Display on Start Screen */
.high-score-display {
    background: linear-gradient(135deg, #ffd700 0%, #ffeb3b 100%);
    color: #333;
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 25px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    animation: highScorePulse 2s ease-in-out infinite;
}

@keyframes highScorePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6); }
}

/* Difficulty Selector */
.difficulty-selector,
.category-selector,
.keyboard-hint-selector {
    margin-bottom: 25px;
}

.difficulty-selector h3,
.category-selector h3,
.keyboard-hint-selector h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 15px;
}

.difficulty-options,
.category-options,
.hint-mode-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.difficulty-btn,
.category-btn,
.hint-mode-btn {
    padding: 15px 25px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.difficulty-btn:hover,
.category-btn:hover,
.hint-mode-btn:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.difficulty-btn.active,
.category-btn.active,
.hint-mode-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.difficulty-desc {
    font-size: 11px;
    margin-top: 5px;
    opacity: 0.7;
}

.hint-mode-desc {
    font-size: 11px;
    margin-top: 5px;
    opacity: 0.7;
}

/* Start Button */
.start-btn {
    padding: 20px 50px;
    font-size: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    margin: 20px 0;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

/* Instructions */
.instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    text-align: left;
    max-width: 400px;
    margin: 20px auto 0;
}

.instructions h4 {
    color: #667eea;
    margin-top: 0;
    margin-bottom: 10px;
}

.instructions ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
}

.instructions li {
    margin-bottom: 8px;
}

/* ==========================================================================
   Game Screen
   ========================================================================== */

.word-display {
    text-align: center;
    margin-bottom: 30px;
}

.chinese-word {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
    font-weight: bold;
}

.chinese-word.bounce {
    animation: bounce 0.3s ease;
}

.english-word {
    font-size: 36px;
    letter-spacing: 8px;
    margin-bottom: 15px;
    min-height: 50px;
}

.word-letter {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    background: #f0f0f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.word-letter.correct {
    background: #4caf50;
    color: white;
    transform: scale(1.1);
}

.word-letter.incorrect {
    background: #f44336;
    color: white;
    animation: shake 0.3s ease;
}

.word-hint {
    background: #fff3e0;
    padding: 10px 20px;
    border-radius: 10px;
    color: #ff9800;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 400px;
    margin: 0 auto;
}

.word-hint.visible {
    opacity: 1;
}

/* ==========================================================================
   Visual Keyboard
   ========================================================================== */

.keyboard-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 15px;
}

.keyboard-row {
    display: flex;
    gap: 6px;
}

.keyboard-key {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    font-size: 14px;
    transition: all 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.keyboard-key.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(2px);
    box-shadow: none;
}

.keyboard-key.next-key {
    background: #ffd700;
    color: #333;
    border-color: #ffa500;
    animation: nextKeyPulse 1s ease-in-out infinite;
}

@keyframes nextKeyPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    50% { 
        transform: scale(1.1); 
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
    }
}

/* ==========================================================================
   Input Area
   ========================================================================== */

.input-area {
    text-align: center;
    margin-bottom: 20px;
}

.word-input {
    width: 100%;
    max-width: 400px;
    padding: 15px 25px;
    font-size: 24px;
    text-align: center;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    outline: none;
    transition: all 0.3s ease;
    letter-spacing: 5px;
}

.word-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.word-input.correct {
    border-color: #4caf50;
    background: #e8f5e8;
}

.word-input.shake {
    animation: shake 0.3s ease;
}

.input-feedback {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    min-height: 20px;
}

/* ==========================================================================
   Game Actions
   ========================================================================== */

.game-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hint-btn {
    background: #fff3e0;
    color: #ff9800;
}

.skip-btn {
    background: #e3f2fd;
    color: #2196f3;
}

.pause-btn {
    background: #f3e5f5;
    color: #9c27b0;
}

.pause-btn.paused {
    background: #4caf50;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Result Screen
   ========================================================================== */

.result-content {
    text-align: center;
}

.result-content h2 {
    color: #667eea;
    font-size: 28px;
    margin-bottom: 25px;
}

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

.result-stat {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.result-icon {
    font-size: 30px;
}

.result-label {
    font-size: 12px;
    color: #666;
}

.result-value {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.result-unit {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* High Score Stat */
.high-score-stat {
    background: linear-gradient(135deg, #ffd700 0%, #ffeb3b 100%);
    border: 2px solid #ffc107;
}

.high-score-stat .result-value {
    color: #ff6b6b;
}

/* Learned Words */
.learned-words {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.learned-words h3 {
    color: #4caf50;
    margin-top: 0;
    margin-bottom: 15px;
}

.words-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.learned-word {
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    gap: 10px;
    font-size: 14px;
}

.word-english {
    color: #667eea;
    font-weight: bold;
}

.word-chinese {
    color: #666;
}

/* Achievement */
.achievement {
    margin-bottom: 25px;
}

.achievement-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    display: inline-block;
    animation: achievementPop 0.5s ease;
}

/* Result Actions */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

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

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

.share-btn {
    background: #4caf50;
    color: white;
}

/* ==========================================================================
   Floating Messages
   ========================================================================== */

.floating-messages {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1000;
}

.floating-message {
    position: absolute;
    bottom: 50%;
    padding: 15px 25px;
    background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
    color: white;
    border-radius: 15px;
    font-weight: bold;
    font-size: 18px;
    animation: floatUp 2s ease forwards;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

/* ==========================================================================
   Celebration Effects
   ========================================================================== */

.celebration-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 999;
}

.celebration-star {
    position: absolute;
    font-size: 24px;
    animation: starFloat 1.5s ease forwards;
}

.confetti {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confettiFall 3s linear forwards;
}

/* New Record Celebration Effects */
.new-record-confetti {
    width: 15px;
    height: 15px;
    animation: confettiFall 4s linear forwards;
}

.new-record-star {
    animation: newRecordStar 3s ease forwards;
}

.celebration-firework {
    position: absolute;
    animation: fireworkBurst 2.5s ease-out forwards;
}

/* New High Score Banner */
.new-high-score-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #ffd700 0%, #ff6b6b 50%, #ff9800 100%);
    padding: 30px 50px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 10px 50px rgba(255, 215, 0, 0.6), 0 0 100px rgba(255, 107, 107, 0.4);
    z-index: 1001;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.new-high-score-banner.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: bannerGlow 1s ease-in-out infinite alternate;
}

.new-record-title {
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    animation: titleBounce 0.6s ease infinite;
}

.new-record-score {
    font-size: 60px;
    font-weight: bold;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    margin-bottom: 10px;
    animation: scoreGrow 0.5s ease-out;
}

.new-record-diff {
    font-size: 18px;
    color: #fff;
    opacity: 0.9;
    margin-bottom: 15px;
}

.new-record-congrats {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    animation: congratsBounce 0.8s ease infinite;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes newRecordStar {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    30% {
        opacity: 1;
        transform: scale(1.5) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(360deg) translateY(-100px);
    }
}

@keyframes fireworkBurst {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    20% {
        opacity: 1;
        transform: scale(1.5);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) translateY(-50px);
    }
}

@keyframes bannerGlow {
    0% {
        box-shadow: 0 10px 50px rgba(255, 215, 0, 0.6), 0 0 100px rgba(255, 107, 107, 0.4);
    }
    100% {
        box-shadow: 0 15px 70px rgba(255, 215, 0, 0.8), 0 0 150px rgba(255, 107, 107, 0.6);
    }
}

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

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

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

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

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

@keyframes comboFire {
    0% { transform: scale(1); color: #ff6b6b; }
    100% { transform: scale(1.2); color: #ff9800; }
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.8);
    }
}

@keyframes starFloat {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-150px) rotate(360deg);
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

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

@keyframes toastFadeIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastFadeOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet and smaller */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5em;
    }
    
    .game-container {
        padding: 20px;
        border-radius: 15px;
    }
    
    .stat-item {
        padding: 8px 15px;
        min-width: 70px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .chinese-word {
        font-size: 36px;
    }
    
    .english-word {
        font-size: 28px;
        letter-spacing: 5px;
    }
    
    .word-letter {
        padding: 3px 8px;
    }
    
    .keyboard-visual {
        padding: 10px;
        transform: scale(0.85);
        transform-origin: top center;
    }
    
    .keyboard-key {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .word-input {
        font-size: 20px;
        padding: 12px 20px;
    }
    
    .difficulty-btn,
    .category-btn {
        padding: 12px 18px;
        min-width: 80px;
        font-size: 14px;
    }
    
    .start-btn {
        padding: 15px 40px;
        font-size: 18px;
    }
    
    .result-stat {
        min-width: 100px;
        padding: 15px;
    }
    
    .result-icon {
        font-size: 24px;
    }
    
    .result-value {
        font-size: 20px;
    }
    
    .game-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 15px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        border-radius: 20px 20px 0 0;
        z-index: 100;
    }
    
    .word-display {
        margin-bottom: 80px; /* Space for fixed buttons */
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .game-stats {
        gap: 8px;
    }
    
    .stat-item {
        padding: 6px 12px;
        min-width: 60px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .chinese-word {
        font-size: 32px;
    }
    
    .english-word {
        font-size: 24px;
        letter-spacing: 3px;
    }
    
    .difficulty-options,
    .category-options {
        gap: 8px;
    }
    
    .difficulty-btn,
    .category-btn {
        padding: 10px 12px;
        min-width: 70px;
        font-size: 12px;
    }
    
    .instructions {
        padding: 15px;
        font-size: 14px;
    }
    
    .result-stats {
        gap: 10px;
    }
    
    .result-stat {
        min-width: 80px;
        padding: 12px;
    }
    
    .learned-word {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .action-btn {
        padding: 10px 18px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus styles */
.difficulty-btn:focus,
.category-btn:focus,
.start-btn:focus,
.action-btn:focus,
.word-input:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.2s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.2s !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .game-container {
        border: 3px solid #333;
    }
    
    .difficulty-btn,
    .category-btn {
        border-width: 3px;
    }
    
    .word-input {
        border-width: 4px;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    .game-container {
        background: #2d2d44;
        color: #f0f0f0;
    }
    
    .stat-item {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .stat-label {
        color: #aaa;
    }
    
    .difficulty-btn,
    .category-btn {
        background: #3d3d5c;
        border-color: #4d4d6c;
        color: #f0f0f0;
    }
    
    .instructions {
        background: #3d3d5c;
        color: #ddd;
    }
    
    .word-letter {
        background: #3d3d5c;
        color: #f0f0f0;
    }
    
    .keyboard-visual {
        background: #3d3d5c;
    }
    
    .keyboard-key {
        background: #4d4d6c;
        border-color: #5d5d7c;
        color: #f0f0f0;
    }
    
    .word-input {
        background: #3d3d5c;
        border-color: #5d5d7c;
        color: #f0f0f0;
    }
    
    .result-stat,
    .learned-words {
        background: #3d3d5c;
    }
    
    .learned-word {
        background: #4d4d6c;
    }
    
    .word-chinese {
        color: #aaa;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    body {
        background: white;
        color: black;
    }
    
    .game-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .game-stats,
    .game-actions,
    .keyboard-visual,
    .celebration-container,
    .floating-messages {
        display: none !important;
    }
    
    .learned-words {
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   Game Reward Modal
   ========================================================================== */

.game-reward-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.game-reward-modal.hidden {
    display: none;
}

.game-reward-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    text-align: center;
    animation: slideDown 0.5s ease;
}

.game-reward-content h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 28px;
}

.game-reward-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 18px;
}

.game-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.game-btn {
    padding: 20px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.game-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.skip-game-btn {
    padding: 12px 30px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skip-game-btn:hover {
    background: #e0e0e0;
}

/* ==========================================================================
   Mini Game Container
   ========================================================================== */

.mini-game-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.mini-game-container.hidden {
    display: none;
}

.mini-game-header {
    background: white;
    padding: 15px 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.mini-game-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 24px;
}

.mini-game-timer {
    background: #ff6b6b;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 18px;
}

.mini-game-canvas {
    background: white;
    border-radius: 20px;
    padding: 20px;
    min-width: 400px;
    min-height: 400px;
    max-width: 800px;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.mini-game-exit {
    margin-top: 20px;
    padding: 12px 30px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mini-game-exit:hover {
    background: #667eea;
    color: white;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
