:root {
    --navy: #071b3a;
    --navy-2: #0b2b57;
    --cyan: #16d5e8;
    --cyan-2: #00a8ff;
    --lime: #9cff3b;
    --bg: #f5f8fc;
    --card: #ffffff;
    --text: #102033;
    --muted: #66758a;
    --border: #e3eaf3;
    --shadow: 0 18px 45px rgba(7, 27, 58, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand img {
    height: 54px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 700;
    color: var(--navy);
}

    .main-nav a {
        opacity: 0.9;
    }

        .main-nav a:hover {
            color: var(--cyan-2);
        }

.nav-cta {
    padding: 12px 18px;
    border-radius: 999px;
    color: white !important;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
    box-shadow: 0 10px 24px rgba(0, 168, 255, 0.25);
}

/* Hero */

.hero {
    padding: 44px 0 28px;
}

.hero-inner {
    min-height: 420px;
    border-radius: 36px;
    padding: 52px;
    background: radial-gradient(circle at 85% 20%, rgba(156, 255, 59, 0.35), transparent 24%), radial-gradient(circle at 25% 90%, rgba(22, 213, 232, 0.28), transparent 28%), linear-gradient(135deg, var(--navy), var(--navy-2));
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    align-items: center;
    gap: 36px;
    color: white;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-pill {
    display: inline-flex;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #dffbff;
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 22px 0 0;
    max-width: 580px;
    font-size: 20px;
    line-height: 1.55;
    color: #dbe9ff;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 22px;
    border-radius: 999px;
    font-weight: 900;
    border: 0;
    cursor: pointer;
}

.btn-primary {
    color: var(--navy);
    background: linear-gradient(135deg, var(--lime), var(--cyan));
    box-shadow: 0 14px 30px rgba(22, 213, 232, 0.28);
}

.btn-secondary {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
}

.page-hero .btn-secondary,
.section .btn-secondary {
    color: var(--navy);
    background: white;
    border: 1px solid var(--border);
}

.hero-card {
    border-radius: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-card-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--lime), var(--cyan));
    font-size: 36px;
    margin-bottom: 22px;
}

.hero-card h2 {
    margin: 0;
    font-size: 28px;
}

.hero-card p {
    font-size: 16px;
    margin-top: 12px;
}

/* Sections */

.section {
    padding: 34px 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

    .section-head h2 {
        margin: 0;
        color: var(--navy);
        font-size: 32px;
        letter-spacing: -0.03em;
    }

    .section-head p {
        margin: 6px 0 0;
        color: var(--muted);
    }

    .section-head a {
        color: var(--cyan-2);
        font-weight: 900;
    }

.page-hero {
    padding: 46px 0 24px;
    background: radial-gradient(circle at 90% 10%, rgba(22, 213, 232, 0.22), transparent 24%), linear-gradient(135deg, #eef8ff, #ffffff);
    border-bottom: 1px solid var(--border);
}

    .page-hero h1 {
        margin: 0;
        color: var(--navy);
        font-size: clamp(34px, 5vw, 58px);
        letter-spacing: -0.04em;
    }

    .page-hero p {
        max-width: 760px;
        margin: 12px 0 0;
        color: var(--muted);
        font-size: 18px;
        line-height: 1.55;
    }

/* Quick cards */

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.quick-card {
    min-height: 150px;
    padding: 24px;
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(7, 27, 58, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

    .quick-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow);
    }

    .quick-card span {
        display: inline-grid;
        place-items: center;
        min-width: 54px;
        height: 54px;
        padding: 0 12px;
        border-radius: 18px;
        background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
        color: white;
        font-weight: 1000;
        font-size: 20px;
        margin-bottom: 16px;
    }

    .quick-card strong {
        display: block;
        color: var(--navy);
        font-size: 21px;
    }

    .quick-card small {
        display: block;
        margin-top: 6px;
        color: var(--muted);
        font-weight: 700;
    }

/* Quiz cards */

.quiz-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.quiz-card {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(7, 27, 58, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

    .quiz-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow);
    }

.quiz-card-img {
    height: 170px;
    background: linear-gradient(135deg, #dffbff, #f0ffe2);
}

    .quiz-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.quiz-card-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--navy);
    font-size: 54px;
    font-weight: 1000;
}

.quiz-card-body {
    padding: 18px;
}

.quiz-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

    .quiz-badges span {
        padding: 6px 9px;
        border-radius: 999px;
        background: #eafcff;
        color: #007e97;
        font-size: 12px;
        font-weight: 900;
    }

.quiz-card h3 {
    margin: 0;
    color: var(--navy);
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.quiz-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: 14px;
}

.quiz-card-action {
    margin-top: 16px;
    color: var(--cyan-2);
    font-weight: 1000;
}

/* Categories */

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.category-card {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--border);
    color: var(--navy);
    font-weight: 900;
    box-shadow: 0 10px 25px rgba(7, 27, 58, 0.05);
}

    .category-card:hover {
        background: linear-gradient(135deg, var(--navy), var(--navy-2));
        color: white;
    }

/* Pager */

.pager {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 34px;
}

/* Footer */

.site-footer {
    margin-top: 40px;
    padding: 38px 0;
    background: var(--navy);
    color: white;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.site-footer p {
    margin: 6px 0 0;
    color: #cfe3ff;
}

.footer-links {
    display: flex;
    gap: 18px;
    font-weight: 800;
}

/* Responsive */

@media (max-width: 980px) {
    .hero-inner {
        grid-template-columns: 1fr;
        padding: 36px;
    }

    .quiz-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .header-inner {
        height: auto;
        padding: 12px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .brand img {
        height: 48px;
    }

    .main-nav {
        width: 100%;
        overflow-x: auto;
        gap: 14px;
        padding-bottom: 4px;
        font-size: 14px;
    }

        .main-nav a {
            white-space: nowrap;
        }

    .nav-cta {
        padding: 9px 14px;
    }

    .hero {
        padding-top: 20px;
    }

    .hero-inner {
        border-radius: 26px;
        padding: 28px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero p {
        font-size: 17px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .hero-card {
        display: none;
    }

    .section {
        padding: 26px 0;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

        .section-head h2 {
            font-size: 26px;
        }

    .quick-grid {
        grid-template-columns: 1fr;
    }

    .quiz-grid {
        grid-template-columns: 1fr;
    }

    .quiz-card-img {
        height: 210px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        flex-direction: column;
    }
}

/* Quiz play page */

.quiz-play-hero {
    padding: 42px 0 24px;
    background: radial-gradient(circle at 90% 15%, rgba(156, 255, 59, 0.24), transparent 25%), linear-gradient(135deg, #eefaff, #ffffff);
    border-bottom: 1px solid var(--border);
}

.quiz-play-head {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 32px;
    align-items: center;
}

    .quiz-play-head h1 {
        margin: 14px 0 0;
        color: var(--navy);
        font-size: clamp(34px, 5vw, 58px);
        line-height: 1;
        letter-spacing: -0.04em;
    }

    .quiz-play-head p {
        max-width: 760px;
        margin: 16px 0 0;
        color: var(--muted);
        font-size: 18px;
        line-height: 1.6;
    }

.quiz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .quiz-meta span {
        padding: 8px 11px;
        border-radius: 999px;
        background: #eafcff;
        color: #007e97;
        font-size: 13px;
        font-weight: 900;
    }

.quiz-main-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.quiz-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.play-card,
.related-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: 0 12px 30px rgba(7, 27, 58, 0.06);
}

.play-card {
    padding: 28px;
}

.question-block {
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, #f2fbff, #f7ffe9);
    border: 1px solid var(--border);
    margin-bottom: 22px;
}

.question-label {
    color: var(--cyan-2);
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
}

.question-block h2 {
    margin: 10px 0 0;
    color: var(--navy);
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.answer-btn {
    min-height: 72px;
    padding: 18px;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: white;
    color: var(--navy);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

    .answer-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        border-color: var(--cyan);
    }

    .answer-btn.correct {
        border-color: #46c93a;
        background: #ecffe9;
        color: #176d12;
    }

    .answer-btn.wrong {
        border-color: #ff6262;
        background: #fff0f0;
        color: #9d1d1d;
    }

    .answer-btn:disabled {
        cursor: default;
    }

.four-images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

    .four-images-grid img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 20px;
        border: 1px solid var(--border);
    }

.answer-input-row {
    display: flex;
    gap: 12px;
}

    .answer-input-row input {
        flex: 1;
        min-height: 54px;
        border: 2px solid var(--border);
        border-radius: 999px;
        padding: 0 18px;
        font-size: 18px;
        font-weight: 800;
        outline: none;
    }

        .answer-input-row input:focus {
            border-color: var(--cyan);
        }

.correct-input {
    border-color: #46c93a !important;
    background: #ecffe9;
}

.wrong-input {
    border-color: #ff6262 !important;
    background: #fff0f0;
}

.result-box {
    margin-top: 22px;
    padding: 24px;
    border-radius: 24px;
    border: 2px solid var(--border);
}

    .result-box.hidden {
        display: none;
    }

    .result-box.is-correct {
        background: #ecffe9;
        border-color: #46c93a;
    }

    .result-box.is-wrong {
        background: #fff5f5;
        border-color: #ff6262;
    }

.result-title {
    color: var(--navy);
    font-size: 26px;
    font-weight: 1000;
    letter-spacing: -0.03em;
}

.correct-answer-line,
.explanation {
    margin: 12px 0 0;
    color: var(--text);
    line-height: 1.55;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.related-box {
    padding: 20px;
    position: sticky;
    top: 100px;
}

    .related-box h3 {
        margin: 0 0 16px;
        color: var(--navy);
        font-size: 22px;
    }

.related-list {
    display: grid;
    gap: 12px;
}

.related-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid var(--border);
}

    .related-item img {
        width: 72px;
        height: 72px;
        border-radius: 14px;
        object-fit: cover;
    }

    .related-item strong {
        display: block;
        color: var(--navy);
        font-size: 14px;
        line-height: 1.25;
    }

    .related-item span {
        display: block;
        margin-top: 5px;
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
    }

@media (max-width: 900px) {
    .quiz-play-head {
        grid-template-columns: 1fr;
    }

    .quiz-main-img {
        max-width: 360px;
    }

    .quiz-shell {
        grid-template-columns: 1fr;
    }

    .related-box {
        position: static;
    }
}

@media (max-width: 640px) {
    .play-card {
        padding: 18px;
        border-radius: 22px;
    }

    .answers-grid {
        grid-template-columns: 1fr;
    }

    .answer-input-row {
        flex-direction: column;
    }

    .four-images-grid {
        gap: 8px;
    }

    .result-actions .btn-primary,
    .result-actions .btn-secondary {
        width: 100%;
    }
}

.section-soft {
    background: linear-gradient(180deg, rgba(22, 213, 232, 0.08), rgba(255, 255, 255, 0));
}

.category-grid-featured {
    grid-template-columns: repeat(3, 1fr);
}

.category-card-icon {
    min-height: 116px;
    flex-direction: column;
    gap: 10px;
}

    .category-card-icon span {
        font-size: 30px;
    }

    .category-card-icon strong {
        display: block;
    }

.us-zone {
    background: radial-gradient(circle at 10% 20%, rgba(22, 213, 232, 0.12), transparent 22%), radial-gradient(circle at 90% 70%, rgba(156, 255, 59, 0.16), transparent 24%);
}

.difficulty-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.difficulty-card {
    min-height: 150px;
    padding: 24px;
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(7, 27, 58, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

    .difficulty-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow);
    }

    .difficulty-card span {
        font-size: 34px;
        margin-bottom: 14px;
    }

    .difficulty-card strong {
        color: var(--navy);
        font-size: 24px;
        letter-spacing: -0.03em;
    }

    .difficulty-card small {
        color: var(--muted);
        font-weight: 800;
        margin-top: 6px;
    }

@media (max-width: 980px) {
    .category-grid-featured {
        grid-template-columns: repeat(3, 1fr);
    }

    .difficulty-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .category-grid-featured {
        grid-template-columns: repeat(2, 1fr);
    }

    .difficulty-grid {
        grid-template-columns: 1fr;
    }
}

.header-search input {
    width: 170px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 14px;
    outline: none;
    font-weight: 700;
    background: #f8fbff;
    color: var(--navy);
}

    .header-search input:focus {
        border-color: var(--cyan);
        background: white;
    }

.search-page-form {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    max-width: 620px;
}

    .search-page-form input {
        flex: 1;
        min-height: 52px;
        border: 2px solid var(--border);
        border-radius: 999px;
        padding: 0 18px;
        font-size: 17px;
        font-weight: 800;
        outline: none;
    }

        .search-page-form input:focus {
            border-color: var(--cyan);
        }

.empty-box {
    text-align: center;
    padding: 60px 24px;
    border-radius: 28px;
    background: white;
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(7, 27, 58, 0.06);
}

    .empty-box h2 {
        margin: 0;
        color: var(--navy);
        font-size: 32px;
    }

    .empty-box p {
        color: var(--muted);
        margin: 12px 0 22px;
    }

@media (max-width: 720px) {
    .header-search {
        width: 100%;
    }

        .header-search input {
            width: 100%;
        }

    .search-page-form {
        flex-direction: column;
    }
}

.ad-slot {
    width: 100%;
    border: 1px dashed #cbd7e6;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ad-slot-wide {
    min-height: 110px;
    margin: 22px 0;
}

.ad-slot-box {
    min-height: 280px;
}

.ad-slot-inline {
    min-height: 90px;
    margin: 18px 0;
}

.legal-page {
    max-width: 860px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 12px 30px rgba(7, 27, 58, 0.06);
}

    .legal-page h2 {
        color: var(--navy);
        margin: 28px 0 10px;
        font-size: 26px;
        letter-spacing: -0.03em;
    }

        .legal-page h2:first-child {
            margin-top: 0;
        }

    .legal-page p {
        color: var(--text);
        line-height: 1.75;
        margin: 0 0 14px;
    }

    .legal-page a {
        color: var(--cyan-2);
        font-weight: 900;
    }

@media (max-width: 720px) {
    .legal-page {
        padding: 22px;
        border-radius: 22px;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}

.quiz-seo-title {
    font-weight: 900;
    color: var(--cyan-2) !important;
}