/* =========================================
   🎨 COLOR VISION CHALLENGE
   MOBILE + DESKTOP DESIGN
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, #312e81, transparent 45%),
        linear-gradient(135deg, #020617, #111827, #1e1b4b);
    color: #ffffff;
}

/* =========================================
   MAIN CONTAINER
========================================= */

.game-container {
    width: 100%;
    max-width: 900px;
    margin: auto;
    padding: 20px;
}

/* =========================================
   HEADER
========================================= */

.game-header {
    text-align: center;
    padding: 15px 10px 25px;
}

.game-header h1 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 8px;
}

.subtitle {
    color: #cbd5e1;
    font-size: 16px;
}

/* =========================================
   GAME INFORMATION
========================================= */

.game-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.info-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 15px;
    padding: 12px 8px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.info-box span {
    display: block;
    font-size: 12px;
    color: #cbd5e1;
    margin-bottom: 5px;
}

.info-box strong {
    display: block;
    font-size: 22px;
}

/* =========================================
   PROGRESS
========================================= */

.progress-area {
    margin-bottom: 25px;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 9px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    overflow: hidden;
}

#progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, #22c55e, #06b6d4, #8b5cf6);
    transition: width 0.4s ease;
}

/* =========================================
   SCREEN
========================================= */

.screen {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* =========================================
   START CARD
========================================= */

.start-card,
.question-card,
.result-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(15px);
}

.big-icon {
    font-size: 70px;
    margin-bottom: 15px;
}

.start-card h2,
.question-card h2,
.result-card h2 {
    font-size: 28px;
    margin-bottom: 12px;
}

.start-card p {
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 550px;
    margin: 0 auto 25px;
}

/* =========================================
   BUTTONS
========================================= */

button {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

#start-button,
#restart-button {
    padding: 15px 28px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#start-button:hover,
#restart-button:hover {
    transform: translateY(-2px);
}

#start-button:active,
#restart-button:active {
    transform: scale(0.97);
}

/* =========================================
   QUESTION
========================================= */

.question-card h2 {
    margin-bottom: 20px;
}

/* =========================================
   IMAGE AREA
========================================= */

.image-area {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px auto 25px;
}

#test-image {
    display: block;
    width: min(100%, 430px);
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 20px;
    background: #ffffff;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.35),
        0 0 0 5px rgba(255, 255, 255, 0.06);
}

/* =========================================
   ANSWER BUTTONS
========================================= */

.answer-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.answer-button {
    min-height: 55px;
    padding: 12px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);
    color: white;
    font-size: 18px;
    font-weight: 700;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.answer-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.13);
}

.answer-button:active {
    transform: scale(0.97);
}

.answer-button.correct {
    background: rgba(34, 197, 94, 0.25);
    border-color: #22c55e;
}

.answer-button.wrong {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
}

.answer-button:disabled {
    cursor: not-allowed;
}

/* =========================================
   FEEDBACK
========================================= */

.feedback {
    min-height: 35px;
    margin-top: 18px;
    font-size: 17px;
    font-weight: 700;
}

/* =========================================
   RESULT SCREEN
========================================= */

.result-icon {
    font-size: 70px;
    margin-bottom: 10px;
}

.result-message {
    color: #cbd5e1;
    margin-bottom: 25px;
    line-height: 1.6;
}

.final-score {
    margin: 20px auto;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
    max-width: 300px;
}

.final-score span {
    display: block;
    color: #cbd5e1;
    margin-bottom: 5px;
}

.final-score strong {
    display: block;
    font-size: 48px;
}

/* =========================================
   RESULT STATS
========================================= */

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px auto 25px;
    max-width: 550px;
}

.result-stats div {
    padding: 15px 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
}

.result-stats span {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
    margin-bottom: 5px;
}

.result-stats strong {
    font-size: 22px;
}

/* =========================================
   FOOTER
========================================= */

.game-footer {
    text-align: center;
    padding: 25px 10px 10px;
}

.game-footer p {
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 700px) {

    .game-container {
        padding: 15px;
    }

    .game-header h1 {
        font-size: 28px;
    }

    .start-card,
    .question-card,
    .result-card {
        padding: 22px 16px;
        border-radius: 20px;
    }

    .start-card h2,
    .question-card h2,
    .result-card h2 {
        font-size: 23px;
    }

}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 480px) {

    .game-container {
        padding: 10px;
    }

    .game-header {
        padding: 10px 5px 18px;
    }

    .game-header h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }

    .game-info {
        gap: 6px;
    }

    .info-box {
        padding: 9px 4px;
        border-radius: 12px;
    }

    .info-box span {
        font-size: 10px;
    }

    .info-box strong {
        font-size: 18px;
    }

    .big-icon {
        font-size: 55px;
    }

    #test-image {
        width: 100%;
        border-radius: 15px;
    }

    .answer-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .answer-button {
        min-height: 50px;
        font-size: 16px;
    }

    .result-stats {
        gap: 6px;
    }

    .result-stats div {
        padding: 12px 5px;
    }

    .result-stats strong {
        font-size: 18px;
    }

    #start-button,
    #restart-button {
        width: 100%;
        padding: 14px;
    }
}

/* =========================================
   SMALL PHONES
========================================= */

@media (max-width: 350px) {

    .game-header h1 {
        font-size: 21px;
    }

    .info-box strong {
        font-size: 16px;
    }

    .answer-button {
        font-size: 14px;
    }

}
