:root {
    --bg-start: #667eea;
    --bg-mid: #764ba2;
    --bg-end: #f093fb;
    --primary-color: #ffd700;
    --secondary-color: #ff6b6b;
    --accent-color: #4ecdc4;
    --success-color: #51cf66;
    --error-color: #ff6b6b;
    --smooth-ease: cubic-bezier(0.4, 0.0, 0.2, 1);
    --bounce-ease: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    font-family: 'Nunito', 'Comic Sans MS', sans-serif;
}

body {
    background: linear-gradient(135deg, 
        #FF6B9D 0%,
        #C06FDB 25%,
        #6B8AFF 50%,
        #63D9FF 75%,
        #90F7EC 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    position: relative;
    overflow-y: auto;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.particles { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    pointer-events: none; 
    z-index: 1; 
}

#celebration-layer { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    pointer-events: none; 
    z-index: 9999; 
}

.minigame-trigger {
    position: fixed; 
    bottom: 30px; 
    right: 30px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white; 
    border: none; 
    padding: 15px 30px; 
    border-radius: 50px;
    font-size: 1.2rem; 
    font-weight: bold; 
    cursor: pointer; 
    z-index: 999;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease; 
    animation: pulse-minigame 2s infinite;
}

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

/* Minigame Selection Modal */
.minigame-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.minigame-selection-modal[style*="display: block"],
.minigame-selection-modal.active {
    display: flex !important;
}

.minigame-selection-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.minigame-selection-content h2 {
    color: #ffffff;
    font-size: 2.5rem;
    font-family: 'Fredoka One', cursive;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.minigame-modal-desc {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.minigame-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.minigame-option {
    background: white;
    border: none;
    border-radius: 15px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: #333;
}

.minigame-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.minigame-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.minigame-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.minigame-desc {
    font-size: 0.9rem;
    color: #444;
}

.minigame-option.experimental-game {
    position: relative;
    border: 2px dashed #9b59b6;
    background: linear-gradient(135deg, #ffffff 0%, #f8f4ff 100%);
}

/* Ensure text remains visible in experimental games */
.minigame-option.experimental-game .minigame-name {
    color: #667eea;
}

.minigame-option.experimental-game .minigame-desc {
    color: #444;
}

.minigame-option.experimental-game::after {
    content: '⚗️ Experimental';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #9b59b6;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: bold;
}

.minigame-option.experimental-game:hover {
    border-color: #8e44ad;
    box-shadow: 0 10px 25px rgba(155, 89, 182, 0.3);
}

/* Explicitly set text colors on hover to prevent white-on-white */
.minigame-option.experimental-game:hover .minigame-name {
    color: #667eea;
}

.minigame-option.experimental-game:hover .minigame-desc {
    color: #444;
}

.minigame-close-selection {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.minigame-close-selection:hover {
    background: #ffffff;
    color: #667eea;
    text-shadow: none;
}

/* Minigame Play Modal */
.minigame-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
}

.minigame-modal[style*="display: block"],
.minigame-modal.active {
    display: flex !important;
}

.minigame-play-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.minigame-close-play {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10002;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.minigame-close-play:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* Time Chef Game Styles */
.time-chef-game {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.chef-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-radius: 15px 15px 0 0;
    color: white;
}

.chef-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.chef-score, .chef-round {
    font-size: 1.2rem;
    font-weight: bold;
}

.chef-kitchen {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 0 0 15px 15px;
}

.chef-dish {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 20px;
}

.chef-instruction {
    font-size: 1.3rem;
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-weight: bold;
}

.chef-clock-setting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-input {
    width: 80px;
    padding: 15px;
    font-size: 1.5rem;
    text-align: center;
    border: 2px solid #667eea;
    border-radius: 10px;
}

.time-separator {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.submit-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.chef-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Clock Constructor Game Styles */
.clock-constructor-game {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.constructor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px 15px 0 0;
    color: white;
}

.constructor-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.constructor-score, .constructor-round, .constructor-timer {
    font-size: 1.1rem;
    font-weight: bold;
}

.constructor-workshop {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 0 0 15px 15px;
}

.constructor-target {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.constructor-target h3 {
    color: #f5576c;
    margin: 0;
    font-size: 1.5rem;
}

.constructor-clock-area {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.constructor-clock {
    width: 200px;
    height: 200px;
    position: relative;
}

.clock-face-constructor {
    width: 100%;
    height: 100%;
    border: 4px solid #333;
    border-radius: 50%;
    background: white;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.hour-hand-construct, .minute-hand-construct {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    background: #333;
    border-radius: 5px 5px 0 0;
}

.hour-hand-construct {
    width: 6px;
    height: 60px;
    z-index: 2;
}

.minute-hand-construct {
    width: 4px;
    height: 80px;
    z-index: 1;
}

.clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: #333;
    border-radius: 50%;
    z-index: 3;
}

.constructor-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hand-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hand-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: #333;
}

.hand-controls input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    outline: none;
}

.constructor-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.minigame-container {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.95); 
    z-index: 10000; 
    display: none;
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
}

.minigame-container.active { display: flex; }

.minigame-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    width: 90%; 
    max-width: 800px; 
    margin-bottom: 20px;
}

.minigame-header h2 { 
    color: var(--primary-color); 
    font-size: 2rem; 
    font-family: 'Fredoka One', cursive; 
}

.minigame-close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: var(--error-color); 
    color: white; 
    border: none;
    padding: 10px 20px; 
    border-radius: 25px; 
    font-size: 1rem;
    font-weight: bold; 
    cursor: pointer; 
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.minigame-close:hover {
    background: #d63031;
    transform: scale(1.05);
}

#minigame-canvas {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 5px solid var(--primary-color); 
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.minigame-info {
    display: flex; 
    gap: 30px; 
    margin-top: 20px;
    color: white; 
    font-size: 1.2rem; 
    font-weight: bold;
}

#minigame-score { color: var(--primary-color); }

.help-modal, .language-modal, .challenge-modal, .prize-shop-modal, .leaderboard-modal, .settings-modal, .name-entry-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s var(--smooth-ease);
}

.help-modal.active, .language-modal.active, .challenge-modal.active, .prize-shop-modal.active, .leaderboard-modal.active, .settings-modal.active, .name-entry-modal.active { 
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    margin: auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s var(--bounce-ease);
    position: relative;
}

.language-modal-content {
    max-width: 400px;
    text-align: center;
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.language-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 3px solid #6B8AFF;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s var(--bounce-ease);
}

.language-option:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(107, 138, 255, 0.4);
    border-color: #FFD93D;
}

/* CHALLENGE MODE MODAL STYLES */
.challenge-modal-content {
    max-width: 600px;
    text-align: center;
}

.challenge-modal-desc {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
}

.challenge-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 25px 0;
}

@media (max-width: 600px) {
    .challenge-options {
        grid-template-columns: 1fr;
    }
}

.challenge-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 3px solid #6B8AFF;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s var(--bounce-ease);
    min-height: 140px;
}

.challenge-option:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(107, 138, 255, 0.4);
    border-color: #FFD93D;
    background: linear-gradient(135deg, #fffbf0 0%, #fff5e1 100%);
}

.challenge-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.challenge-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.challenge-desc {
    font-size: 0.85rem;
    color: #666;
}

.challenge-close {
    margin-top: 15px;
    padding: 12px 25px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.challenge-close:hover {
    background: #ff5252;
    transform: scale(1.05);
}

/* CHALLENGE MODE OVERLAY (During Challenge) */
.challenge-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5000;
    background: linear-gradient(135deg, #6B8AFF 0%, #4A69FF 100%);
    color: white;
    padding: 15px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

.challenge-header {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.challenge-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.challenge-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.challenge-progress {
    font-size: 1.1rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
}

.challenge-timer {
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    min-width: 80px;
    text-align: center;
}

.challenge-exit {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.challenge-exit:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .challenge-header {
        flex-direction: column;
        text-align: center;
    }

    .challenge-title {
        font-size: 1.2rem;
    }

    .challenge-subtitle {
        font-size: 0.8rem;
    }
}

/* CHALLENGE RESULTS MODAL */
.challenge-results-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.challenge-results-modal.show {
    opacity: 1;
}

.challenge-results-content {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: bounceIn 0.5s var(--bounce-ease);
}

.challenge-results-emoji {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: pulse 1s ease infinite;
}

.challenge-results-content h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
}

.challenge-results-message {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 20px;
    font-weight: bold;
}

.challenge-results-reward {
    font-size: 1.5rem;
    color: #FFD93D;
    font-weight: bold;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.challenge-results-close {
    padding: 15px 40px;
    background: linear-gradient(135deg, #6B8AFF 0%, #4A69FF 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.challenge-results-close:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(107, 138, 255, 0.5);
}

/* TIMEZONE QUESTION STYLES */
.timezone-question {
    text-align: center;
    padding: 20px;
}

.timezone-scenario {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.timezone-from, .timezone-to {
    background: linear-gradient(135deg, #6B8AFF 0%, #4A69FF 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    min-width: 180px;
    box-shadow: 0 5px 20px rgba(107, 138, 255, 0.3);
}

.timezone-emoji {
    font-size: 3rem;
    margin-bottom: 10px;
}

.timezone-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.timezone-time {
    font-size: 1.8rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 10px;
}

.timezone-arrow {
    font-size: 3rem;
    color: #FFD93D;
    font-weight: bold;
}

.timezone-instructions {
    font-size: 1.2rem;
    color: #555;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .timezone-scenario {
        flex-direction: column;
        gap: 15px;
    }

    .timezone-arrow {
        transform: rotate(90deg);
    }
}

/* PRIZE SHOP STYLES */
.prize-shop-content {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Shop Categories */
.shop-categories {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    padding: 0 10px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
}

.category-tab {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: #f9f9f9;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #666;
}

.category-tab:hover {
    background: #e8f4fd;
    border-color: #4CAF50;
    color: #4CAF50;
    transform: translateY(-2px);
}

.category-tab.active {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-color: #4CAF50;
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 0 10px;
}

.shop-item {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #4CAF50;
}

.shop-item-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

.shop-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.shop-item-description {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 32px;
}

.shop-item-price {
    font-size: 18px;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 10px;
}

.shop-item-price::before {
    content: '🪙 ';
    margin-right: 5px;
}

.shop-item.owned {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    border-color: #28a745;
}

.shop-item.owned::after {
    content: '✓ OWNED';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.shop-item.active-theme {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-color: #ffc107;
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
    transform: scale(1.02);
}

.shop-item.active-theme::after {
    content: '✓ ACTIVE';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffc107;
    color: #212529;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.shop-item.active-effect {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #2196f3;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.3);
    transform: scale(1.02);
}

.shop-item.active-effect::after {
    content: '✓ ACTIVE';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #2196f3;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.shop-item.active-character {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    border-color: #9c27b0;
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.3);
    transform: scale(1.02);
}

.shop-item.active-character::after {
    content: '✓ ACTIVE';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #9c27b0;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.shop-item.owned:not(.active-theme):not(.active-effect) {
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-item.owned:not(.active-theme):hover {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    border-color: #17a2b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.shop-item.insufficient-coins {
    opacity: 0.6;
    cursor: not-allowed;
}

.shop-item.insufficient-coins:hover {
    transform: none;
    box-shadow: none;
    border-color: #e9ecef;
}


/* LEADERBOARD STYLES */
.leaderboard-content {
    max-width: 500px;
}

.leaderboard-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.tab-button {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
}

.leaderboard-rank {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 30px;
}

.leaderboard-name {
    flex: 1;
    margin: 0 15px;
}

.leaderboard-score {
    font-weight: bold;
    color: #28a745;
}

/* SETTINGS STYLES */
.settings-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.settings-sections {
    margin-top: 20px;
}

.settings-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

.setting-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

/* Experimental feature styling */
.toggle-label.experimental {
    opacity: 0.7;
}

.toggle-label.experimental span {
    font-style: italic;
    color: #6c757d;
}

.toggle-label.experimental input[type="checkbox"]:checked ~ span {
    color: #ff6b6b;
    font-weight: bold;
}

.setting-item select {
    width: 100%;
    padding: 8px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
}

/* Name Entry Modal Styles */
.name-entry-content {
    max-width: 400px;
    text-align: center;
}

.name-entry-content h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.8rem;
}

.name-entry-content p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 1.1rem;
}

.name-input-container {
    margin-bottom: 25px;
}

.name-input-container input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.2rem;
    text-align: center;
    background: white;
    transition: border-color 0.3s;
}

.name-input-container input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.name-entry-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.name-entry-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

.confirm-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.confirm-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
}

/* COIN ANIMATION */
@keyframes coinSpin {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.2); }
    100% { transform: rotateY(360deg) scale(1); }
}

.coin-collect {
    animation: coinSpin 0.6s ease-in-out;
}

/* ACHIEVEMENT NOTIFICATION */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 3px solid #ffc107;
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
    z-index: 10002;
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.language-option .flag {
    font-size: 2rem;
}

.language-option .lang-name {
    color: #6B8AFF;
}

.close { 
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10001;
    color: #aaa; 
    font-size: 28px; 
    font-weight: bold; 
    cursor: pointer;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.close:hover { 
    color: #000; 
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.help-content { 
    margin-top: 20px; 
    line-height: 1.8; 
    color: #333; 
}

.fun-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.6;
    animation: floatAndSpin 15s infinite ease-in-out;
}

.shape.star:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; font-size: 3rem; }
.shape.star:nth-child(2) { top: 25%; left: 85%; animation-delay: 2s; font-size: 2rem; }
.shape.star:nth-child(3) { top: 70%; left: 10%; animation-delay: 4s; font-size: 2.5rem; }
.shape.heart:nth-child(4) { top: 15%; left: 45%; animation-delay: 1s; font-size: 2rem; }
.shape.heart:nth-child(5) { top: 50%; left: 90%; animation-delay: 3s; font-size: 2.5rem; }
.shape.heart:nth-child(6) { top: 80%; left: 70%; animation-delay: 5s; font-size: 2rem; }
.shape.rocket { top: 40%; left: 15%; animation-delay: 1.5s; animation-duration: 20s; }
.shape.balloon { top: 60%; left: 80%; animation-delay: 2.5s; animation-duration: 18s; }
.shape.rainbow { top: 5%; left: 60%; animation-delay: 3.5s; animation-duration: 25s; }

@keyframes floatAndSpin {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-30px) rotate(90deg) scale(1.1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-15px) rotate(180deg) scale(1);
        opacity: 0.6;
    }
    75% {
        transform: translateY(-30px) rotate(270deg) scale(1.1);
        opacity: 0.8;
    }
}

.game-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #FFD93D 0%, #FFA94D 50%, #FF6B9D 100%);
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid rgba(255, 255, 255, 0.5);
}

.game-bar-left, .game-bar-right {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 150px;
}

.game-bar-right {
    justify-content: flex-end;
}

.difficulty-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    animation: difficultyGlow 2s ease-in-out infinite alternate;
}

.difficulty-badge:hover {
    transform: scale(1.05);
}

@keyframes difficultyGlow {
    0% { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
    100% { box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4); }
}

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

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

.game-bar-center {
    flex: 1;
    text-align: center;
}

.game-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #6B46C1;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: titleBounce 2s ease-in-out infinite;
}

.title-icon {
    font-size: 1.8rem;
    animation: iconSpin 3s linear infinite;
}

.title-text {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #FF6B9D, #C06FDB, #6B8AFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

@keyframes iconSpin {
    0%, 90%, 100% { transform: rotate(0deg); }
    95% { transform: rotate(20deg); }
}

.icon-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.icon-button .icon {
    font-size: 1.5rem;
}

.icon-button:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.icon-button:active {
    transform: scale(0.95);
}

.mascot-container {
    position: absolute;
    bottom: -20px;
    left: 20px;
    z-index: 999;
    cursor: pointer;
}

.mascot-container:hover {
    animation: mascotBounce 3s ease-in-out infinite;
}

.mascot-character {
    position: relative;
}

.mascot-body {
    font-size: 4rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mascot-body:hover {
    transform: scale(1.2) rotate(10deg);
}

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

/* Mascot Hint Bubble - separate from question */
.mascot-hint-bubble {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: linear-gradient(135deg, #FFF8DC 0%, #FFE4B5 100%);
    border: 2px solid #FFB347;
    border-radius: 15px;
    padding: 12px 18px;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
    min-width: 200px;
    max-width: 350px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.mascot-hint-bubble.show {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    animation: hintBounceIn 0.5s ease;
}

.mascot-hint-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #FFE4B5;
}

.hint-content {
    font-size: 0.95rem;
    font-weight: 600;
    color: #8B4513;
    text-align: center;
    line-height: 1.3;
}

@keyframes hintBounceIn {
    0% { transform: translateX(-50%) scale(0); opacity: 0; }
    60% { transform: translateX(-50%) scale(1.1); }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .mascot-hint-bubble {
        min-width: 180px;
        max-width: 280px;
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .hint-content {
        font-size: 0.85rem;
    }
}

.game-container {
    position: relative;
    z-index: 1;
    margin-top: 90px;
    padding: 10px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    height: calc(100vh - 80px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.progress-section {
    margin-bottom: 10px;
    flex-shrink: 0;
}

.progress-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.badge {
    background: linear-gradient(135deg, #FFD93D, #FFA94D);
    border: 3px solid #fff;
    border-radius: 15px;
    padding: 8px 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    min-width: 80px;
}

.badge:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.badge-icon {
    font-size: 1.5rem;
    margin-bottom: 3px;
    animation: badgePulse 2s ease-in-out infinite;
}

.badge-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
}

.badge-value {
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.level-badge { background: linear-gradient(135deg, #FFD93D, #FFA94D); }
.score-badge { background: linear-gradient(135deg, #90F7EC, #32CCBC); }
.streak-badge { background: linear-gradient(135deg, #FF6B9D, #FF3C78); }

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

.question-card {
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    border: 3px solid #fff;
    border-radius: 20px;
    padding: 15px 25px;
    margin-bottom: 15px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: visible;
    flex-shrink: 0;
}

.question-card::before {
    content: '?';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 8rem;
    opacity: 0.05;
    font-weight: 900;
}

.timmy-speech-bubble {
    position: relative;
    background: linear-gradient(135deg, #FFE4B5 0%, #FFD700 100%);
    border: 3px solid #FFA500;
    border-radius: 25px;
    padding: 20px 25px;
    box-shadow: 0 6px 15px rgba(255, 165, 0, 0.3);
    animation: speechBubbleFloat 3s ease-in-out infinite;
    margin-left: 60px;
    margin-right: 0;
    display: inline-block;
}

.timmy-speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 25px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid #FFA500;
    z-index: 1;
}

.timmy-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 27px;
    width: 0;
    height: 0;
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 13px solid #FFD700;
    z-index: 2;
}

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

.question-content {
    font-size: 1.4rem;
    font-weight: 800;
    color: #8B4513;
    line-height: 1.4;
    position: relative;
    z-index: 3;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.clock-playground {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 255, 0.6));
    border: 3px solid #fff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 15px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    flex: 1;
    overflow: hidden;
    position: relative;
}

.clocks-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    width: 100%;
}

.analog-clock {
    width: 200px !important;
    height: 200px !important;
    border-width: 6px !important;
    margin: 15px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    position: relative;
}

.analog-clock:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 15px 40px rgba(107, 138, 255, 0.6);
    z-index: 10;
}

.analog-clock:active {
    transform: scale(1.05);
}

.answer-zone {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(248, 249, 250, 0.6));
    border: 3px solid #fff;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    min-height: 80px;
    flex-shrink: 0;
}

.time-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.time-input {
    width: 120px !important;
    height: 60px !important;
    padding: 8px !important;
    font-size: 1.8rem !important;
    text-align: center;
    border: 3px solid #6B8AFF !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #fff, #f0f0ff) !important;
    font-weight: 900 !important;
    color: #6B8AFF !important;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.time-input:focus {
    outline: none !important;
    border-color: #FFD93D !important;
    background: linear-gradient(135deg, #fff, #ffffd0) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 10px 30px rgba(255, 217, 61, 0.5) !important;
}

.time-separator {
    font-size: 3.5rem;
    font-weight: 900;
    color: #6B8AFF;
    animation: separatorPulse 2s ease-in-out infinite;
}

@keyframes separatorPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.submit-button {
    background: linear-gradient(135deg, #FF6B9D, #FF3C78);
    color: white;
    border: 5px solid #fff;
    padding: 18px 45px;
    border-radius: 50px;
    font-size: 1.8rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.5);
    margin-top: 20px;
    text-transform: uppercase;
}

.submit-button:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.7);
}

.submit-button:active {
    transform: scale(0.95);
}

.feedback-overlay {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0) !important;
    z-index: 10000 !important;
    padding: 40px 60px !important;
    font-size: 3rem !important;
    font-weight: 900 !important;
    border-radius: 40px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
    border: 6px solid #fff !important;
    text-align: center !important;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    pointer-events: none !important;
}

.feedback-overlay.show {
    transform: translate(-50%, -50%) scale(1) !important;
}

.feedback-overlay.correct {
    background: linear-gradient(135deg, #90F7EC, #32CCBC) !important;
    color: #fff !important;
    animation: feedbackCorrect 0.6s ease-out !important;
}

.feedback-overlay.incorrect {
    background: linear-gradient(135deg, #FF6B9D, #FF3C78) !important;
    color: #fff !important;
    animation: feedbackShake 0.6s ease-out !important;
}

@keyframes feedbackCorrect {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    25% { transform: translate(-50%, -50%) scale(1.2) rotate(5deg); }
    50% { transform: translate(-50%, -50%) scale(1.1) rotate(-5deg); }
    75% { transform: translate(-50%, -50%) scale(1.15) rotate(3deg); }
}

@keyframes feedbackShake {
    0%, 100% { transform: translate(-50%, -50%); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-55%, -50%); }
    20%, 40%, 60%, 80% { transform: translate(-45%, -50%); }
}

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

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

@keyframes slideOutRight {
    from { 
        transform: translateX(0);
        opacity: 1;
    }
    to { 
        transform: translateX(400px);
        opacity: 0;
    }
}

.purchase-confirm-modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.purchase-confirm-modal .confirm-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

.purchase-confirm-modal .cancel-btn:hover {
    background: #e0e0e0;
}

@keyframes sparkleFloat {
    0% { transform: translateY(0) scale(0) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-50px) scale(1.2) rotate(180deg); opacity: 0.8; }
    100% { transform: translateY(-100px) scale(0) rotate(360deg); opacity: 0; }
}

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

@keyframes floatUp {
    0% { transform: translateY(0) scale(0) rotate(0deg); opacity: 1; }
    30% { transform: translateY(-30px) scale(1) rotate(120deg); opacity: 1; }
    70% { transform: translateY(-70px) scale(1.2) rotate(240deg); opacity: 0.8; }
    100% { transform: translateY(-120px) scale(0) rotate(360deg); opacity: 0; }
}

@keyframes goldenTrail {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.5) rotate(180deg); opacity: 0.8; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

@keyframes rainbowFloat {
    0% { transform: translateY(0) scale(0) rotate(0deg); opacity: 1; }
    30% { transform: translateY(-40px) scale(1.1) rotate(120deg); opacity: 1; }
    70% { transform: translateY(-80px) scale(1.3) rotate(240deg); opacity: 0.8; }
    100% { transform: translateY(-120px) scale(0) rotate(360deg); opacity: 0; }
}

@keyframes waveEffect {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.4) rotate(180deg); opacity: 0.9; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

@keyframes heartFloat {
    0% { transform: translateY(0) scale(0) rotate(0deg); opacity: 1; }
    25% { transform: translateY(-25px) scale(1) rotate(90deg); opacity: 1; }
    50% { transform: translateY(-50px) scale(1.2) rotate(180deg); opacity: 0.9; }
    75% { transform: translateY(-75px) scale(1.1) rotate(270deg); opacity: 0.7; }
    100% { transform: translateY(-100px) scale(0) rotate(360deg); opacity: 0; }
}

@keyframes heartTrail {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.3) rotate(180deg); opacity: 0.8; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

@keyframes starBurst {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    30% { transform: scale(1.8) rotate(120deg); opacity: 1; }
    70% { transform: scale(1.4) rotate(240deg); opacity: 0.7; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

@keyframes fireworkExplode {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    25% { transform: scale(1.2) rotate(90deg); opacity: 1; }
    50% { transform: scale(1.8) rotate(180deg); opacity: 0.9; }
    75% { transform: scale(1.5) rotate(270deg); opacity: 0.6; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

@keyframes fireworkBurst {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    40% { transform: scale(2.2) rotate(144deg); opacity: 1; }
    80% { transform: scale(1.6) rotate(288deg); opacity: 0.5; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

@keyframes spiralFloat {
    0% { transform: translateY(0) scale(0) rotate(0deg); opacity: 1; }
    30% { transform: translateY(-35px) scale(1) rotate(108deg); opacity: 1; }
    60% { transform: translateY(-70px) scale(1.2) rotate(216deg); opacity: 0.8; }
    100% { transform: translateY(-105px) scale(0) rotate(360deg); opacity: 0; }
}

@keyframes spiralTrail {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.6) rotate(180deg); opacity: 0.9; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

@keyframes waveFloat {
    0% { transform: translateY(0) scale(0) rotate(0deg); opacity: 1; }
    35% { transform: translateY(-45px) scale(1.1) rotate(126deg); opacity: 1; }
    70% { transform: translateY(-90px) scale(1.3) rotate(252deg); opacity: 0.8; }
    100% { transform: translateY(-135px) scale(0) rotate(360deg); opacity: 0; }
}

@keyframes waveTrail {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.7) rotate(180deg); opacity: 0.8; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

@keyframes cosmicFloat {
    0% { transform: translateY(0) scale(0) rotate(0deg); opacity: 1; }
    30% { transform: translateY(-50px) scale(1) rotate(108deg); opacity: 1; }
    60% { transform: translateY(-100px) scale(1.3) rotate(216deg); opacity: 0.8; }
    100% { transform: translateY(-150px) scale(0) rotate(360deg); opacity: 0; }
}

@keyframes cosmicTrail {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.8) rotate(180deg); opacity: 0.9; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

@keyframes correctPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(46, 204, 113, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

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

/* Theme Styles */
.theme-classic {
    --bg-start: #667eea;
    --bg-mid: #764ba2;
    --bg-end: #f093fb;
}

.theme-animals {
    --bg-start: #ff9a9e;
    --bg-mid: #fecfef;
    --bg-end: #fecfef;
}

.theme-space {
    --bg-start: #2c3e50;
    --bg-mid: #34495e;
    --bg-end: #3498db;
}

.theme-underwater {
    --bg-start: #1e3c72;
    --bg-mid: #2a5298;
    --bg-end: #74b9ff;
}

.theme-candy {
    --bg-start: #ff6b9d;
    --bg-mid: #ffc3e1;
    --bg-end: #ff9a9e;
}

.theme-unicorn {
    --bg-start: #667eea;
    --bg-mid: #764ba2;
    --bg-end: #f093fb;
}

.theme-aviation {
    --bg-start: #87ceeb;
    --bg-mid: #b0e0e6;
    --bg-end: #e0f6ff;
}

.theme-music {
    --bg-start: #8e2de2;
    --bg-mid: #4a00e0;
    --bg-end: #667eea;
}

.theme-sports {
    --bg-start: #ff6b35;
    --bg-mid: #f7931e;
    --bg-end: #ffd700;
}

/* Character Styles */
.character-timmy .mascot-body {
    filter: drop-shadow(0 4px 10px rgba(255, 165, 0, 0.3));
}

.character-luna .mascot-body {
    filter: drop-shadow(0 4px 10px rgba(138, 43, 226, 0.3));
}

.character-max .mascot-body {
    filter: drop-shadow(0 4px 10px rgba(0, 191, 255, 0.3));
}

.character-candy-princess .mascot-body {
    filter: drop-shadow(0 4px 10px rgba(255, 20, 147, 0.4));
}

.character-unicorn .mascot-body {
    filter: drop-shadow(0 4px 10px rgba(138, 43, 226, 0.4));
}

.character-pilot .mascot-body {
    filter: drop-shadow(0 4px 10px rgba(135, 206, 235, 0.4));
}

.character-astronaut .mascot-body {
    filter: drop-shadow(0 4px 10px rgba(255, 255, 255, 0.4));
}

.character-alien .mascot-body {
    filter: drop-shadow(0 4px 10px rgba(50, 205, 50, 0.4));
}

.character-musician .mascot-body {
    filter: drop-shadow(0 4px 10px rgba(142, 45, 226, 0.4));
}

.character-athlete .mascot-body {
    filter: drop-shadow(0 4px 10px rgba(255, 107, 53, 0.4));
}

/* Effect Styles */
.effect-sparkles::before {
    content: '✨';
    position: fixed;
    top: 10px;
    right: 10px;
    font-size: 2rem;
    animation: sparkle 2s ease-in-out infinite;
    z-index: 1000;
}

.effect-confetti::before {
    content: '🎊';
    position: fixed;
    top: 10px;
    left: 10px;
    font-size: 2rem;
    animation: confetti 3s ease-in-out infinite;
    z-index: 1000;
}

.effect-rainbow::before {
    content: '🌈';
    position: fixed;
    top: 10px;
    right: 50px;
    font-size: 2rem;
    animation: rainbow 2.5s ease-in-out infinite;
    z-index: 1000;
}

.effect-music-notes::before {
    content: '🎵';
    position: fixed;
    top: 10px;
    left: 50px;
    font-size: 2rem;
    animation: musicNotes 2s ease-in-out infinite;
    z-index: 1000;
}

.effect-sports::before {
    content: '🏆';
    position: fixed;
    top: 10px;
    right: 90px;
    font-size: 2rem;
    animation: sports 3s ease-in-out infinite;
    z-index: 1000;
}

.effect-candy-explosion::before {
    content: '🍭';
    position: fixed;
    top: 10px;
    left: 90px;
    font-size: 2rem;
    animation: candyExplosion 2.8s ease-in-out infinite;
    z-index: 1000;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes confetti {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
}

@keyframes rainbow {
    0%, 100% { opacity: 0.4; transform: scale(1) rotate(0deg); }
    25% { opacity: 0.8; transform: scale(1.1) rotate(5deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(0deg); }
    75% { opacity: 0.8; transform: scale(1.1) rotate(-5deg); }
}

@keyframes musicNotes {
    0%, 100% { opacity: 0.3; transform: scale(1) translateY(0); }
    25% { opacity: 0.7; transform: scale(1.1) translateY(-5px); }
    50% { opacity: 1; transform: scale(1.2) translateY(-10px); }
    75% { opacity: 0.7; transform: scale(1.1) translateY(-5px); }
}

@keyframes sports {
    0%, 100% { opacity: 0.4; transform: scale(1) rotate(0deg); }
    25% { opacity: 0.8; transform: scale(1.1) rotate(10deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(0deg); }
    75% { opacity: 0.8; transform: scale(1.1) rotate(-10deg); }
}

@keyframes candyExplosion {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    20% { opacity: 0.6; transform: scale(1.1); }
    40% { opacity: 1; transform: scale(1.3); }
    60% { opacity: 0.8; transform: scale(1.1); }
    80% { opacity: 0.5; transform: scale(1.05); }
}

/* ============================================ */
/* THEME-SPECIFIC ANIMATIONS */
/* ============================================ */

/* ANIMAL THEME */
@keyframes pawFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    25% { transform: translateY(-30px) rotate(15deg); opacity: 0.8; }
    50% { transform: translateY(-15px) rotate(-15deg); opacity: 0.6; }
    75% { transform: translateY(-30px) rotate(10deg); opacity: 0.8; }
}

@keyframes animalWalk {
    0% { left: -100px; }
    100% { left: calc(100% + 100px); }
}

@keyframes heartFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
    50% { transform: translateY(-20px) scale(1.1); opacity: 1; }
}

/* SPACE THEME */
@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

@keyframes planetOrbit {
    0% { transform: rotate(0deg) translateX(50px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(50px) rotate(-360deg); }
}

@keyframes rocketFly {
    0% { left: -100px; }
    100% { left: calc(100% + 100px); }
}

@keyframes ufoFloat {
    0% { left: -100px; transform: translateY(0); }
    50% { left: 50%; transform: translateY(-30px); }
    100% { left: calc(100% + 100px); transform: translateY(0); }
}

@keyframes shootingStarSpace {
    0% { transform: translateX(0) translateY(0); opacity: 1; }
    100% { transform: translateX(150vw) translateY(75vh); opacity: 0; }
}

/* UNDERWATER THEME */
@keyframes fishSwimRight {
    0% { left: -100px; }
    100% { left: calc(100% + 100px); }
}

@keyframes fishSwimLeft {
    0% { right: -100px; }
    100% { right: calc(100% + 100px); }
}

@keyframes bubbleRise {
    0% { 
        bottom: -50px; 
        transform: translateX(0) scale(1); 
        opacity: 0.8; 
    }
    50% {
        transform: translateX(20px) scale(1.1);
    }
    100% { 
        bottom: calc(100% + 50px); 
        transform: translateX(-10px) scale(0.8); 
        opacity: 0; 
    }
}

@keyframes seaweedSway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

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

/* CANDY THEME ANIMATIONS */
@keyframes candyFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
    25% { transform: translateY(-20px) rotate(5deg); opacity: 1; }
    50% { transform: translateY(-10px) rotate(-5deg); opacity: 0.9; }
    75% { transform: translateY(-25px) rotate(3deg); opacity: 1; }
}

@keyframes candyRain {
    0% { top: -50px; transform: rotate(0deg); }
    100% { top: calc(100% + 50px); transform: rotate(360deg); }
}

@keyframes lollipopSway {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

/* UNICORN THEME ANIMATIONS */
@keyframes unicornFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
    25% { transform: translateY(-30px) rotate(10deg); opacity: 0.9; }
    50% { transform: translateY(-15px) rotate(-10deg); opacity: 0.8; }
    75% { transform: translateY(-35px) rotate(5deg); opacity: 1; }
}

@keyframes rainbowTrail {
    0% { left: -100px; transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { left: calc(100% + 100px); transform: scale(0.8); }
}

@keyframes sparkleTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* AVIATION THEME ANIMATIONS */
@keyframes planeFly {
    0% { left: -100px; transform: translateY(0); }
    25% { transform: translateY(-20px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-15px); }
    100% { left: calc(100% + 100px); transform: translateY(0); }
}

@keyframes cloudFloat {
    0%, 100% { transform: translateX(0) translateY(0); opacity: 0.8; }
    25% { transform: translateX(20px) translateY(-10px); opacity: 0.9; }
    50% { transform: translateX(0) translateY(-20px); opacity: 0.7; }
    75% { transform: translateX(-20px) translateY(-10px); opacity: 0.8; }
}

@keyframes parachuteFall {
    0% { top: -50px; transform: rotate(0deg); }
    50% { transform: rotate(5deg); }
    100% { top: calc(100% + 50px); transform: rotate(0deg); }
}

/* MUSIC THEME ANIMATIONS */
@keyframes noteFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
    25% { transform: translateY(-25px) rotate(15deg); opacity: 1; }
    50% { transform: translateY(-10px) rotate(-15deg); opacity: 0.9; }
    75% { transform: translateY(-30px) rotate(10deg); opacity: 1; }
}

@keyframes staffFloat {
    0%, 100% { transform: translateX(0) rotate(0deg); opacity: 0.6; }
    25% { transform: translateX(15px) rotate(2deg); opacity: 0.8; }
    50% { transform: translateX(0) rotate(0deg); opacity: 0.6; }
    75% { transform: translateX(-15px) rotate(-2deg); opacity: 0.8; }
}

@keyframes soundWave {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.8; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

/* SPORTS THEME ANIMATIONS */
@keyframes sportsItemBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
    25% { transform: translateY(-20px) rotate(10deg); opacity: 1; }
    50% { transform: translateY(-10px) rotate(-10deg); opacity: 0.9; }
    75% { transform: translateY(-25px) rotate(5deg); opacity: 1; }
}

@keyframes trophyCelebration {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    25% { transform: scale(1.2) rotate(90deg); opacity: 1; }
    50% { transform: scale(1) rotate(180deg); opacity: 0.9; }
    75% { transform: scale(1.1) rotate(270deg); opacity: 1; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

@keyframes goalPostSway {
    0%, 100% { transform: rotate(0deg); opacity: 0.7; }
    25% { transform: rotate(3deg); opacity: 0.9; }
    50% { transform: rotate(0deg); opacity: 0.7; }
    75% { transform: rotate(-3deg); opacity: 0.9; }
}

/* CHARACTER EFFECTS */
@keyframes lunaTrail {
    0% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1; 
    }
    100% { 
        transform: translate(-50%, -50%) translateY(-100px) scale(0); 
        opacity: 0; 
    }
}

@keyframes binaryFall {
    0% { top: -20px; opacity: 0.6; }
    100% { top: 100%; opacity: 0; }
}

/* SPECIAL EFFECTS */
@keyframes sparkleTrailEffect {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    100% { transform: scale(2) rotate(180deg); opacity: 0; }
}

@keyframes advancedSparkleBurst {
    0% { 
        transform: translate(0, 0) scale(0.2) rotate(0deg); 
        opacity: 1; 
    }
    50% { 
        transform: translate(var(--final-x), var(--final-y)) scale(var(--scale)) rotate(var(--rotation)); 
        opacity: 0.8; 
    }
    100% { 
        transform: translate(calc(var(--final-x) * 1.5), calc(var(--final-y) * 1.5)) scale(0) rotate(calc(var(--rotation) * 2)); 
        opacity: 0; 
    }
}

@keyframes trailSparkleFade {
    0% { 
        transform: scale(0.5) rotate(0deg); 
        opacity: 0.7; 
    }
    50% { 
        transform: scale(1) rotate(180deg); 
        opacity: 0.4; 
    }
    100% { 
        transform: scale(0.2) rotate(360deg); 
        opacity: 0; 
    }
}

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

/* THEME-SPECIFIC CELEBRATION OVERRIDES */
.theme-animals .celebration-emoji {
    filter: hue-rotate(30deg) brightness(1.2);
}

.theme-space .celebration-emoji {
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.8));
}

.theme-underwater .celebration-emoji {
    filter: hue-rotate(180deg) saturate(1.5);
}

.theme-candy .celebration-emoji {
    filter: hue-rotate(320deg) brightness(1.3) saturate(1.4);
}

.theme-unicorn .celebration-emoji {
    filter: hue-rotate(280deg) brightness(1.2) saturate(1.6);
}

.theme-aviation .celebration-emoji {
    filter: hue-rotate(200deg) brightness(1.1) saturate(1.2);
}

.theme-music .celebration-emoji {
    filter: hue-rotate(270deg) brightness(1.3) saturate(1.5);
}

.theme-sports .celebration-emoji {
    filter: hue-rotate(30deg) brightness(1.4) saturate(1.3);
}

/* Theme-specific celebration animations */
@keyframes animalCelebration {
    0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 1; }
    50% { transform: translate(var(--random-x, 50px), -100px) scale(1.5) rotate(180deg); opacity: 1; }
    100% { transform: translate(var(--random-x, 100px), -200px) scale(0.5) rotate(360deg); opacity: 0; }
}

@keyframes spaceCelebration {
    0% { 
        transform: translate(0, 0) scale(0); 
        opacity: 1; 
        filter: brightness(2) drop-shadow(0 0 20px white);
    }
    100% { 
        transform: translate(
            calc(var(--random-angle, 45deg) * 200px), 
            -300px
        ) scale(2) rotate(720deg); 
        opacity: 0; 
        filter: brightness(0);
    }
}

@keyframes waterCelebration {
    0% { 
        transform: translateY(0) translateX(0) scale(0); 
        opacity: 0.8; 
    }
    50% {
        transform: translateY(-150px) translateX(30px) scale(1.3);
        opacity: 1;
    }
    100% { 
        transform: translateY(-300px) translateX(-20px) scale(0); 
        opacity: 0; 
    }
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .game-container { 
        padding: 8px; 
        margin-top: 40px; 
        min-height: calc(100vh - 50px);
        overflow-y: visible;
    }
    
    /* Compact header for mobile */
    .game-bar {
        padding: 8px 10px;
        height: 45px;
        min-height: 45px;
    }
    
    .game-title {
        display: none !important;
    }
    
    /* Hide mini-games on mobile */
    .minigame-trigger {
        display: none !important;
    }
    
    .progress-badges {
        gap: 6px;
    }
    
    .badge {
        padding: 4px 8px;
        min-width: 60px;
        font-size: 0.8rem;
    }
    
    .badge-icon {
        font-size: 1rem;
    }
    
    .badge-value {
        font-size: 0.9rem;
    }
    .analog-clock { width: 140px !important; height: 140px !important; }
    .time-input { width: 70px !important; height: 55px !important; font-size: 1.6rem !important; }
    .question-content { font-size: 1.3rem; }
    .timmy-speech-bubble { padding: 15px 20px; margin-left: 50px; }
    .mascot-container { bottom: -25px; left: 15px; }
    .badge { padding: 8px 15px; min-width: 85px; }
    .badge-icon { font-size: 1.4rem; }
    .badge-value { font-size: 1.1rem; }
    
    /* Larger touch targets for mobile */
    .icon-button {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
        margin: 5px !important;
    }
    
    /* Better spacing for mobile */
    .game-bar-left, .game-bar-right {
        gap: 8px;
    }
    
    /* Optimize speech bubble for mobile */
    .timmy-speech-bubble {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    /* Better spacing for scrollable content */
    .clock-playground {
        margin-bottom: 20px;
        padding: 25px;
    }
    
    .answer-zone {
        margin-bottom: 20px;
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .game-container { 
        padding: 5px; 
        margin-top: 35px; 
        min-height: calc(100vh - 45px);
        overflow-y: visible;
    }
    
    /* Ultra-compact header for small mobile */
    .game-bar {
        padding: 6px 8px;
        height: 40px;
        min-height: 40px;
    }
    
    .game-title {
        display: none !important;
    }
    
    /* Hide mini-games on small mobile */
    .minigame-trigger {
        display: none !important;
    }
    
    .progress-badges {
        gap: 4px;
    }
    
    .badge {
        padding: 3px 6px;
        min-width: 50px;
        font-size: 0.7rem;
    }
    
    .badge-icon {
        font-size: 0.9rem;
    }
    
    .badge-value {
        font-size: 0.8rem;
    }
    .analog-clock { width: 120px !important; height: 120px !important; }
    .time-input { width: 60px !important; height: 50px !important; font-size: 1.4rem !important; }
    .question-content { font-size: 1.2rem; }
    .timmy-speech-bubble { padding: 12px 18px; margin-left: 40px; font-size: 1rem; }
    .mascot-container { bottom: -30px; left: 10px; }
    .badge { padding: 6px 12px; min-width: 75px; }
    .badge-icon { font-size: 1.2rem; }
    .badge-value { font-size: 1rem; }
    
    /* Even larger touch targets for small mobile */
    .icon-button {
        width: 55px !important;
        height: 55px !important;
        font-size: 1.6rem !important;
        margin: 3px !important;
    }
    
    /* Compact header for small screens */
    .game-bar {
        padding: 8px 5px;
    }
    
    .game-bar-left, .game-bar-right {
        gap: 5px;
    }
    
    /* Optimize progress badges for small screens */
    .progress-badges {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Better spacing for scrollable content on small screens */
    .clock-playground {
        margin-bottom: 15px;
        padding: 20px;
    }
    
    .answer-zone {
        margin-bottom: 15px;
        padding: 20px;
    }
    
    .question-card {
        margin-bottom: 15px;
    }
}

/* MOBILE-FRIENDLY IMPROVEMENTS */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
}

/* Prevent zoom on input focus */
input, button, select, textarea {
    font-size: 16px !important;
}

/* Better touch targets */
button, .icon-button, .badge {
    min-height: 44px;
    min-width: 44px;
}

/* Mobile-specific scrolling improvements */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }
    
    html {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .game-container {
        overflow-y: visible;
        height: auto;
        min-height: calc(100vh - 80px);
    }
    
    /* Better spacing for scrollable content */
    .clock-playground, .answer-zone, .question-card {
        margin-bottom: 20px;
    }
    
    /* Ensure content doesn't get cut off */
    .progress-section {
        margin-bottom: 15px;
    }
}

/* ============================================
   CHAT MODAL STYLES
   ============================================ */

.chat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.chat-modal.active {
    display: flex;
}

.chat-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 500px;
    height: 80vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.chat-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.chat-mascot-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-mascot-emoji {
    font-size: 2.5rem;
    animation: bounce 2s infinite;
}

.chat-header h2 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.chat-header .close {
    background: rgba(255, 107, 107, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-header .close:hover {
    background: rgba(255, 107, 107, 0.6);
    transform: rotate(90deg);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.chat-message {
    display: flex;
    gap: 12px;
    animation: slideInMessage 0.3s ease;
}

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

.message-avatar {
    font-size: 2rem;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.message-content {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 70%;
    font-size: 1rem;
    line-height: 1.5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.mascot-message .message-content {
    background: linear-gradient(135deg, #FFE4B5 0%, #FFD700 100%);
    color: #333;
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a4a8 100%);
}

.user-message .message-content {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a4a8 100%);
    color: white;
    border: 2px solid rgba(78, 205, 196, 0.5);
}

.chat-loading {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.loading-dots {
    display: flex;
    gap: 5px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: loadingDot 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingDot {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-loading span {
    color: white;
    font-size: 0.9rem;
}

.chat-input-container {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 10px;
    align-items: center;
}

#chat-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    outline: none;
    transition: all 0.3s ease;
}

#chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    background: white;
}

#chat-input::placeholder {
    color: #999;
}

.chat-send-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ffed4e 100%);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.chat-quick-questions {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-question-btn {
    padding: 8px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
    white-space: nowrap;
}

.quick-question-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

/* Chat button in game bar */
.chat-btn {
    position: relative;
}

.chat-btn::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #51cf66;
    border: 2px solid white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .chat-content {
        width: 100%;
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }

    .chat-header h2 {
        font-size: 1.2rem;
    }

    .chat-mascot-emoji {
        font-size: 2rem;
    }

    .message-content {
        max-width: 80%;
        font-size: 0.95rem;
    }

    .quick-question-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* ============================================ */
/* ⏱️ SPEED SCORING & TIMER SYSTEM */
/* ============================================ */

.speed-timer-container {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.speed-timer-ring {
    position: relative;
    width: 80px;
    height: 80px;
    transition: all 0.3s ease;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-background {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: #4CAF50;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 282.7;
    stroke-dashoffset: 0;
    transition: stroke 0.3s ease, stroke-dashoffset 0.1s linear;
}

/* Color-coded timer states */
.timer-fast .timer-progress {
    stroke: #4CAF50; /* Green - Fast! */
    filter: drop-shadow(0 0 8px rgba(76, 175, 80, 0.6));
}

.timer-medium .timer-progress {
    stroke: #FFC107; /* Yellow - Medium */
    filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.6));
}

.timer-slow .timer-progress {
    stroke: #f44336; /* Red - Slow */
    filter: drop-shadow(0 0 8px rgba(244, 67, 54, 0.6));
    animation: timerPulse 0.5s infinite;
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.timer-seconds {
    font-size: 1.4rem;
}

/* Speed Combo Indicator */
.speed-combo {
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.speed-combo.show {
    opacity: 1;
    transform: scale(1);
}

.speed-combo.combo-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    animation: comboPulse 0.5s ease-in-out infinite;
}

.speed-combo.combo-mega {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    animation: comboMegaPulse 0.4s ease-in-out infinite;
}

.speed-combo.combo-godlike {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    font-size: 1.3rem;
    animation: comboGodlikePulse 0.3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

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

@keyframes comboMegaPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(245, 87, 108, 0.6); }
    50% { transform: scale(1.08); box-shadow: 0 0 25px rgba(245, 87, 108, 0.8); }
}

@keyframes comboGodlikePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
    50% { transform: scale(1.1); box-shadow: 0 0 35px rgba(255, 215, 0, 1); }
}

/* Speed Bonus Notification */
.speed-bonus-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 10000;
    text-align: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.speed-bonus-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.speed-bonus-time {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Speed Particles */
.speed-particle {
    position: fixed;
    font-size: 1.5rem;
    pointer-events: none;
    z-index: 9999;
    animation: speedParticleFloat 1.5s ease-out forwards;
}

@keyframes speedParticleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.5);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .speed-timer-ring {
        width: 60px;
        height: 60px;
    }

    .timer-text {
        font-size: 1rem;
    }

    .timer-seconds {
        font-size: 1.1rem;
    }

    .speed-combo {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    .speed-combo.combo-godlike {
        font-size: 1rem;
    }

    .speed-bonus-notification {
        padding: 15px 20px;
        max-width: 80%;
    }

    .speed-bonus-title {
        font-size: 1.2rem;
    }

    .speed-bonus-time {
        font-size: 0.9rem;
    }

    .speed-particle {
        font-size: 1.2rem;
    }
}

/* ============================================
   🎁 UNLOCKABLES SYSTEM STYLES
   ============================================ */
.unlockables-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.unlockables-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-unlockables {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5em;
    cursor: pointer;
}

.unlockables-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.unlock-tab {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.unlock-tab.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.unlockables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.unlockable-item {
    border: 2px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.unlockable-item.unlocked {
    border-color: #28a745;
    background: #f0fff4;
}

.unlockable-item.locked {
    opacity: 0.7;
}

.unlock-emoji {
    font-size: 3em;
    margin-bottom: 10px;
}

.unlock-name {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.unlock-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.unlock-cost {
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
}

.unlock-button {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.unlock-button:hover {
    background: #0056b3;
}

.unlockable-item.unlocked .unlock-button {
    background: #28a745;
}

/* Clock Skins */
.clock-neon {
    box-shadow: 0 0 20px #00ffff;
    border: 3px solid #00ffff !important;
}

.clock-wooden {
    background: linear-gradient(135deg, #8B4513, #D2691E) !important;
    border: 5px solid #654321 !important;
}

.clock-space {
    background: linear-gradient(135deg, #000428, #004e92) !important;
    border: 3px solid #ffd700 !important;
}

.clock-digital {
    background: linear-gradient(135deg, #333, #666) !important;
    border: 3px solid #0f0 !important;
}

.clock-gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e) !important;
    border: 5px solid #b8860b !important;
}

/* ============================================
   👥 SOCIAL FEATURES STYLES
   ============================================ */
.daily-challenge-modal, .share-modal, .challenge-results-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.daily-challenge-content, .share-content, .challenge-results-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
}

.challenge-info {
    margin: 20px 0;
}

.challenge-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.start-challenge-btn, .close-challenge-btn, .copy-share-btn, .close-share-btn, .close-results-btn {
    padding: 15px 30px;
    margin: 10px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.start-challenge-btn {
    background: #28a745;
    color: white;
}

.close-challenge-btn, .close-share-btn, .close-results-btn {
    background: #6c757d;
    color: white;
}

.copy-share-btn {
    background: #007bff;
    color: white;
}

.challenge-progress {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 999;
    display: none; /* Hidden by default, shown only during challenges */
}

.challenge-progress.active {
    display: block;
}

.challenge-header {
    display: flex;
    gap: 20px;
    align-items: center;
}

.share-text {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    white-space: pre-line;
    font-family: monospace;
}

/* ============================================
   🧩 PUZZLE VARIATIONS STYLES
   ============================================ */
.puzzle-mirror {
    transform: scaleX(-1);
}

.puzzle-backwards .clock-number {
    transition: all 0.5s;
}

.puzzle-rotated {
    transition: transform 0.5s;
}

.puzzle-missing .clock-number {
    transition: opacity 0.5s, color 0.5s;
}

.puzzle-scrambled .clock-number {
    transition: all 0.5s;
}

/* ============================================
   🏁 CLOCK RACING GAME STYLES
   ============================================ */
.clock-racing-game {
    padding: 20px;
    text-align: center;
}

.racing-header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.racing-instructions {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.racing-clock {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 20px auto;
    border: 5px solid #333;
    border-radius: 50%;
    background: white;
}

.racing-track {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px dashed #007bff;
    opacity: 0.3;
}

.racing-player {
    position: absolute;
    font-size: 2em;
    transform: translate(-50%, -50%);
    transition: all 0.3s;
    z-index: 10;
}

.racing-items {
    position: relative;
    width: 100%;
    height: 100%;
}

.racing-item {
    position: absolute;
    font-size: 1.5em;
    transform: translate(-50%, -50%);
    transition: all 0.3s;
    animation: pulse 1s infinite;
}

.racing-item.token {
    filter: drop-shadow(0 0 5px gold);
}

.racing-item.obstacle {
    filter: drop-shadow(0 0 5px red);
}

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

.racing-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.racing-control-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.racing-control-btn:hover {
    background: #0056b3;
}

.clock-racing-results {
    padding: 40px;
    text-align: center;
}

.results-stats {
    margin: 30px 0;
    font-size: 1.2em;
}

.close-racing-btn {
    padding: 15px 40px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1em;
}

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

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .unlockables-content {
        padding: 20px;
        max-width: 90%;
    }

    .unlockables-grid {
        grid-template-columns: 1fr;
    }

    .racing-clock {
        width: 250px;
        height: 250px;
    }

    .racing-control-btn {
        padding: 10px 20px;
        font-size: 1em;
    }
}

/* ============================================
   ⚖️ PENDULUM PHYSICS GAME STYLES
   ============================================ */
.pendulum-physics-game {
    padding: 20px;
    text-align: center;
}

.pendulum-header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pendulum-target {
    font-size: 1.3em;
    font-weight: bold;
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.pendulum-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pendulum-clock {
    position: relative;
    width: 350px;
    height: 350px;
    border: 5px solid #333;
    border-radius: 50%;
    background: white;
}

.clock-numbers {
    position: relative;
    width: 100%;
    height: 100%;
}

.hour-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    left: calc(50% - 15px);
    top: calc(50% - 15px);
    transform-origin: center center;
    transform: rotate(var(--angle)) translateY(-140px);
    font-weight: bold;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pendulum-arm {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 140px;
    background: linear-gradient(to bottom, #333, #666);
    transform-origin: top center;
    transform: translate(-50%, 0) rotate(0deg);
    transition: transform 0.1s linear;
}

.pendulum-bob {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #ffd700, #daa520);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.target-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 140px;
    background: rgba(40, 167, 69, 0.5);
    transform-origin: top center;
    transform: translate(-50%, 0) rotate(0deg);
    pointer-events: none;
    display: none;
}

.target-indicator::after {
    content: '🎯';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5em;
}

.pendulum-controls {
    margin: 30px 0;
}

.power-meter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.power-label {
    font-weight: bold;
    font-size: 1.1em;
}

.power-bar {
    width: 300px;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.power-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #ffc107, #dc3545);
    width: 0%;
    transition: width 0.05s linear;
}

.power-value {
    font-weight: bold;
    min-width: 50px;
}

.launch-btn {
    padding: 15px 40px;
    font-size: 1.3em;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.launch-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

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

.pendulum-instructions {
    margin: 20px 0;
    padding: 15px;
    background: #fff3cd;
    border-radius: 10px;
    border: 2px solid #ffc107;
}

.pendulum-feedback {
    margin-top: 20px;
    font-size: 1.3em;
    font-weight: bold;
    min-height: 40px;
}

.pendulum-results {
    padding: 40px;
    text-align: center;
}

.close-pendulum-btn {
    padding: 15px 40px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 20px;
}

/* ============================================
   🌍 TIME TRAVEL ADVENTURE STYLES
   ============================================ */
.time-travel-game {
    padding: 20px;
    text-align: center;
}

.travel-header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.era-display {
    padding: 30px;
    border-radius: 20px;
    margin: 20px 0;
    background: linear-gradient(135deg, #8B7355, #A0826D);
    color: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.era-emoji {
    font-size: 4em;
    margin-bottom: 10px;
}

.era-name {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.era-description {
    font-size: 1.2em;
    opacity: 0.9;
}

.time-puzzle {
    margin: 30px 0;
}

.puzzle-question {
    font-size: 1.2em;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    line-height: 1.6;
}

.puzzle-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    max-width: 700px;
    margin: 0 auto;
}

.time-option-btn {
    padding: 20px;
    font-size: 1.3em;
    background: white;
    color: #333;
    border: 3px solid #007bff;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.time-option-btn:hover {
    background: #007bff;
    color: white;
    transform: scale(1.05);
}

.travel-feedback {
    margin-top: 20px;
    font-size: 1.4em;
    font-weight: bold;
    min-height: 50px;
}

.time-travel-results {
    padding: 40px;
    text-align: center;
}

.artifacts-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.artifact {
    font-size: 3em;
    padding: 10px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.close-travel-btn {
    padding: 15px 40px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 20px;
}

/* ============================================
   🎵 MUSICAL CLOCKS GAME STYLES
   ============================================ */
.musical-clocks-game {
    padding: 20px;
    text-align: center;
}

.musical-header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.rhythm-instructions {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #007bff;
}

.rhythm-track {
    position: relative;
    height: 400px;
    background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.clock-lane {
    display: flex;
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.lane-position {
    flex: 1;
    position: relative;
    border-right: 1px solid #ccc;
}

.lane-number {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
    background: white;
    padding: 5px 10px;
    border-radius: 8px;
    z-index: 10;
}

.hit-zone {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(40, 167, 69, 0.2);
    border: 2px solid #28a745;
    border-left: none;
    border-right: none;
}

.notes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.rhythm-note {
    position: absolute;
    font-size: 2em;
    transform: translate(-50%, -50%);
    transition: all 0.05s linear;
    z-index: 5;
}

.rhythm-note.hit {
    animation: noteHit 0.2s ease-out;
}

.rhythm-note.missed {
    opacity: 0.3;
}

@keyframes noteHit {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.5); }
    100% { transform: translate(-50%, -50%) scale(0); }
}

.rhythm-controls {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.rhythm-key {
    width: 60px;
    height: 60px;
    background: white;
    border: 3px solid #007bff;
    border-radius: 10px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s;
}

.rhythm-key:hover {
    background: #e7f3ff;
}

.rhythm-key:active {
    transform: scale(0.9);
    background: #007bff;
    color: white;
}

.musical-feedback {
    margin-top: 20px;
    font-size: 1.5em;
    font-weight: bold;
    min-height: 40px;
    transition: opacity 0.3s;
}

.musical-feedback.success {
    color: #28a745;
}

.musical-results {
    padding: 40px;
    text-align: center;
}

.close-musical-btn {
    padding: 15px 40px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 20px;
}

/* Mobile Responsive for New Mini-games */
@media (max-width: 768px) {
    .pendulum-clock {
        width: 280px;
        height: 280px;
    }

    .hour-marker {
        transform: rotate(var(--angle)) translateY(-110px);
    }

    .pendulum-arm {
        height: 110px;
    }

    .power-bar {
        width: 200px;
    }

    .puzzle-options {
        grid-template-columns: 1fr 1fr;
    }

    .time-option-btn {
        padding: 15px;
        font-size: 1.1em;
    }

    .rhythm-track {
        height: 300px;
    }

    .rhythm-key {
        width: 45px;
        height: 45px;
        font-size: 1em;
    }

    .lane-number {
        font-size: 0.9em;
    }
}
