/* Global reset and body styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff8f8;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Main container */
.container {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

h1 {
    color: #e63946;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Scratch wrapper - 3:2 aspect ratio container for 1536x1024 image */
.scratch-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2; /* Match image dimensions (1536x1024) */
    max-width: 768px; /* Half of original size for good display */
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    /* Disable user selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Hide until overlay is ready */
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.scratch-wrap.ready {
    opacity: 1;
}

/* Hidden image underneath */
#hiddenImage {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

/* Scratch canvas overlay */
#scratchCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    /* Disable touch scrolling and actions */
    touch-action: none;
    -webkit-touch-callout: none;
}

#scratchCanvas:active {
    cursor: grabbing;
}

/* Instruction text */
.instruction {
    margin-top: 20px;
    color: #666;
    font-size: 1rem;
}

/* Reveal button - hidden by default */
.reveal-btn {
    display: none;
    margin: 30px auto 0 auto;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #e63946 0%, #ff6b7a 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(230, 57, 70, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.5s ease-in;
}

.reveal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.6);
}

.reveal-btn:active {
    transform: translateY(-1px);
}

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

/* Responsive design for smaller screens */
@media (max-width: 600px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .instruction {
        font-size: 0.9rem;
    }
}

