/* Spot the Difference - Specific Styles */

.images-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.image-wrapper {
    position: relative;
    border: 4px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    background: #F8F9FA;
}

.image-wrapper h3 {
    text-align: center;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.difference-canvas {
    width: 100%;
    height: 500px;
    cursor: crosshair;
    display: block;
    background: white;
}

.difference-marker {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 4px solid var(--success-color);
    border-radius: 50%;
    pointer-events: none;
    animation: foundPulse 0.5s;
    box-shadow: 0 0 20px rgba(82, 196, 26, 0.6);
    z-index: 10;
}

@keyframes foundPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.3);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Response Layout Adjustments */
@media (max-width: 900px) {
    .images-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .difference-canvas {
        height: 400px;
    }
}

/* 2026-03: classic senior theme alignment */
body.learning-classic-theme .images-container {
    margin: 1.2rem 0 1.1rem;
    gap: 1.2rem;
}

body.learning-classic-theme .image-wrapper {
    border: 2px solid #bca06d;
    border-radius: 14px;
    background: #f7edda;
}

body.learning-classic-theme .image-wrapper h3 {
    background: #274f3b;
    color: #f5ead0;
    font-size: 1.2rem;
    padding: 0.75rem;
}

body.learning-classic-theme .difference-canvas {
    background: #f9f1df;
    border-top: 1px solid #c9b07c;
}

body.learning-classic-theme .difference-marker {
    border-color: #1f8f4c;
    box-shadow: 0 0 0 3px rgba(31, 143, 76, 0.18);
}

body.learning-classic-theme .btn-group {
    margin-top: 0.2rem;
}

body.learning-classic-theme .btn-warning {
    background: #8e6938;
    border-color: #75512b;
    color: #fff8e6;
}

body.learning-classic-theme .btn-warning:hover:not(:disabled) {
    background: #7d5a31;
}

body.learning-classic-theme .guide-box-standard {
    margin-top: 0.8rem !important;
}
/* 2026-03 viewport-fit audit pass */
.images-container {
    gap: 1rem;
    margin: 0.9rem 0 1rem;
}

.difference-canvas {
    height: 360px;
}

@media (min-width: 768px) and (max-width: 1180px) {
    .images-container {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
        margin: 0.75rem 0 0.85rem;
    }

    .image-wrapper h3 {
        padding: 0.65rem;
        font-size: 1rem;
    }

    .difference-canvas {
        height: 280px;
    }
}

@media (max-width: 767px) {
    .images-container {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .difference-canvas {
        height: 300px;
    }
}

/* 2026-03 final compact pass: spot difference */
.images-container {
    gap: 0.9rem;
    margin: 0.7rem 0 0.85rem;
}

.image-wrapper {
    border-width: 2px;
    border-radius: 12px;
}

.image-wrapper h3 {
    padding: 0.62rem;
    font-size: 1rem;
}

.difference-canvas {
    height: 340px;
    background: #f9f1df;
}

.btn-group[data-sound-host='off'] {
    margin-top: 6px;
}

.btn-group[data-sound-host='off'] #startBtn,
.btn-group[data-sound-host='off'] #hintBtn {
    min-height: 42px;
    font-size: 0.84rem;
}

@media (min-width: 768px) and (max-width: 1180px) {
    .game-content-wrapper .info-bar,
    .game-content-wrapper .guide-box,
    .game-content-wrapper .bottom-actions {
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
    }

    .images-container {
        gap: 0.7rem;
        margin: 0.6rem 0 0.75rem;
    }

    .image-wrapper h3 {
        padding: 0.55rem;
        font-size: 0.9rem;
    }

    .difference-canvas {
        height: 250px;
    }

    .btn-group[data-sound-host='off'] #startBtn,
    .btn-group[data-sound-host='off'] #hintBtn {
        min-height: 38px;
        font-size: 0.78rem;
    }
}
