/* =========================
   GENERAL RESET
========================= */

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

body {
    font-family: Arial, sans-serif;
    background: #eefaf9;
    color: #222;
    min-height: 100vh;
    padding: 15px;
    overflow-y: auto;
    overflow-x: hidden;
}


/* =========================
   BACK BUTTON
========================= */

.top-left {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 100;
}

.back-btn {
    text-decoration: none;
    background: #222;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
}


/* =========================
   SCOREBOARD
========================= */

.scoreboard {
    position: fixed;
    top: 15px;
    right: 15px;
    background: rgb(38, 223, 236);
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: right;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.4;
    z-index: 100;
}


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

.progress-container {
    width: 100%;
    height: 10px;
    background: #ddd;
    margin: 90px auto 25px;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    /* background: linear-gradient(90deg, #22c55e, #3b82f6); */
    background: linear-gradient(90deg, #fa2323, #4bff5a);
    transition: 0.4s;
}


/* =========================
   START OVERLAY
========================= */

.start-overlay {
    position: fixed;
    inset: 0;
    background: rgb(0, 0, 0);
    /* opacity: 1; */
    color: rgb(255, 255, 255);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    z-index: 999;
    cursor: pointer;
    text-align: center;
    padding: 20px;
}

.start-overlay h1 {
    font-size: 28px;
    line-height: 1.4;
    /* background-color: rgb(0, 0, 0); */
}

.start-overlay p {
    font-size: 20px;
    /* background-color: black; */
    /* opacity: 1; */
}

.start-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.start-options button {
    padding: 14px;
    font-size: 18px;
    border: none;
    border-radius: 12px;
    background: rgb(55, 253, 88);
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.start-options button:hover {
    background: #ddd;
}


/* =========================
   QUIZ CONTAINER
========================= */

.quiz-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 5px;
    text-align: center;
}


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

.question-box {
    background: rgb(255, 173, 251);
    padding: 15px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    text-align: left;
}

.org-name-en {
    font-size: 18px;
    font-weight: bold;
    /* line-height: 1.5; */
}

.org-name-bn {
    font-size: 18px;
    margin-top: 8px;
    color: #555;
    font-weight: 800;
}

.strait-detail {
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.5;
}

Values
.connect-value {
    color: #111;
    font-weight: 500;
}

.separate-value {
    color: #111;
    font-weight: 500;
}

/* =========================
   OPTIONS
========================= */

.options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.option-btn {
    padding: 12px 14px;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    color: #000000;
    /* font-weight: bold; */
    /* font-style: italic; */
    border: none;
    border-radius: 12px;
    background: rgb(255, 249, 167);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: 0.2s;
    width: 100%;
}

.option-btn:hover {
    transform: translateY(-2px);
    /* color: #4caf50; */
    background: #70ff75;
}

.connect-label {
    color: #6d0ee9;
    font-weight: 700;
    display: inline-block;
    min-width: 90px;
}

.separate-label {
    color: #fc3d3d;
    font-weight: 700;
    display: inline-block;
    min-width: 90px;
}

/* =========================
   NEXT BUTTON
========================= */

.navigation-buttons {
    margin-top: 25px;
}

#next-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border: none;
    background: #222;
    color: white;
    border-radius: 12px;
    cursor: pointer;
}

.navigation-buttons {
    position: sticky;
    bottom: 10px;
    background: #eefaf9;
    padding-top: 10px;
}

/* =========================
   REVIEW SECTION
========================= */

#review-section {
    width: 100%;
    max-width: 500px;
    margin-top: 25px;
}

.review-card {
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 15px;
    margin: 12px 0;

    backdrop-filter: blur(6px);
    border-left: 4px solid #60a5fa;

    color: white;
    text-align: center;

    width: 100%;
    max-width: 700px;
}

.review-card .wrong {
    color: #fc0d0d;
    margin-top: 6px;
    opacity: .1;
}

.review-card .correct {
    color: #0ef315;
    margin-top: 4px;
    /* opacity: .1; */
}

/* Review section text fix */
.review-card p {
    width: 100% !important;
    max-width: none !important;

    display: block !important;
    justify-content: unset !important;

    background: rgba(255,255,255,0.12);
    padding: 12px 16px;
    border-radius: 10px;

    margin: 8px 0;
    font-size: 16px;
    line-height: 1.5;
}

/* =========================
   PERFECT SCORE MESSAGE
========================= */

.perfect-message {
    margin-top: 15px;
    padding: 16px 18px;

    /* background: linear-gradient(135deg, #16a34a, #22c55e); */
    background: rgb(171, 76, 248);
    color: white;

    font-size: 18px;
    font-weight: 700;
    text-align: center;

    border-radius: 14px;

    box-shadow: 0 6px 18px rgba(34, 197, 175, 0.35);

    animation: popIn 0.4s ease-out;
}

/* subtle entrance animation */
@keyframes popIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =========================
   RESULT CARD
========================= */

.result-card {
    display: none;
    position: fixed;
    inset: 0;

    background: linear-gradient(135deg, #0f172a, #1e293b);
    z-index: 1000;

    padding: 30px 20px;

    /* display: flex; */
    flex-direction: column;
    align-items: center;

    text-align: center;
    color: white;

    overflow-y: auto;   /* ✅ KEY FIX */
    -webkit-overflow-scrolling: touch;
}

.result-card h2 {
    font-size: 34px;
    margin-bottom: 20px;
    color: #4ade80;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.4);
}

.result-card p {
    font-size: 18px;
    margin: 10px 0;

    background: rgba(255,255,255,0.08);
    padding: 12px 18px;
    border-radius: 12px;

    width: 220px;
    display: flex;
    justify-content: space-between;

    backdrop-filter: blur(6px);
}

#final-score, #accuracy, #final-time {
    font-weight: bold;
    color: #facc15;
}

.result-card button {
    width: 220px;
    margin: 10px 0;

    padding: 14px;
    border: none;
    border-radius: 12px;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}

.result-card button:last-of-type {
    background: #334155;
    color: white;
}

.result-card button:hover{
    background-color: #60a5fa;
}

/* =========================
   DESKTOP IMPROVEMENT
========================= */

@media (min-width: 768px) {
    .options-container {
        grid-template-columns: 1fr 1fr;
    }

    .question-box h2 {
        font-size: 28px;
    }

    .start-overlay h1 {
        font-size: 40px;
    }

    #next-btn {
        width: auto;
        padding: 14px 30px;
    }

    .result-card button {
        width: auto;
        min-width: 220px;
        margin: 15px 10px;
    }
}

/* Disabled Next Button */
#next-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Enabled Next Button */
#next-btn {
    transition: 0.2s;
}