:root {
    --bg-color: #0d0e15;
    --text-color: #f1f2f6;
    --primary: #ff4757;
    --accent: #ffa502;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    /* Empêche de scroller */
}

/* Typography elements */
h1 {
    font-family: 'Bangers', cursive;
    font-size: 4.5rem;
    letter-spacing: 3px;
    line-height: 1.1;
    text-shadow: 4px 4px 0px rgba(255, 71, 87, 0.5);
    margin-bottom: 30px;
}

.highlight {
    color: var(--accent);
    text-shadow: 4px 4px 0px rgba(255, 165, 2, 0.5);
    font-size: 5.5rem;
}

.subtitle {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 20px;
    font-family: 'Bangers', cursive;
    letter-spacing: 2px;
}

/* Sections */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #1b1c29 0%, #0d0e15 100%);
    padding: 20px;
}

.hero-content {
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Scratch Container */
.scratch-container {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    border: 6px solid #2f3542;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    /* Important pour le touch sur mobile eviter le scroll */
}

@media (min-width: 768px) {
    .scratch-container {
        width: 450px;
        height: 450px;
    }
}

#secret-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: grab;
}

#scratch-canvas:active {
    cursor: grabbing;
}

.instruction-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none;
    /* Laisse passer les clics vers le canvas */
    transition: opacity 0.3s;
}

.instruction-overlay h2 {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
    background: rgba(255, 71, 87, 0.8);
    padding: 10px 20px;
    border-radius: 50px;
    transform: rotate(-5deg);
    animation: pulse 1.5s infinite alternate;
}

/* Animations */
.bounce-in {
    animation: bounceIn 1.2s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

.fade-in {
    animation: fadeIn 1s ease-out 0.8s both;
}

.fade-in-delayed {
    animation: fadeIn 1s ease-out 1.2s both;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }

    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }

    40% {
        transform: scale3d(.9, .9, .9);
    }

    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }

    80% {
        transform: scale3d(.97, .97, .97);
    }

    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    from {
        transform: rotate(-5deg) scale(1);
    }

    to {
        transform: rotate(-5deg) scale(1.1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
        margin-bottom: 15px;
    }

    .highlight {
        font-size: 3.8rem;
    }

    .scratch-container {
        border-width: 4px;
    }
}