/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f4ebe4;
    --secondary-color: #f5c38b;
    --accent-color: #b27c4d;
    --dark-color: #3b2f2f;
    --light-color: #f5d6a6;
    --text-color: #5c5146;
    --highlight-color: #ff6b6b;
    --shadow: 4px 4px 0px var(--accent-color);
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #f4ebe4 0%, #f9f3ee 100%);
    font-family: 'Press Start 2P', cursive, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    overflow-x: hidden;
}

/* ===== CONFETTI ANIMATION ===== */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--highlight-color);
    top: -10px;
    opacity: 0;
    animation: confetti-fall 3s infinite linear;
}

.confetti:nth-child(1) {
    left: 20%;
    background-color: #ff6b6b;
    animation-delay: 0s;
}

.confetti:nth-child(2) {
    left: 50%;
    background-color: #4ecdc4;
    animation-delay: 1s;
}

.confetti:nth-child(3) {
    left: 80%;
    background-color: #ffe66d;
    animation-delay: 2s;
}

@keyframes confetti-fall {
    0% {
        top: -10px;
        opacity: 1;
        transform: rotate(0deg);
    }
    100% {
        top: 100vh;
        opacity: 0;
        transform: rotate(360deg);
    }
}

/* ===== CONTAINER ===== */
.container {
    background: var(--primary-color);
    padding: 30px 25px;
    border-radius: 20px;
    border: 4px solid var(--accent-color);
    box-shadow: var(--shadow), 0 10px 30px rgba(178, 124, 77, 0.2);
    max-width: 400px;
    width: 100%;
    position: relative;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

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

/* ===== TITLE ===== */
.title {
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.5;
    color: var(--dark-color);
    text-shadow: 2px 2px 0px rgba(178, 124, 77, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

/* ===== CHARACTER ===== */
.character-container {
    position: relative;
    margin: 0 auto 25px;
    width: 160px;
}

.character {
    width: 100%;
    image-rendering: pixelated;
    filter: drop-shadow(0 5px 15px rgba(178, 124, 77, 0.3));
    transition: transform 0.3s ease;
}

.character:hover {
    transform: scale(1.05);
}

.sparkle {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23ffe66d" d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z"/></svg>');
    animation: sparkle 1.5s infinite;
}

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

/* ===== AGE ===== */
.age {
    font-size: 14px;
    margin-bottom: 30px;
    color: var(--text-color);
    padding: 10px 20px;
    background: var(--light-color);
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    display: inline-block;
}

.highlight {
    color: var(--highlight-color);
    animation: highlight-pulse 1.5s infinite;
}

@keyframes highlight-pulse {
    0%, 100% { text-shadow: 0 0 5px rgba(255, 107, 107, 0.5); }
    50% { text-shadow: 0 0 15px rgba(255, 107, 107, 0.8); }
}

/* ===== BUTTON ===== */
.start-btn {
    padding: 15px 30px;
    font-family: 'Press Start 2P', cursive;
    font-size: 13px;
    border: 3px solid var(--accent-color);
    background: linear-gradient(135deg, var(--secondary-color) 0%, #f2b975 100%);
    color: var(--dark-color);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0px var(--accent-color);
    background: linear-gradient(135deg, #f2b975 0%, #f0ad64 100%);
}

.start-btn:active {
    transform: translateY(2px);
    box-shadow: 2px 2px 0px var(--accent-color);
}

.start-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.start-btn:hover::after {
    left: 100%;
}

.btn-text {
    margin-right: 10px;
}

.btn-icon {
    font-size: 16px;
}

/* ===== FOOTER ===== */
.footer {
    font-size: 9px;
    color: var(--text-color);
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--light-color);
    opacity: 0.8;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
        margin: 10px;
    }
    
    .title {
        font-size: 14px;
    }
    
    .character-container {
        width: 140px;
    }
    
    .age {
        font-size: 12px;
    }
    
    .start-btn {
        padding: 12px 20px;
        font-size: 11px;
    }
    
    .footer {
        font-size: 8px;
    }
}

@media (max-width: 320px) {
    .title {
        font-size: 12px;
    }
    
    .character-container {
        width: 120px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .confetti, .start-btn, .footer {
        display: none;
    }
    
    .container {
        border: none;
        box-shadow: none;
    }
}