@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap');

body {
    font-family: 'Courier Prime', monospace;
    background-color: #fdf6e3; /* A warm, paper-like color */
    color: #333;
    display: flex;
    flex-direction: column; /* Align items vertically */
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem; /* Adjusted padding for smaller screens */
    box-sizing: border-box;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 600px; /* Allow more width */
}

.header {
    margin-bottom: 2rem;
}

#header-logo {
    width: 100px;
    margin-bottom: 1rem;
}

.header h1 {
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: 2px;
}

.header h1 .linkedin {
    color: #0077b5;
}

.header h1 .interpol {
    color: #c91a1a; /* A slightly more muted red */
}

.header p {
    font-size: 1.2rem;
    color: #555;
}

.score-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.settings-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.language-selector-container select {
    font-family: 'Courier Prime', monospace;
    padding: 0.3rem;
    border: 2px solid #333;
    background: #fff;
}

.settings-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #0077b5;
}

input:focus + .slider {
    box-shadow: 0 0 1px #0077b5;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.game-container {
    margin: 3rem 0;
}

.image-container {
    width: 250px;
    height: 250px;
    margin: 0 auto;
    border: 10px solid #eceadd;
    background: #fff;
    box-shadow: 3px 3px 0px #dcd3b8; /* Hard shadow for analog feel */
    padding: 5px;
}

#profile-picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.2) grayscale(0.1); /* Add a slight analog photo effect */
}

@keyframes feedback-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#feedback {
    margin: 1.5rem 0;
    font-weight: 700;
    font-size: 1.2rem;
    height: 28px;
    text-transform: uppercase;
}

#feedback.correct {
    color: #28a745;
    animation: feedback-animation 0.5s ease;
}

#feedback.incorrect {
    color: #dc3545;
    animation: feedback-animation 0.5s ease;
}

#description {
    margin: 1rem 0;
    font-size: 1.1rem;
    color: #555;
    min-height: 40px; /* Reserve space */
}

#description a {
    color: #c91a1a;
    text-decoration: underline;
    margin-top: 0.5rem;
    display: inline-block;
}

.button-container {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

button {
    padding: 0.75rem 1.5rem;
    border: 2px solid #333;
    background-color: #fff;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    color: #333;
    transition: all 0.2s;
    box-shadow: 3px 3px 0px #333;
}

button:hover {
    background-color: #f5efdc;
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #333;
}

button:active {
    transform: translate(3px, 3px);
    box-shadow: 0px 0px 0px #333;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}


#linkedin-button {
    color: #0077b5;
    border-color: #0077b5;
    box-shadow: 3px 3px 0px #0077b5;
}

#linkedin-button:hover {
    box-shadow: 1px 1px 0px #0077b5;
}

#interpol-button {
    color: #c91a1a;
    border-color: #c91a1a;
    box-shadow: 3px 3px 0px #c91a1a;
}

#interpol-button:hover {
    box-shadow: 1px 1px 0px #c91a1a;
}

#next-button {
    margin-top: 1rem;
}

.hidden {
    display: none;
}

.ad-container-bottom {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.footer {
    font-size: 0.9rem;
    color: #888;
    margin-top: 3rem;
    border-top: 1px solid #dcd3b8;
    padding-top: 1.5rem;
    width: 100%;
    max-width: 600px;
}

.footer a {
    color: #333;
    text-decoration: underline;
}

.url-website {
    color: #333;
    text-decoration: underline;
}

.url-website:hover {
    font-weight: bold;
    color: #0077b5;
}

/* Responsive Design */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header p {
        font-size: 1rem;
    }

    .image-container {
        width: 200px;
        height: 200px;
    }

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

    button {
        width: 80%;
        max-width: 300px;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.ad-container-left,
.ad-container-right {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

.ad-container-left {
    left: 20px;
}

.ad-container-right {
    right: 20px;
}

@media (max-width: 1200px) {
    .ad-container-left,
    .ad-container-right {
        display: none;
    }
}

@media (max-width: 400px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .image-container {
        width: 180px;
        height: 180px;
    }
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
    box-sizing: border-box;
}

#cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
}

#cookie-banner a {
    color: #fdf6e3;
    text-decoration: underline;
}

#cookie-banner button {
    background-color: #fdf6e3;
    color: #333;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
}

@media (max-width: 600px) {
    #cookie-banner {
        flex-direction: column;
        text-align: center;
    }

    #cookie-banner p {
        margin-bottom: 1rem;
    }
}

/* Request Image Button */
#request-image-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
    background-color: #0077b5;
    color: #fff;
    border-color: #0077b5;
    box-shadow: 3px 3px 0px #005b8e;
}

#request-image-btn:hover {
    background-color: #005b8e;
    box-shadow: 1px 1px 0px #005b8e;
}

/* Popup Form */
.popup {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.popup-content {
    background-color: #fdf6e3;
    margin: 15% auto;
    padding: 2rem;
    border: 2px solid #333;
    width: 80%;
    max-width: 500px;
    box-shadow: 5px 5px 0px #333;
    position: relative;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #333;
    text-decoration: none;
}

/* --- Game Mode and Timer Styles --- */

#game-mode-selector {
    font-family: 'Courier Prime', monospace;
    padding: 0.3rem;
    border: 2px solid #333;
    background: #fff;
}

#timer-container {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #c91a1a;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.blinking {
    animation: blink 1s linear infinite;
}

/* --- Time Up Popup --- */
/* Reusing .popup and .popup-content from existing styles */
#time-up-popup .popup-content {
    text-align: center;
}

#play-again-button {
    margin-top: 1rem;
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
    box-shadow: 3px 3px 0px #1e7e34;
}

#play-again-button:hover {
    background-color: #1e7e34;
    box-shadow: 1px 1px 0px #1e7e34;
}

#share-score-button {
    margin-top: 1rem;
    background-color: #0077b5;
    color: #fff;
    border-color: #0077b5;
    box-shadow: 3px 3px 0px #005b8e;
}

#share-score-button:hover {
    background-color: #005b8e;
    box-shadow: 1px 1px 0px #005b8e;
}


#play-button {
    margin-top: 1rem;
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
    box-shadow: 3px 3px 0px #1e7e34;
}

#play-button:hover {
    background-color: #1e7e34;
    box-shadow: 1px 1px 0px #1e7e34;
}

.popup-content h2 {
    margin-top: 0;
}

.popup-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popup-content label {
    font-weight: 700;
}

.popup-content input,
.popup-content button {
    padding: 0.5rem;
    font-family: 'Courier Prime', monospace;
    border: 2px solid #333;
    background-color: #fff;
}

.popup-content button {
    cursor: pointer;
    background-color: #0077b5;
    color: #fff;
    border-color: #0077b5;
    box-shadow: 3px 3px 0px #005b8e;
}

.popup-content button:hover {
    background-color: #005b8e;
}

/* Instructions Button */
#instructions-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
    box-shadow: 3px 3px 0px #1e7e34;
}

#instructions-btn:hover {
    background-color: #1e7e34;
    box-shadow: 1px 1px 0px #1e7e34;
}

.close-instructions-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-instructions-btn:hover,
.close-instructions-btn:focus {
    color: #333;
    text-decoration: none;
}
