body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
    width: 100%;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

.stats-bar {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 30px;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-top: 10px;
}

.game-area {
    width: 95%;
    max-width: 1400px;
    margin-bottom: 40px;
}

.images-wrapper {
    display: flex;
    gap: 30px;
    justify-content: center;
    width: 100%;
}

.image-panel {
    position: relative;
    flex: 1;
    max-width: 600px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #000;
    aspect-ratio: 1/1; /* Force square panels */
}

/* 
   THE FINAL CROP:
   Image is 2x2 grid. 
   We want Top-Left (0,0) and Top-Right (100,0) quadrants.
*/
.puzzle-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('pictures/game_pair_v2.png');
    background-size: 200% 200%; /* Make each quadrant fill the panel */
    background-repeat: no-repeat;
    pointer-events: none;
}

#view-1 {
    background-position: 0% 0%; /* Top-Left */
}

#view-2 {
    background-position: 100% 0%; /* Top-Right */
}

.click-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 10;
}

.difference-circle {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 6px solid #ff4757;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.8);
    pointer-events: none;
    animation: bounceIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
}

@keyframes bounceIn {
    0% { transform: translate(-50%, -50%) scale(0); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Win Overlay */
.win-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.win-content {
    background: white;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    color: #2f3542;
    max-width: 400px;
    width: 90%;
}

.hidden { display: none !important; }

/* Responsive Grid - STACK VERTICALLY ON MOBILE */
@media (max-width: 900px) {
    .images-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .image-panel {
        width: 100%;
        max-width: 500px;
    }
    .game-container {
        padding-top: 60px;
    }
    .stats-bar {
        font-size: 1.2rem;
    }
    .difference-circle {
        width: 48px;
        height: 48px;
    }
}
