/* @import url("/assets/css/index/_modal.css"); */

main {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 3.5rem;
    padding: 4rem clamp(1.5rem, 5vw, 5rem);
    margin: 0 auto;
    width: 100%;
    max-width: 1600px;
    height: auto;
}

.content {
    flex: 1 1 auto;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    height: 100%;
}

.column {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    width: clamp(160px, 20vw, 320px);
    gap: 2rem;
}

.column:empty {
    display: none;
}

.column>* {
    margin: 0;
}

/* Desktop: a symmetric 3-zone layout — a skyscraper ad rail on each side and
   the game centered in the middle. Both side rails reserve ad-width space so
   the ad space is fully used while the game stays centered. */
@media (min-width: 1200px) {
    main {
        position: static;
        max-width: 1720px;
        gap: clamp(1rem, 2vw, 2rem);
    }

    .content {
        flex: 1 1 auto;
        max-width: min(100%, 720px);
    }

    .column {
        position: static;
        flex: 0 0 auto;
        width: clamp(200px, 15vw, 300px);
    }
}

.game,
.game-container {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: min(100%, 820px);
    margin: 3rem auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 22vh;
    padding: 2rem;
}

.person-container {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    min-height: 12vh;
}

.photo-container {
    width: min(72vw, 480px);
    height: min(72vw, 480px);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    background-color: #ddd;
}

.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
    background-position: center;
    background-size: cover;
    transition: opacity 0.3s ease;
}

.placeholder-image.hidden {
    opacity: 0;
}

.photo-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.photo-wrapper img.photo {
    position: absolute;
    top: 0;
    left: 0;
}

.buttons-container {
    display: flex;
    gap: 1.75rem;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding: 0 1.5rem 2rem;
}

.choice-btn {
    flex: 1;
    padding: 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 240px;
    margin-left: 0.75rem;
    margin-right: 0.75rem;
}

.choice-btn.linkedin {
    background-color: var(--linkedin-color);
    color: white;
}

.choice-btn.interpol {
    background-color: var(--interpol-color);
    color: white;
}

.choice-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-2px);
}

.choice-btn:active:not(:disabled) {
    transform: translateY(0);
}

.details-container {
    border-top: 1px solid #ddd;
    padding: 2.5rem;
    display: none;
}

.person-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.person-age {
    color: #666;
    margin-bottom: 1rem;
}

.person-description {
    line-height: 1.5;
}

.result-container {
    background-color: #f8f8f8;
    padding: 1.25rem;
    border-radius: 6px;
    margin-top: 1.25rem;
    text-align: center;
    display: none;
    flex-direction: column !important;
    align-items: center !important;
}

.result-correct {
    color: var(--success);
    font-weight: bold;
}

.result-incorrect {
    color: var(--error);
    font-weight: bold;
}

.next-btn {
    background-color: var(--dark-gray);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1.25rem;
    transition: all 0.2s ease;
    max-width: 200px;
}

.next-btn:hover {
    background-color: #555;
    transform: translateY(-2px);
}

.next-btn:active {
    transform: translateY(0);
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

.photo-container {
    position: relative;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--dark-gray);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

footer {
    text-align: center;
    padding: 1.5vh;
    margin: 0;
    background-color: #ffffff7e;
    backdrop-filter: blur(10px);
    border-top: 1px solid #ddd;
    font-size: 0.9rem;
    color: #666;
    height: fit-content;
    max-height: min-content;
}

.settings {
    display: flex;
    align-items: center;
    height: 50px;
    border: none;
    padding: 0 1rem;
    background-color: #ffffff7e;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.settings fieldset {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.settings label {
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
}

.settings label:hover {
    color: var(--linkedin-color);
}

.settings input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.separator {
    width: 1px;
    height: 20px;
    background-color: #ccc;
    margin: 0 10px;
}

.language-selector {
    padding: 5px;
    border: none;
    background-color: transparent;
    border-radius: 3px;
    cursor: pointer;
    width: fit-content;
    padding-left: 10px;
}

.language-selector:focus {
    outline: none;
}

.language-selector:hover {
    color: var(--linkedin-color);
}

.settings nav {
    margin-left: 0.75rem;
    display: flex;
    gap: 1.5rem;
    align-items: space-around;
}

.settings nav a {
    text-decoration: none;
    color: var(--dark-gray);
    transition: color 0.2s ease;
}

.settings nav a:hover {
    color: var(--linkedin-color);
}

.settings nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--linkedin-color);
    transition: width 0.2s ease;
}

.settings nav a:hover::after {
    width: 100%;
}

.settings .disabled {
    pointer-events: none;
    opacity: 0.3;
}

.pixelCon {
    position: fixed;
    width: 110%;
    height: 110%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
    z-index: 1;
}

.pixel {
    background: #ffd7d7;
    width: 3%;
    height: 1%;
    padding-top: 10%;
    float: left;
    opacity: 0;
    animation: blink 6s infinite;
    z-index: 2;
}

@keyframes blink {

    0%,
    25%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 0.4;
    }
}

#soundtrack-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 250px;
    background: #ffffffda;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    font-family: "Segoe UI", sans-serif;
    padding: 12px;
    z-index: 9999;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

#toggle-mute {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #333;
    padding: 4px;
}

#volume-slider {
    flex: 1;
    margin: 0 8px;
    cursor: pointer;
}

/* Responsive layout: collapse ad rails and tighten spacing on smaller screens */
@media (max-width: 1100px) {
    .column {
        display: none;
    }

    main {
        gap: 0;
        padding: 2.5rem 1.25rem;
    }
}

@media (max-width: 640px) {
    main {
        padding: 1.5rem 1rem;
    }

    .game,
    .game-container {
        margin: 1.5rem auto;
        padding: 1.25rem;
    }

    .person-container {
        padding: 2rem;
        gap: 1.75rem;
    }

    .photo-container {
        width: min(82vw, 300px);
        height: min(82vw, 300px);
    }

    .choice-btn {
        font-size: 1rem;
        padding: 1.25rem;
    }
}

#track-info {
    text-align: center;
    font-weight: bold;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.button-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

#play-pause,
#next-track {
    flex: 1;
    aspect-ratio: 2.5 / 1;
    font-size: 20px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

#play-pause:hover,
#next-track:hover {
    background: #e6e6e6;
}

#selector-row {
    display: flex;
}

#track-selector {
    width: 100%;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.effect-blur {
    filter: blur(4px);
}

.effect-blur.effect-BnW {
    filter: blur(4px) grayscale(100%);
}

.effect-blur.effect-hue {
    filter: blur(4px) hue-rotate(90deg);
}

.effect-blur.effect-saturate {
    filter: blur(4px) saturate(3);
}

.effect-blur.effect-sepia {
    filter: blur(4px) sepia(100%) brightness(0.8);
}

.effect-BnW {
    filter: grayscale(100%);
}

.effect-hue {
    filter: hue-rotate(90deg);
}

.effect-invert {
    image-rendering: pixelated;
}

.effect-saturate {
    filter: saturate(3);
}

.effect-sepia {
    filter: sepia(100%) brightness(0.8);
}

@media (max-width: 1199.98px) {
    .settings {
        flex-direction: column;
        height: auto;
        padding: 0.5rem;
    }

    .settings fieldset {
        flex-wrap: wrap;
        justify-content: center;
    }

    main {
        max-width: 98vw;
    }

    .pixel {
        width: 8%;
    }

    .column {
        display: none;
    }

    .content {
        width: 80vw;
    }

    .game,
    .game-container {
        width: 80vw;
        margin: 4vh auto;
    }

    .buttons-container {
        flex-direction: column;
        align-items: center;
    }

}

@media (max-width: 600px) {
    .photo-container {
        width: 200px;
        height: 200px;
    }

    .buttons-container {
        flex-direction: column;
    }

    .top-bar {
        margin-bottom: 1vh;
        margin-top: 0px;
        height: 3vh;
    }

    .button-row {
        height: 5vh;
    }

    #selector-row {
        display: none;
    }

    main {
        max-width: 98vw;
    }

    footer {
        height: 40vh;
    }

    .pixel {
        width: 10%;
    }

    .content {
        width: 90vw;
    }
}

.green {
    color: green;
    font-weight: bold;
}

.red {
    color: red;
    font-weight: bold;
}

.concat {
    display: flex;
    flex-direction: collumn;
}

.result-type {
    margin-left: 5px !important;
    font-weight: bold !important;
}

/* Size the game to a comfortable, moderate footprint on desktop (kept at the
   end of the file so it wins over the base rules above). */
@media (min-width: 1200px) {
    .game,
    .game-container {
        max-width: min(100%, 700px);
        min-height: auto;
    }

    .photo-container {
        width: min(44vw, 360px);
        height: min(44vw, 360px);
    }
}

/* Interstitial ad shown before a photo modifier is applied */
#ad-interstitial {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 10000000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#ad-interstitial .ad-interstitial-content {
    background: #fff;
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

#ad-interstitial .ad-interstitial-label {
    font-weight: 600;
    margin-bottom: 1rem;
}

#ad-interstitial .ad-interstitial-slot {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f2ef;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

#ad-interstitial .ad-interstitial-continue {
    background: var(--dark-gray);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

#ad-interstitial .ad-interstitial-continue:hover {
    background: #555;
}