/* Base */
:root {
    --ink: #07142f;
    --muted: #657386;
    --line: #d9e7f3;
    --surface: #ffffff;
    --surface-soft: #f5faff;
    --blue: #176ec7;
    --blue-dark: #0b4d91;
    --shadow-sm: 0 8px 20px rgba(16, 52, 91, 0.09);
    --shadow-md: 0 16px 34px rgba(16, 52, 91, 0.14);
    --radius: 8px;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    min-height: 100vh;
    background: #f7fbff;
    color: var(--ink);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 74px;
    padding: 12px 40px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(196, 216, 235, 0.82);
    box-shadow: 0 6px 24px rgba(22, 57, 96, 0.08);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    text-decoration: none;
}

#logo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    background: #07142f;
    border: 1px solid rgba(206, 226, 245, 0.95);
    border-radius: var(--radius);
    box-shadow: 0 10px 20px rgba(23, 110, 199, 0.28);
}

#logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main {
    color: #07142f;
    font-size: 27px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
}

.nav a,
.nav .nav-notice-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: #1f2b3a;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.nav a i,
.nav .nav-notice-btn i {
    flex: 0 0 auto;
    font-size: 15px;
}

.nav .nav-caret {
    font-size: 11px;
    color: #667789;
}

.nav a:hover,
.nav .nav-notice-btn:hover,
.nav a:focus-visible,
.nav .nav-notice-btn:focus-visible {
    outline: none;
    color: var(--blue-dark);
    background: #eef7ff;
    border-color: #cbe3f8;
    transform: translateY(-1px);
}

.nav a.active {
    color: var(--blue-dark);
    background: #eef7ff;
    border-color: #cbe3f8;
    box-shadow: inset 0 -2px 0 var(--blue);
}

.nav .contact-link {
    color: #ffffff;
    background: linear-gradient(145deg, #176ec7, #0b5caf);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 18px rgba(23, 110, 199, 0.22);
}

.nav .contact-link:hover,
.nav .contact-link:focus-visible {
    color: #ffffff;
    background: linear-gradient(145deg, #0f63bb, #084f9d);
    border-color: rgba(255, 255, 255, 0.48);
}

.nav-notice-btn.has-notice {
    position: relative;
}

.nav-notice-btn .notice-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e53e4f;
    box-shadow: 0 0 0 2px #ffffff;
}

.nav-notice-btn .notice-dot.hidden {
    display: none;
}

.community-menu {
    position: absolute;
    top: 100%;
    right: 0;
    display: none;
    min-width: 180px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.community-menu.show {
    display: flex;
    flex-direction: column;
}

/* Hero */
.intro {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 11% 20%, rgba(42, 137, 220, 0.10) 0 1px, transparent 2px) 0 0 / 18px 18px,
        linear-gradient(102deg, #eef8ff 0%, #f9fdff 50%, #e6f3ff 100%);
    border-bottom: 1px solid #dbeaf6;
}

.intro::before {
    content: "";
    position: absolute;
    left: -80px;
    bottom: -110px;
    width: 270px;
    height: 270px;
    border: 1px solid rgba(64, 137, 203, 0.16);
    border-radius: 50%;
    box-shadow:
        0 0 0 14px rgba(64, 137, 203, 0.04),
        0 0 0 30px rgba(64, 137, 203, 0.035),
        0 0 0 48px rgba(64, 137, 203, 0.03);
}

.intro-inner {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 214px;
    padding: 30px 260px 34px;
}

.intro-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    text-align: center;
}

.intro h1 {
    color: #07142f;
    font-size: 56px;
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: 0;
}

.intro-slogan {
    margin-top: 8px;
    color: #0f1b2d;
    font-size: 18px;
    font-weight: 800;
}

.intro-note {
    margin-top: 8px;
    color: #4f5f70;
    font-size: 14px;
}

.hero-visual {
    position: absolute;
    top: 50%;
    right: 54px;
    width: 190px;
    height: 136px;
    transform: translateY(-50%);
    filter: drop-shadow(0 18px 22px rgba(40, 112, 190, 0.20));
}

.book-shape,
.lens-shape,
.cube-shape {
    position: absolute;
}

.book-shape {
    left: 18px;
    bottom: 20px;
    width: 94px;
    height: 68px;
    border-radius: var(--radius);
    background: linear-gradient(145deg, #8fc6ff 0%, #4c93e5 74%);
    transform: rotate(-15deg) skewY(-5deg);
    box-shadow: inset 0 -8px 0 rgba(255, 255, 255, 0.2);
}

.book-shape::before {
    content: "";
    position: absolute;
    left: 9px;
    bottom: 8px;
    width: 70px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
}

.book-shape::after {
    content: "";
    position: absolute;
    right: -18px;
    top: 6px;
    width: 18px;
    height: 58px;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: linear-gradient(180deg, #2f78ca, #5ca5f0);
    transform: skewY(20deg);
}

.lens-shape {
    right: 20px;
    bottom: 20px;
    width: 70px;
    height: 70px;
    border: 16px solid rgba(82, 150, 229, 0.72);
    border-radius: 50%;
}

.lens-shape::after {
    content: "";
    position: absolute;
    right: -25px;
    bottom: -11px;
    width: 45px;
    height: 16px;
    border-radius: 999px;
    background: rgba(82, 150, 229, 0.7);
    transform: rotate(39deg);
}

.cube-shape {
    top: 7px;
    right: 44px;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: linear-gradient(145deg, #b9dcff, #6aadfb);
    transform: rotate(18deg);
    opacity: 0.86;
}

/* Sections */
.section {
    padding: 42px 7% 58px;
}

#learn {
    background: #ffffff;
}

.section.gray {
    background: linear-gradient(180deg, #f7fbff 0%, #edf6ff 100%);
    border-top: 1px solid #e0edf8;
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 24px;
    text-align: center;
}

.section-heading h2 {
    color: #07142f;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 0;
}

.section-heading h2::after {
    content: "";
    display: block;
    width: 36px;
    height: 3px;
    margin: 8px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #176ec7, #40a5ef);
}

.section-heading p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 14px;
}

/* Subject grid */
.subjects {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 22px;
    max-width: 1120px;
    margin: 0 auto 18px;
}

.second-row {
    margin-bottom: 0;
}

.subject {
    --accent: #176ec7;
    --accent-2: #3aa0ef;
    --accent-dark: #0b4d91;
    --soft: #eef8ff;
    --edge: #9acded;
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 14px;
    min-height: 82px;
    padding: 12px 14px;
    overflow: hidden;
    color: var(--ink);
    text-decoration: none;
    background: linear-gradient(100deg, #ffffff 0%, var(--soft) 100%);
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    box-shadow: 0 8px 22px rgba(16, 52, 91, 0.09);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.subject::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--accent);
    opacity: 0.88;
}

.subject:hover,
.subject:focus-visible {
    outline: none;
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.subject-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: #ffffff;
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    border-radius: var(--radius);
    box-shadow: 0 10px 18px rgba(22, 82, 146, 0.16);
}

.subject-icon i {
    font-size: 24px;
}

.subject-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2px;
    min-width: 0;
}

.subject-copy strong {
    color: var(--accent-dark);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.18;
}

.subject-copy small {
    color: #566476;
    font-size: 13px;
    line-height: 1.25;
}

.subject-arrow {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--accent-dark);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    transition: transform 180ms ease, background 180ms ease;
}

.subject:hover .subject-arrow,
.subject:focus-visible .subject-arrow {
    transform: translateX(3px);
    background: #ffffff;
}

.stumath {
    --accent: #1b82d8;
    --accent-2: #3aa6f2;
    --accent-dark: #1261a5;
    --soft: #eef8ff;
    --edge: #8cc9ef;
}

.stuphys {
    --accent: #ed7d22;
    --accent-2: #f5a45d;
    --accent-dark: #b85c17;
    --soft: #fff4e9;
    --edge: #f1c092;
}

.stuchem {
    --accent: #6b3fc0;
    --accent-2: #8a66d4;
    --accent-dark: #58309c;
    --soft: #f5f0ff;
    --edge: #c7b4ea;
}

.stubio {
    --accent: #13a978;
    --accent-2: #35c991;
    --accent-dark: #087c59;
    --soft: #ecfbf4;
    --edge: #8bd9b6;
}

.stuhis {
    --accent: #687482;
    --accent-2: #8793a1;
    --accent-dark: #4d5966;
    --soft: #f5f7f9;
    --edge: #bcc6d0;
}

.stueng {
    --accent: #c72f3f;
    --accent-2: #e05d68;
    --accent-dark: #a31e2d;
    --soft: #fff0f2;
    --edge: #f1adb5;
}

.stugeo {
    --accent: #c8a414;
    --accent-2: #e6c548;
    --accent-dark: #8d6e0e;
    --soft: #fff9e5;
    --edge: #e7d184;
}

.stuecon {
    --accent: #073c72;
    --accent-2: #1a659f;
    --accent-dark: #062c54;
    --soft: #eef6ff;
    --edge: #91afce;
}

/* Other area */
.games {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    max-width: 1120px;
    margin: 0 auto;
}

.game-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 14px;
    min-height: 96px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #d8e7f5;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.game-card:hover {
    transform: translateY(-3px);
    border-color: #9fc9ef;
    box-shadow: var(--shadow-md);
}

.game-icon {
    display: grid;
    grid-row: 1 / span 2;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #ffffff;
    background: linear-gradient(145deg, #176ec7, #43a5ef);
    border-radius: var(--radius);
}

.game-card strong {
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
}

.game-card span:last-child {
    color: var(--muted);
    font-size: 13px;
}

/* Footer */
.footer {
    padding: 46px 7%;
    color: #d9e6f2;
    background:
        linear-gradient(135deg, rgba(23, 110, 199, 0.16), transparent 38%),
        #07172e;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    max-width: 1120px;
    margin: 0 auto;
}

.footer-grid > div {
    padding-left: 16px;
    border-left: 3px solid rgba(94, 170, 239, 0.68);
}

.footer h3 {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
}

.footer p {
    color: #c5d5e6;
    font-size: 14px;
}

.footer p + p {
    margin-top: 5px;
}

/* Notice modal */
.notice-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(7, 20, 47, 0.48);
    backdrop-filter: blur(6px);
}

.notice-modal.active {
    display: flex;
}

.notice-modal-card {
    position: relative;
    width: min(540px, 100%);
    max-height: 82vh;
    padding: 22px 20px 18px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #cfe2f3;
    border-radius: var(--radius);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.24);
}

.notice-modal-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: #0b4d91;
    font-size: 22px;
    font-weight: 900;
}

#noticeTitle .fa-bell {
    color: #d6a413;
}

.notice-content {
    max-height: calc(82vh - 96px);
    overflow: auto;
    padding-right: 6px;
    color: #263345;
    line-height: 1.65;
}

.notice-content h4 {
    margin: 0 0 6px;
    color: #0b4d91;
    font-size: 16px;
    font-weight: 900;
}

.notice-content p {
    margin: 0 0 12px;
    color: #3c4a5c;
}

.notice-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.notice-content .notice-copyright {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 6px 0 12px;
    padding: 11px 12px;
    color: #0f7c52;
    background: #ecfbf4;
    border-left: 4px solid #13a978;
    border-radius: var(--radius);
    font-weight: 800;
}

.notice-content .notice-copyright i {
    margin-top: 3px;
    color: #13a978;
}

.notice-close {
    position: absolute;
    top: 9px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #566476;
    background: transparent;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    transition: background 180ms ease, color 180ms ease;
}

.notice-close:hover,
.notice-close:focus-visible {
    outline: none;
    color: #0b4d91;
    background: #eef7ff;
}

/* Responsive */
@media (max-width: 1180px) {
    .header {
        gap: 18px;
        padding: 12px 24px;
    }

    .main {
        font-size: 24px;
    }

    .nav a,
    .nav .nav-notice-btn {
        padding: 0 11px;
    }

    .intro-inner {
        padding-right: 220px;
        padding-left: 40px;
    }

    .subjects {
        gap: 16px;
    }
}

@media (max-width: 980px) {
    .header {
        flex-wrap: wrap;
        gap: 10px 16px;
        padding: 12px 18px;
    }

    .brand {
        width: 100%;
    }

    .nav {
        justify-content: space-between;
        gap: 6px;
    }

    .nav a,
    .nav .nav-notice-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 8px;
        font-size: 13px;
    }

    .intro-inner {
        min-height: 210px;
        padding: 30px 170px 34px 30px;
    }

    .intro h1 {
        font-size: 48px;
    }

    .hero-visual {
        right: 12px;
        opacity: 0.72;
        transform: translateY(-50%) scale(0.86);
    }

    .subjects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .games,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .header {
        display: grid;
        grid-template-columns: minmax(0, auto) 1fr;
        align-items: center;
        gap: 8px;
        min-height: 0;
        padding: 9px 10px;
    }

    .brand {
        width: auto;
        gap: 10px;
        min-width: 0;
    }

    #logo {
        width: 34px;
        height: 34px;
    }

    .main {
        font-size: 17px;
    }

    .nav {
        display: grid;
        grid-template-columns: repeat(4, 34px);
        justify-content: end;
        gap: 5px;
        width: auto;
        padding-top: 0;
    }

    .nav a,
    .nav .nav-notice-btn {
        min-width: 34px;
        min-height: 34px;
        padding: 0;
        border-color: #d5e8f8;
        background: #f7fbff;
    }

    .nav-text,
    .notice-label,
    .nav-caret {
        display: none;
    }

    .nav a i,
    .nav .nav-notice-btn i {
        font-size: 14px;
    }

    .nav .contact-link {
        border-color: transparent;
    }

    .intro-inner {
        min-height: 136px;
        padding: 18px 18px 20px;
    }

    .intro::before,
    .hero-visual {
        display: none;
    }

    .intro h1 {
        font-size: 31px;
    }

    .intro-slogan {
        margin-top: 4px;
        font-size: 14px;
    }

    .intro-note {
        max-width: 300px;
        margin: 6px auto 0;
        font-size: 11px;
        line-height: 1.45;
    }

    .section {
        padding: 28px 12px 38px;
    }

    .section-heading {
        margin-bottom: 18px;
    }

    .section-heading h2 {
        font-size: 25px;
    }

    .section-heading h2::after {
        width: 28px;
        margin-top: 6px;
    }

    .section-heading p {
        margin-top: 6px;
        font-size: 12px;
    }

    .subjects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 10px;
    }

    .subject {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 8px;
        min-height: 62px;
        padding: 8px 28px 8px 9px;
        box-shadow: 0 6px 16px rgba(16, 52, 91, 0.08);
    }

    .subject-icon {
        width: 38px;
        height: 38px;
    }

    .subject-icon i {
        font-size: 18px;
    }

    .subject-copy {
        gap: 1px;
    }

    .subject-copy strong {
        font-size: 13px;
    }

    .subject-copy small {
        font-size: 10px;
    }

    .subject-arrow {
        position: absolute;
        top: 50%;
        right: 6px;
        width: 22px;
        height: 22px;
        font-size: 10px;
        transform: translateY(-50%);
    }

    .subject:hover .subject-arrow,
    .subject:focus-visible .subject-arrow {
        transform: translate(2px, -50%);
    }

    .games {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .game-card {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 104px;
        padding: 12px 8px;
        text-align: center;
        gap: 6px;
    }

    .game-icon {
        width: 38px;
        height: 38px;
    }

    .game-card strong {
        font-size: 12px;
        line-height: 1.2;
    }

    .game-card span:last-child {
        font-size: 10px;
    }

    .footer {
        padding: 34px 16px;
    }

    .footer-grid {
        gap: 20px;
    }
}

@media (max-width: 370px) {
    .header {
        grid-template-columns: 38px 1fr;
    }

    .main {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .nav {
        grid-template-columns: repeat(4, 32px);
        gap: 4px;
    }

    .nav a,
    .nav .nav-notice-btn {
        min-width: 32px;
        min-height: 32px;
    }

    .intro h1 {
        font-size: 28px;
    }

    .subject {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 7px;
        padding: 7px 24px 7px 8px;
    }

    .subject-icon {
        width: 34px;
        height: 34px;
    }

    .subject-icon i {
        font-size: 16px;
    }

    .subject-copy strong {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
