#main-container {
    flex-direction: column;
    max-width: 1000px;
    width: 100%;
    display: block;
    margin-top: 20px;
}

/* Headline inside hero section (kept if present) */
#main-container h1 {
    text-align: center;
}

/* GAME SURFACE */
#shape-container {
    margin: 24px 0 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    border-radius: 20px;
    padding: 24px;
}

#shape-container.fade-out {
    opacity: 0;
    transform: scale(.98);
}

/* Country SVG styling */
.country-shape {
    width: 100%;
    max-width: 360px;
    max-height: 240px;   /* हर country इसी box में fit होगी */
    height: auto;
    display: block;
    object-fit: contain; /* proportion maintain होगा */
    transition: all 0.25s ease-in-out;
    opacity: 1;
    animation: instantFadeIn 0.25s ease-in-out;
    filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.4));
    shape-rendering: geometricPrecision;
}



.country-shape path,
.country-shape polygon,
.country-shape polyline,
.country-shape rect,
.country-shape circle,
.country-shape ellipse {
    stroke: #222 !important;
    stroke-width: 2px !important;
    stroke-linejoin: round !important;
    vector-effect: non-scaling-stroke !important;
}

/* Ensure flag patterns are visible */
.country-shape image {
    opacity: 1 !important;
}

@keyframes instantFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* STATUS BAR */
.status-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 12px;
    font-weight: 600;
}

.status-bar .score,
.status-bar .countries {
    background: linear-gradient(180deg, #ffffff 0%, #f6f7fb 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .06);
    border-radius: 12px;
    padding: 10px 14px;
    color: #0b2239;
}

/* OPTIONS */
#options-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

#options-container.fade-out {
    opacity: 0;
}

button {
    padding: 14px 18px;
    font-size: 16px;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, .08);
    background: #0b0b0b;
    color: #fff;
    border-radius: 12px;
    transition: transform .08s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
    min-width: 120px;
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, .16);
}

button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
}

button.correct {
    background-color: #15a34a;
    border-color: #118a3d;
    color: #fff;
    box-shadow: 0 10px 20px rgba(21, 163, 74, .3);
    animation: popCorrect .2s ease-out;
}

button.wrong {
    background-color: #e11d48;
    border-color: #c2153b;
    color: #fff;
    box-shadow: 0 10px 20px rgba(225, 29, 72, .28);
    animation: shakeWrong .2s ease;
}

@keyframes popCorrect {
    from {
        transform: scale(.98);
    }

    to {
        transform: scale(1);
    }
}

@keyframes shakeWrong {
    0% {
        transform: translateX(0);
    }

    33% {
        transform: translateX(-3px);
    }

    66% {
        transform: translateX(3px);
    }

    100% {
        transform: translateX(0);
    }
}

button:disabled {
    opacity: 1;
    cursor: not-allowed;
}

/* PRIMARY ACTION */
#next-btn {
    padding: 12px 100px;
    margin: 22px auto 0;
    display: flex;
    background: linear-gradient(180deg, #111 0%, #000 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 14px;
    letter-spacing: .2px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .2);
}

#next-btn:disabled {
    background: #1f2937;
    color: #9ca3af;
    border-color: rgba(0, 0, 0, .15);
    box-shadow: none;
}

/* Tertiary */
.reset-button {
    background-color: transparent;
    margin: 18px auto 0;
    color: #0b2239;
    font-size: 16px;
    display: flex;
    border: none;
    justify-content: center;
    box-shadow: none;
}

/* COMPLETION POPUP (kept, minor polish) */
.completion-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 14, 20, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999999;
}

.popup-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}

.popup-content h2 {
    color: #0b2239;
    margin-bottom: 14px;
    font-size: 28px;
    width: 100%;
}

.popup-content p {
    color: #0b2239;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 26px;
}

.play-again-btn {
    background-color: #000;
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s, transform .08s;
}

.play-again-btn:hover {
    background-color: #222;
}

.play-again-btn:active {
    transform: translateY(1px);
}

/* RESPONSIVE */
@media (max-width: 1299px) {
    #main-container {
        max-width: 900px;
        padding: 0 20px;
    }

    .country-shape {
        max-width: 320px;
    }

    button {
        min-width: 110px;
        padding: 12px 16px;
        font-size: 15px;
    }

    #next-btn {
        padding: 12px 80px;
    }
}

@media (max-width: 992px) {
    #main-container {
        max-width: 800px;
        padding: 0 15px;
    }

    .country-shape {
        max-width: 280px;
    }

    #options-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    button {
        min-width: 100px;
        padding: 10px 14px;
        font-size: 14px;
    }

    #next-btn {
        padding: 10px 60px;
    }

    .status-bar {
        margin-top: 15px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    #main-container {
        max-width: 100%;
        padding: 0 10px;
        margin-top: 15px;
    }

    .country-shape {
        max-width: 240px;
    }

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

    button {
        width: 100%;
        min-width: auto;
        padding: 12px 16px;
        font-size: 16px;
    }

    #next-btn {
        width: calc(50% - 5px);
        padding: 12px 20px;
        margin: 15px auto 0;
        display: block;
    }

    .status-bar {
        flex-direction: row;
        gap: 10px;
        text-align: center;
        margin-top: 15px;
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    #main-container {
        padding: 0 8px;
    }

    .country-shape {
        max-width: 210px;
    }

    button {
        padding: 10px 14px;
        font-size: 15px;
    }

    #next-btn {
        padding: 10px 30px;
        font-size: 15px;
    }

    .status-bar {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    #main-container {
        padding: 0 5px;
    }

    .country-shape {
        max-width: 190px;
    }

    button {
        padding: 9px 12px;
        font-size: 14px;
    }

    #next-btn {
        padding: 9px 22px;
        font-size: 14px;
    }

    .status-bar {
        font-size: 15px;
        gap: 8px;
    }
}

@media (max-width: 350px) {
    .country-shape {
        max-width: 170px;
    }

    button {
        padding: 8px 10px;
        font-size: 13px;
    }

    #next-btn {
        padding: 8px 18px;
        font-size: 13px;
    }

    .status-bar {
        font-size: 14px;
    }
}

@media (max-width: 320px) {
    .country-shape {
        max-width: 150px;
    }

    button {
        padding: 7px 8px;
        font-size: 12px;
    }

    #next-btn {
        padding: 7px 14px;
        font-size: 12px;
    }

    .status-bar {
        font-size: 12px;
    }
}