/* desktop */
.app {
    margin: 0;
}

.header {
    height: var(--header-height);
    background: var(--background-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.1px;
    background: #c9a84c2c;
}

.header__navbar {
    height: 100%;
}

.header__navbar--list {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 18px;
    margin-left: 10px;
    margin-right: 10px;
    width: 100%;
}

.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Noto Serif SC', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: .02em;
    text-decoration: none;
}

.logo-zh {
    font-size: 28px;
    line-height: 1;
}

nav {
    display: flex;
    align-items: center;
    gap: 8px
}

/* Nút chuyển đổi sáng tối */
.toggle-switch {
    display: inline-block;
    position: relative;
    width: 50px;
    height: 30px;
}

.toggle-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #bcbbbb;
    transition: 0.45s;
    border-radius: 34px;
}

.slider::before {
    content: "🌒";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 5px;
    bottom: 5px;
    top: 50%;
    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: 0.4s;
    border-radius: 50%;
}

.slider:hover::before {
    transform: translateY(-50%) rotate(20deg);
}

input:checked+.slider {
    background: rgb(192, 223, 114);

}

input:checked+.slider::before {
    transform: translate(20px, -50%);
    content: "☀️";
}

.light-mode {
    background-color: var(--body-color);
    color: #f4f4f4;
    z-index: 3;
}

.container {
    margin-top: 70px;
}

.btn-login {
    padding: 9px 22px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(201, 168, 76, .4);
    color: var(--gold-light);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    font-family: inherit;
    transition: all .25s;
}

.btn-login:hover {
    background: rgba(201, 168, 76, .12);
    border-color: var(--gold)
}

.btn-register {
    padding: 9px 22px;
    border-radius: 6px;
    background: var(--red);
    border: 1px solid var(--red);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    font-family: inherit;
    transition: all .25s;
}

.btn-register:hover {
    background: var(--red-deep);
    border-color: var(--red-deep)
}

/* HERO */
.hero {
    position: relative;
    z-index: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px 80px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .18em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 28px;
    padding: 7px 18px;
    border-radius: 20px;
    border: 1px solid rgba(201, 168, 76, .3);
    background: rgba(201, 168, 76, .06);
}

.hero-eyebrow span {
    width: 20px;
    height: 1px;
    background: var(--gold);
    display: block
}

.hero-zh {
    font-family: 'Noto Serif SC', serif;
    font-size: clamp(60px, 10vw, 130px);
    font-weight: 900;
    color: var(--red);
    line-height: 1;
    letter-spacing: -.02em;
    margin-bottom: 8px;
    text-shadow: 0 0 80px rgba(192, 57, 43, .35);
}

.hero-title {
    font-family: 'Noto Serif SC', serif;
    font-size: clamp(18px, 3vw, 32px);
    font-weight: 400;
    color: var(--paper);
    letter-spacing: .08em;
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-color);
    max-width: 500px;
    line-height: 1.8;
    margin-bottom: 48px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap
}

.cta-primary {
    padding: 15px 36px;
    border-radius: 8px;
    background: var(--red);
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .06em;
    cursor: pointer;
    font-family: inherit;
    transition: all .3s;
    box-shadow: 0 4px 24px rgba(192, 57, 43, .4);
}

.cta-primary:hover {
    background: var(--red-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(192, 57, 43, .5)
}

/* driver */
.divider {
    position: relative;
    z-index: 0;
    text-align: center;
    padding: 60px 24px;
}

.divider-line {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.divider-line::before,
.divider-line::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, .3), transparent);
}

.divider-zh {
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    letter-spacing: .2em;
    color: var(--gold);
}

/* hsk levels */
.section {
    position: relative;
    z-index: 0;
    padding: 100px 48px;
}

.section-label {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .2em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 16px;

    display: flex;
    justify-content: center;
}

.section-title {
    /* font-family: 'Noto Serif SC', serif; */
    font-size: clamp(14px, 4vw, 20px);
    font-weight: 700;
    color: var(--paper);
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-sub {
    font-size: 15px;
    font-weight: 300;
    color: var(--text-color);
    max-width: 500px;
    line-height: 1.8;
    margin-bottom: 64px;
}

.hsk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.hsk-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 32px;
    border: 1px solid rgba(247, 243, 235, .07);
    background: var(--box-hsk);
    cursor: pointer;
    transition: all .3s;
}

.hsk-card:hover {
    border-color: rgba(201, 168, 76, .25);
    background: rgba(247, 243, 235, .06);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.hsk-num {
    font-family: 'Noto Serif SC', serif;
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    position: absolute;
    right: 20px;
    top: 16px;
    opacity: .06;
    color: var(--paper);
    transition: opacity .3s;
}

.hsk-card:hover .hsk-num {
    opacity: .12
}

.hsk-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hsk-name {
    font-family: 'Noto Serif SC', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.hsk-desc {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 20px;
}

.hsk-skills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hsk-skill {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    background: rgba(247, 243, 235, .06);
    color: var(--hsk-color);
    border: 1px solid rgba(247, 243, 235, .08);
}

/* level colors */
.l1 {
    --lc: #27ae60
}

.l2 {
    --lc: #2980b9
}

.l3 {
    --lc: #8e44ad
}

.l4 {
    --lc: #c0392b
}

.l5 {
    --lc: #e67e22
}

.l6 {
    --lc: #c9a84c
}

.hsk-badge {
    background: rgba(var(--lc-r, 39), var(--lc-g, 174), var(--lc-b, 96), .15);
    color: var(--lc)
}

.l1 .hsk-badge {
    background: rgba(39, 174, 96, .12);
    color: #27ae60
}

.l2 .hsk-badge {
    background: rgba(41, 128, 185, .12);
    color: #2980b9
}

.l3 .hsk-badge {
    background: rgba(142, 68, 173, .12);
    color: #8e44ad
}

.l4 .hsk-badge {
    background: rgba(192, 57, 43, .12);
    color: #c0392b
}

.l5 .hsk-badge {
    background: rgba(230, 126, 34, .12);
    color: #e67e22
}

.l6 .hsk-badge {
    background: rgba(201, 168, 76, .12);
    color: #c9a84c
}

.hsk-card.l4:hover,
.hsk-card.l5:hover,
.hsk-card.l6:hover {
    border-color: rgba(192, 57, 43, .2)
}

/* FEATURES */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.feat {
    padding: 32px 28px;
    border-radius: 12px;
    border: 1px solid rgba(247, 243, 235, .06);
    background: var(--box-hsk);
    transition: all .3s;
}

.feat:hover {
    background: rgba(247, 243, 235, .05);
    border-color: rgba(201, 168, 76, .15)
}

.feat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(192, 57, 43, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 22px;
}

.feat-title {
    /* font-family: 'Noto Serif SC', serif; */
    font-size: 17px;
    font-weight: 700;
    color: var(--paper);
    margin-bottom: 10px;
}

.feat-desc {
    font-size: 13px;
    font-weight: 300;
    color: var(--hsk-color);
    line-height: 1.7
}

/* Driver */
.divider {
    position: relative;
    z-index: -1;
    text-align: center;
    padding: 60px 24px;
}

.divider-line {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.divider-line::before,
.divider-line::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, .3), transparent);
}

.divider-zh {
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    letter-spacing: .2em;
    color: var(--gold);
}

/* FOOTER */
footer {
    position: relative;
    z-index: 0;
    padding: 48px;
    border-top: 1px solid rgba(247, 243, 235, .06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo {
    font-family: 'Noto Serif SC', serif;
    font-size: 18px;
    color: var(--gold-light);
    font-weight: 700;
}

.footer-copy {
    font-size: 13px;
    color: var(--text-color);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 200;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 32px 32px 0;
}

.modal-groupheader {
    display: flex;
    gap: 20px;
    text-align: center;
    justify-content: center;

}

.modal-groupheader>*:not(:last-child) {
    border-right: 1px solid #333;
    padding-right: 10px;
}

.modal-zh {
    font-family: 'Noto Serif SC', serif;
    font-size: 32px;
    color: var(--red);
    line-height: 1;
    margin-bottom: 4px;
}

.modal-title {
    font-size: 24px;
    margin-top: 3px;
    font-weight: 700;
    color: var(--paper);
}

.modal-sub {
    font-size: 13px;
    color: var(--text-color);
    margin-top: 4px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .2s;
}

.modal-close:hover {
    background: rgba(247, 243, 235, .08);
}

.modal-body {
    padding: 24px 32px;
}

.modal-footer {
    padding: 16px 32px 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-color);
    border-top: 1px solid rgba(247, 243, 235, .06);
}

.modal-footer a {
    color: var(--gold-light);
    cursor: pointer;
    font-weight: 600;
}

.modal-footer a:hover {
    text-decoration: underline;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--paper);
}

.form-group input {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(247, 243, 235, .15);
    background: rgba(247, 243, 235, .05);
    color: var(--paper);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}

.form-group input:focus {
    border-color: rgba(201, 168, 76, .4);
}

/* .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
} */

.btn-submit {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: var(--red);
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .25s;
    margin-bottom: 16px;
}

.btn-submit:hover {
    background: var(--red-deep);
    transform: translateY(-1px);
}

.form-divider {
    text-align: center;
    position: relative;
    margin-bottom: 16px;
    color: var(--text-color);
    font-size: 12px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: rgba(247, 243, 235, .1);
}

.form-divider::before {
    left: 0;
}

.form-divider::after {
    right: 0;
}

.btn-google {
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(247, 243, 235, .15);
    color: var(--paper);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all .25s;
}

.btn-google:hover {
    background: rgba(247, 243, 235, .05);
    border-color: rgba(201, 168, 76, .25);
}

.google-icon {
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.14 0 5.95 1.08 8.17 2.86l6.09-6.09C34.46 3.19 29.57 1 24 1 14.82 1 7.07 6.48 3.64 14.28l7.08 5.5C12.4 13.72 17.73 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.1 24.55c0-1.64-.15-3.22-.42-4.73H24v8.95h12.42c-.54 2.9-2.18 5.36-4.65 7.02l7.18 5.58C43.18 37.78 46.1 31.65 46.1 24.55z'/%3E%3Cpath fill='%23FBBC05' d='M10.72 28.22A14.6 14.6 0 0 1 9.5 24c0-1.47.25-2.9.7-4.22l-7.08-5.5A23.93 23.93 0 0 0 0 24c0 3.87.93 7.53 2.56 10.76l8.16-6.54z'/%3E%3Cpath fill='%2334A853' d='M24 47c5.57 0 10.25-1.85 13.67-5.02l-7.18-5.58C28.72 37.67 26.48 38.5 24 38.5c-6.27 0-11.6-4.22-13.28-9.92l-8.16 6.54C6.07 42.7 14.46 47 24 47z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: rgba(247, 243, 235, .1);
    margin-top: 6px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width .3s, background .3s;
}

.alert {
    font-size: 13px;
    border-radius: 6px;
    padding: 0;
    margin-bottom: 0;
    transition: all .3s;
}

.alert.error {
    padding: 10px 14px;
    background: rgba(192, 57, 43, .12);
    border: 1px solid rgba(192, 57, 43, .3);
    color: #e74c3c;
    margin-bottom: 16px;
}

.alert.success {
    padding: 10px 14px;
    background: rgba(39, 174, 96, .12);
    border: 1px solid rgba(39, 174, 96, .3);
    color: #27ae60;
    margin-bottom: 16px;
}

/* Thêm chức năng hiển thị mật khẩu */
.from-groupeye {
    display: grid;
    grid-template-columns: 5fr 1fr;
    gap: 30px;
}

.eye {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-color);
    transition: color .2s;
    user-select: none;
}

/* ------------------------------Tablet & Mobile------------------------------ */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.mobile-menu {
    position: fixed;
    top: calc(var(--header-height) - 25px);
    left: -1px;

    width: 250px;
    height: 100vh;
    background: var(--color-menuphone);
    padding: 20px;

    overflow-y: auto;
    overflow-x: hidden;

    display: flex;
    flex-direction: column;
    gap: 15px;

    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
}

.mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu.active {
    transform: translateX(0);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -5px);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);

    opacity: 0;
    visibility: hidden;

    transition: 0.3s;
    z-index: 1;
}

/* Khi mở menu */
.overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-link,
.top-page,
.help-link {
    color: white;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        align-items: center;
        margin-right: 20px;
    }

    /* Ẩn nav */
    .nav-right .toggle-switch,
    .nav-right .btn-register,
    .nav-right .btn-login {
        display: none;
    }

    .header {
        height: calc(var(--header-height) - 20px);
    }

    .container {
        margin-top: calc(var(--header-height) - 20px);
    }

    .logo {
        gap: 5px;
    }

    .logo-zh {
        font-size: 2rem;
        margin-left: 10px;
    }

    p {
        font-size: 2rem;
    }

    .modal-groupheader {
        display: flex;
        justify-content: flex-start;
    }

    .modal-groupheader>*:not(:last-child) {
        border: none;
        padding-right: 0;
    }

    .modal-title {
        display: none;
    }
}