/* Game Styles */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #4CAF50;
    --text-color: white;
}

/* Theme Definitions */
body.theme-default {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    background: 
        /* Main galaxy spiral */
        radial-gradient(ellipse 40% 80% at 50% 50%, 
            rgba(255, 180, 120, 0.8) 0%, 
            rgba(255, 120, 180, 0.6) 20%, 
            rgba(120, 180, 255, 0.4) 40%, 
            transparent 70%),
        /* Outer galaxy arms */
        radial-gradient(ellipse 80% 40% at 30% 60%, 
            rgba(180, 120, 255, 0.3) 0%, 
            rgba(120, 200, 255, 0.2) 30%, 
            transparent 60%),
        radial-gradient(ellipse 60% 30% at 70% 40%, 
            rgba(255, 150, 120, 0.3) 0%, 
            rgba(255, 180, 150, 0.2) 40%, 
            transparent 70%),
        /* Star field background */
        radial-gradient(1px 1px at 20% 30%, white, transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 90% 40%, rgba(200,200,255,0.8), transparent),
        radial-gradient(1px 1px at 130% 80%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160% 30%, rgba(255,200,200,0.7), transparent),
        /* Deep space background */
        linear-gradient(135deg, 
            #0a0a1a 0%, 
            #1a1a3a 25%, 
            #2a1a4a 50%, 
            #1a2a3a 75%, 
            #0a0a2a 100%);
    background-size: 
        100% 100%,
        100% 100%, 
        100% 100%,
        200px 200px,
        300px 300px,
        400px 400px,
        250px 250px,
        350px 350px,
        100% 100%;
    background-position: 
        center center,
        center center,
        center center,
        0 0,
        50px 50px,
        100px 100px,
        150px 150px,
        200px 200px,
        center center;
    background-attachment: fixed;
    background-repeat: 
        no-repeat,
        no-repeat,
        no-repeat,
        repeat,
        repeat,
        repeat,
        repeat,
        repeat,
        no-repeat;
    position: relative;
    animation: galaxyPulse 20s ease-in-out infinite;
}

@keyframes galaxyPulse {
    0%, 100% { 
        filter: brightness(1) hue-rotate(0deg);
    }
    25% {
        filter: brightness(1.1) hue-rotate(5deg);
    }
    50% {
        filter: brightness(0.9) hue-rotate(-5deg);
    }
    75% {
        filter: brightness(1.05) hue-rotate(3deg);
    }
}

/* Add subtle overlay for better readability on galaxy background */
body.theme-default::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 20, 0.2);
    pointer-events: none;
    z-index: -1;
}

body.theme-sunset {
    --primary-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fad0c4 100%);
    --primary-color: #ff9a9e;
    --secondary-color: #fad0c4;
}

body.theme-ocean {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    --primary-color: #667eea;
    --secondary-color: #4facfe;
}

body.theme-forest {
    --primary-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --primary-color: #11998e;
    --secondary-color: #38ef7d;
}

body.theme-cherry {
    --primary-gradient: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --primary-color: #ffecd2;
    --secondary-color: #fcb69f;
}

body.theme-midnight {
    --primary-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
}

body.theme-gold {
    --primary-gradient: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    --primary-color: #f7971e;
    --secondary-color: #ffd200;
}

body.theme-retro {
    --primary-gradient: linear-gradient(135deg, #ff0084 0%, #33001b 100%);
    --primary-color: #ff0084;
    --secondary-color: #33001b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    transition: all 0.5s ease;
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
}

.theme-button {
    padding: 10px 15px;
    font-size: 0.9rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.theme-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.gabriel-button {
    padding: 10px 15px;
    font-size: 0.9rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.gabriel-button:hover:not(.disabled) {
    background: linear-gradient(45deg, #ee5a52, #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.gabriel-button.disabled {
    background: linear-gradient(45deg, #666, #555);
    cursor: not-allowed;
    opacity: 0.6;
}

.gabriel-button.disabled::after {
    content: attr(data-cooldown);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.gabriel-button.playing {
    animation: pulse-gabriel 0.5s ease-in-out infinite alternate;
}

@keyframes pulse-gabriel {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    }
    100% { 
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
    }
}

.score {
    font-size: 1.2rem;
    font-weight: bold;
}

.lives {
    display: flex;
    gap: 5px;
}

.heart {
    width: 24px;
    height: 24px;
    display: inline-block;
    position: relative;
    transition: all 0.5s ease;
    animation: heartbeat 1.5s infinite;
    background: transparent;
}

.heart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 2px;
    background: #000;
    box-shadow:
        /* Row 1 */
        4px 0px #000, 10px 0px #000, 14px 0px #000,
        /* Row 2 */
        0px 2px #000, 2px 2px #ff4444, 4px 2px #ff6666, 6px 2px #000,
        8px 2px #ff4444, 10px 2px #ff6666, 12px 2px #ff4444, 14px 2px #000,
        16px 2px #ff6666, 18px 2px #ff4444, 20px 2px #000,
        /* Row 3 */
        0px 4px #000, 2px 4px #ff6666, 4px 4px #ffffff, 6px 4px #ff4444,
        8px 4px #ff6666, 10px 4px #ff4444, 12px 4px #ff6666, 14px 4px #ff4444,
        16px 4px #ff6666, 18px 4px #ff4444, 20px 4px #ff6666, 22px 4px #000,
        /* Row 4 */
        0px 6px #000, 2px 6px #ff4444, 4px 6px #ff4444, 6px 6px #ff6666,
        8px 6px #ff4444, 10px 6px #ff4444, 12px 6px #ff4444, 14px 6px #ff4444,
        16px 6px #ff4444, 18px 6px #ff6666, 20px 6px #ff4444, 22px 6px #000,
        /* Row 5 */
        2px 8px #000, 4px 8px #ff4444, 6px 8px #ff4444, 8px 8px #ff4444,
        10px 8px #ff4444, 12px 8px #ff4444, 14px 8px #ff4444, 16px 8px #ff4444,
        18px 8px #ff4444, 20px 8px #000,
        /* Row 6 */
        4px 10px #000, 6px 10px #ff4444, 8px 10px #ff4444, 10px 10px #ff4444,
        12px 10px #ff4444, 14px 10px #ff4444, 16px 10px #ff4444, 18px 10px #000,
        /* Row 7 */
        6px 12px #000, 8px 12px #ff4444, 10px 12px #ff4444, 12px 12px #ff4444,
        14px 12px #ff4444, 16px 12px #000,
        /* Row 8 */
        8px 14px #000, 10px 14px #ff4444, 12px 14px #ff4444, 14px 14px #000,
        /* Row 9 */
        10px 16px #000, 12px 16px #ff4444, 14px 16px #000,
        /* Row 10 */
        12px 18px #000;
        
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.heart.lost {
    opacity: 0;
    transform: scale(0) rotate(180deg);
    animation: disappear 0.5s ease-out forwards;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes disappear {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2) rotate(90deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(180deg);
    }
}

.timer-container {
    text-align: center;
    margin-bottom: 30px;
}

.timer {
    font-size: 1.5rem;
    font-weight: bold;
    background: rgba(255, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.timer.warning {
    background: rgba(255, 165, 0, 0.3);
    animation: pulse 1s infinite;
}

.timer.danger {
    background: rgba(255, 0, 0, 0.4);
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.word-display {
    text-align: center;
    margin-bottom: 30px;
}

#word-stripes {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.letter-stripe {
    width: 40px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.letter-stripe.revealed {
    background: rgba(0, 255, 0, 0.3);
    border-color: #00ff00;
    animation: reveal 0.5s ease;
}

.letter-stripe.hint {
    background: rgba(255, 255, 0, 0.3);
    border-color: #ffff00;
    animation: hint-glow 1s ease;
}

@keyframes reveal {
    0% {
        transform: rotateY(90deg);
        background: rgba(255, 255, 255, 0.2);
    }
    100% {
        transform: rotateY(0deg);
        background: rgba(0, 255, 0, 0.3);
    }
}

@keyframes hint-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 255, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 255, 0, 0.8); }
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#word-input {
    flex: 1;
    padding: 15px;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

#word-input:focus {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

button {
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
}

#submit-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

#hint-btn {
    background: linear-gradient(45deg, #ff9800, #f57c00);
    margin-bottom: 15px;
    width: 100%;
}

.hint-section {
    margin-bottom: 20px;
    text-align: center;
}

#hint-display {
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 30px;
    background: rgba(255, 255, 0, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
}

.game-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.game-controls button {
    flex: 1;
}

#new-game-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

#skip-word-btn {
    background: linear-gradient(45deg, #f44336, #d32f2f);
}

#mini-game-btn {
    background: linear-gradient(45deg, #9c27b0, #7b1fa2);
}

#drawing-game-btn {
    background: linear-gradient(45deg, #ff5722, #d84315);
}

#clicker-game-btn {
    background: linear-gradient(45deg, #e91e63, #ad1457);
}

.feedback {
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    min-height: 30px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feedback.correct {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    border: 1px solid #00ff00;
}

.feedback.incorrect {
    background: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
}

.feedback.info {
    background: rgba(0, 123, 255, 0.2);
    color: #007bff;
    border: 1px solid #007bff;
}

/* Game Over Modal */
.game-over-modal, .mini-game-modal, .drawing-game-modal, .theme-modal, .clicker-game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.game-over-modal.show, .mini-game-modal.show, .drawing-game-modal.show, .theme-modal.show, .clicker-game-modal.show {
    display: flex;
    animation: fadeIn 0.5s ease;
}

.modal-content {
    background: var(--primary-gradient);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.mini-game-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.drawing-game-content {
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    overflow-y: auto;
    padding: 20px;
}

/* Drawing Game Styles */
.drawing-toolbar {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    align-items: start;
}

.tool-section h3, .size-section h3, .color-section h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: white;
}

.tools {
    display: flex;
    gap: 8px;
}

.tool-btn {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.tool-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.size-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#brush-size {
    width: 100px;
    accent-color: #4CAF50;
}

#size-display {
    color: white;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
}

.color-palette {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.color-row {
    display: flex;
    gap: 5px;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.color-swatch.active {
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.7);
    transform: scale(1.1);
}

.color-swatch.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.custom-color {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-color label {
    color: white;
    font-weight: bold;
}

#color-picker {
    width: 50px;
    height: 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.canvas-container {
    text-align: center;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#drawing-canvas {
    border: 2px solid #ccc;
    border-radius: 8px;
    cursor: crosshair;
    max-width: 100%;
    height: auto;
}

.drawing-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.drawing-controls button {
    flex: 1;
    max-width: 200px;
    font-size: 1rem;
}

#delete-drawing-btn {
    background: linear-gradient(45deg, #e91e63, #c2185b);
}

#clear-canvas-btn {
    background: linear-gradient(45deg, #ff9800, #f57c00);
}

#save-drawing-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

#close-drawing-game-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

/* Theme Modal Styles */
.theme-modal-content {
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.theme-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.theme-card.active {
    border-color: #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
    background: rgba(76, 175, 80, 0.1);
}

.theme-preview {
    width: 100%;
    height: 80px;
    border-radius: 10px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.theme-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    opacity: 0.8;
}

.default-preview::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sunset-preview::before {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

.ocean-preview::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
}

.forest-preview::before {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.cherry-preview::before {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.midnight-preview::before {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.gold-preview::before {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

.retro-preview::before {
    background: linear-gradient(135deg, #ff0084 0%, #33001b 100%);
}

.theme-card h3 {
    margin: 10px 0 5px 0;
    font-size: 1.2rem;
}

.theme-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.theme-controls {
    text-align: center;
    margin-top: 20px;
}

.theme-controls button {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Cat Clicker Game Styles */
.clicker-game-content {
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
}

.clicker-stats {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.click-counter h3 {
    margin: 0;
    font-size: 2rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.clicks-per-second h4 {
    margin: 0;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

.cat-container {
    text-align: center;
    margin: 40px 0;
    position: relative;
}

.cat-clicker {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.1s ease;
    position: relative;
}

.cat-clicker:hover {
    transform: scale(1.05);
}

.cat-clicker:active {
    transform: scale(0.95);
}

.cat-clicker.clicked {
    animation: catBounce 0.3s ease;
}

@keyframes catBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.cat-body {
    position: relative;
    width: 200px;
    height: 250px;
}

.cat-head {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 100px;
    background: linear-gradient(145deg, #ff9800, #f57c00);
    border-radius: 50px 50px 40px 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cat-ears {
    position: absolute;
    top: -15px;
    width: 100%;
}

.ear {
    position: absolute;
    width: 25px;
    height: 35px;
    background: linear-gradient(145deg, #ff9800, #f57c00);
    border-radius: 15px 15px 5px 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ear::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 20px;
    background: #ffb74d;
    border-radius: 8px 8px 3px 3px;
}

.left-ear {
    left: 15px;
    transform: rotate(-15deg);
}

.right-ear {
    right: 15px;
    transform: rotate(15deg);
}

.cat-face {
    position: relative;
    width: 100%;
    height: 100%;
}

.cat-eyes {
    position: absolute;
    top: 25px;
    width: 100%;
}

.eye {
    position: absolute;
    width: 15px;
    height: 20px;
    background: #2e7d32;
    border-radius: 50%;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.eye::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 3px;
    width: 8px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
}

.left-eye {
    left: 25px;
}

.right-eye {
    right: 25px;
}

.cat-nose {
    position: absolute;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 6px;
    background: #e91e63;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cat-mouth {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
}

.mouth-left, .mouth-right {
    position: absolute;
    width: 8px;
    height: 8px;
    border: 2px solid #333;
    border-top: none;
    border-radius: 0 0 50px 50px;
}

.mouth-left {
    left: -8px;
    border-right: none;
}

.mouth-right {
    right: -8px;
    border-left: none;
}

.cat-whiskers {
    position: absolute;
    top: 35px;
    width: 100%;
}

.whisker {
    position: absolute;
    height: 2px;
    background: #333;
    border-radius: 1px;
}

.w1, .w2, .w3 {
    left: -20px;
}

.w4, .w5, .w6 {
    right: -20px;
}

.w1, .w4 {
    top: 5px;
    width: 25px;
    transform: rotate(-10deg);
}

.w2, .w5 {
    top: 12px;
    width: 30px;
}

.w3, .w6 {
    top: 19px;
    width: 25px;
    transform: rotate(10deg);
}

.w4 { transform: rotate(10deg); }
.w6 { transform: rotate(-10deg); }

.cat-body-main {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 120px;
    background: linear-gradient(145deg, #ff9800, #f57c00);
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cat-paws {
    position: absolute;
    top: 180px;
    width: 100%;
}

.paw {
    position: absolute;
    width: 25px;
    height: 35px;
    background: linear-gradient(145deg, #ff9800, #f57c00);
    border-radius: 15px 15px 8px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.left-paw {
    left: 60px;
}

.right-paw {
    right: 60px;
}

.cat-tail {
    position: absolute;
    top: 100px;
    right: -30px;
    width: 20px;
    height: 80px;
    background: linear-gradient(145deg, #ff9800, #f57c00);
    border-radius: 10px;
    transform: rotate(30deg);
    transform-origin: top center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: tailWag 2s ease-in-out infinite;
}

@keyframes tailWag {
    0%, 100% { transform: rotate(30deg); }
    50% { transform: rotate(45deg); }
}

.click-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.click-effect {
    position: absolute;
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.5rem;
    animation: clickFloat 1s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes clickFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) scale(1.2);
        opacity: 0;
    }
}

.clicker-achievements {
    margin: 30px 0;
    text-align: center;
}

.clicker-achievements h4 {
    margin-bottom: 15px;
    color: white;
    font-size: 1.3rem;
}

.achievement-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.achievement.unlocked {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
    animation: achievementUnlock 0.5s ease;
}

.achievement.locked {
    opacity: 0.6;
}

@keyframes achievementUnlock {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.achievement-icon {
    font-size: 1.5rem;
}

.achievement-text {
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.clicker-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.clicker-controls button {
    flex: 1;
    max-width: 200px;
    font-size: 1rem;
}

#reset-clicker-btn {
    background: linear-gradient(45deg, #f44336, #d32f2f);
}

#close-clicker-game-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

/* Click effects */
.click-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.click-effect {
    position: absolute;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
    pointer-events: none;
    animation: clickFloat 1s ease-out forwards;
    text-shadow: 0 0 10px var(--accent-color);
}

@keyframes clickFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scale(1.5);
    }
}

/* Cat click animation */
.cat-clicker.clicked {
    animation: catBounce 0.3s ease-in-out;
}

@keyframes catBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Cat tail wag animation */
.cat-tail {
    animation: tailWag 2s ease-in-out infinite;
    transform-origin: 90% 50%;
}

@keyframes tailWag {
    0%, 100% {
        transform: rotate(-5deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-10deg);
    }
}

/* Cat ear twitch */
.cat-ear {
    animation: earTwitch 3s ease-in-out infinite;
}

.cat-ear:nth-child(1) {
    animation-delay: 0.5s;
}

.cat-ear:nth-child(2) {
    animation-delay: 1.5s;
}

@keyframes earTwitch {
    0%, 90%, 100% {
        transform: rotate(0deg);
    }
    95% {
        transform: rotate(5deg);
    }
}

.typing-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.stat {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    color: white;
}

#free-typing-area {
    width: 100%;
    height: 300px;
    padding: 20px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    resize: vertical;
    outline: none;
    margin-bottom: 20px;
}

#free-typing-area:focus {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.mini-game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.mini-game-controls button {
    flex: 1;
    max-width: 200px;
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: white;
}

.modal-content p {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: white;
}

#restart-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    font-size: 1.1rem;
    padding: 15px 30px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 600px) {
    .game-container {
        padding: 20px;
        width: 95%;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .theme-button, .gabriel-button {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .theme-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .theme-card {
        padding: 15px;
    }
    
    .theme-preview {
        height: 60px;
    }
    
    .input-section {
        flex-direction: column;
    }
    
    .game-controls {
        flex-direction: column;
    }
    
    .mini-game-content {
        width: 95%;
        padding: 20px;
    }
    
    .typing-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #free-typing-area {
        height: 200px;
        font-size: 1rem;
    }
    
    .mini-game-controls {
        flex-direction: column;
    }
    
    .drawing-game-content {
        width: 98%;
        padding: 15px;
    }
    
    .drawing-toolbar {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tools {
        justify-content: center;
    }
    
    .tool-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .color-row {
        justify-content: center;
    }
    
    .color-swatch {
        width: 25px;
        height: 25px;
    }
    
    #drawing-canvas {
        width: 100%;
        height: 300px;
    }
    
    .drawing-controls {
        flex-direction: column;
    }
    
    .clicker-game-content {
        width: 95%;
        padding: 20px;
    }
    
    .clicker-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .click-counter h3 {
        font-size: 1.5rem;
    }
    
    .cat-body {
        width: 150px;
        height: 190px;
    }
    
    .cat-head {
        width: 90px;
        height: 75px;
    }
    
    .cat-body-main {
        width: 105px;
        height: 90px;
        top: 60px;
    }
    
    .cat-paws {
        top: 135px;
    }
    
    .achievement-list {
        grid-template-columns: 1fr;
    }
    
    .clicker-controls {
        flex-direction: column;
    }
    
    .letter-stripe {
        width: 35px;
        height: 45px;
        font-size: 1.3rem;
    }
}
