:root {
    --bg-color: #fce4ec;
    --primary: #f06292;
    --accent: #ec407a;
    --text-dark: #4a2c40;
    --white: #ffffff;
    --shadow: rgba(236, 64, 122, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    font-family: 'Quicksand', sans-serif;
    color: var(--text-dark);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    touch-action: none;
    /* Prevents scrolling while scratching */
}

/* --- Decorative Background --- */
.background-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--accent) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.15;
    z-index: 0;
}

.card-container {
    background: var(--white);
    padding: 30px;
    border-radius: 40px;
    box-shadow: 0 15px 40px var(--shadow);
    text-align: center;
    width: 350px;
    max-width: 90%;
    position: relative;
    z-index: 10;
}

.title {
    font-family: 'Outfit', sans-serif;
    color: var(--accent);
    margin-bottom: 25px;
    font-size: 1.8rem;
    animation: fadeIn 1s ease-in;
}

/* --- Scratch Layer Layout --- */
.scratch-card {
    position: relative;
    width: 280px;
    height: 380px;
    margin: 0 auto;
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.05);
}

.hidden-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #fffcfd 0%, #fff0f5 100%);
    z-index: 1;
}

.content-wrapper {
    padding: 20px;
}

.emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.reveal-title {
    font-family: 'Outfit', sans-serif;
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.reveal-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.reveal-subtext {
    font-size: 0.9rem;
    color: var(--primary);
    font-style: italic;
}

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

.instruction {
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.8;
}

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

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

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}