:root {
    --navy: #0b1628;
    --navy-mid: #112240;
    --navy-light: #1d3461;
    --amber: #f5a623;
    --amber-light: #ffc654;
    --white: #ffffff;
    --off-white: #f0f4f8;
    --slate: #8892a4;
    --slate-light: #c0c8d8;
    --border: rgba(255,255,255,0.08);
    --border-light: #e2e8f0;
    --primary: #1a73e8;
    --primary-dark: #0056b3;
    --text-dark: #1a202c;
    --text-light: #718096;
    --success: #28a745;
    --error: #dc3545;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: 'Sora', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--navy);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}

body::-webkit-scrollbar { width: 4px; }
body::-webkit-scrollbar-track { background: transparent; }
body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 2px; }

body::before {
    content: '';
    position: fixed; inset: 0;
    background-image:
            linear-gradient(rgba(245,166,35,0.032) 1px, transparent 1px),
            linear-gradient(90deg, rgba(245,166,35,0.032) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none; z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(26,115,232,0.1) 0%, transparent 70%);
    top: -120px; left: -120px;
    pointer-events: none; z-index: 0;
}

.orb-r {
    position: fixed;
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(245,166,35,0.065) 0%, transparent 70%);
    bottom: -80px; left: 35%;
    pointer-events: none; z-index: 0;
}

/* ── LAYOUT ── */
.page-wrapper {
    position: relative; z-index: 1;
    width: 100%;
    display: flex;
    min-height: 100vh;
}

/* ════ LEFT HERO ════ */
.hero-panel {
    flex: 1;
    padding: 50px 56px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.hero-panel::after {
    content: '';
    position: absolute;
    right: 0; top: 6%; bottom: 6%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.09), transparent);
}

.brand-mark {
    display: flex; align-items: center; gap: 11px;
    margin-bottom: 0;
}

.brand-logo {
    width: 34px; height: 34px;
    background: var(--amber); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700; color: var(--navy);
    flex-shrink: 0;
}

.brand-name {
    font-size: 16px; font-weight: 600;
    color: var(--white); letter-spacing: 0.4px;
}

.brand-name em { color: var(--amber); font-style: normal; }

/* Hero body */
.hero-content {
    flex: 1;
    display: flex; flex-direction: column; justify-content: center;
    padding: 32px 0 24px;
}

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(245,166,35,0.1);
    border: 1px solid rgba(245,166,35,0.22);
    border-radius: 100px;
    padding: 5px 14px; margin-bottom: 22px;
    width: fit-content;
}

.eyebrow-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--amber);
    animation: blink 2.2s ease-in-out infinite;
}

@keyframes blink {
    0%,100% { opacity:1; transform:scale(1); }
    50% { opacity:0.5; transform:scale(0.8); }
}

.hero-eyebrow span {
    font-size: 11px; font-weight: 500;
    color: var(--amber-light); letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-headline {
    font-family: 'Noto Serif SC', serif;
    font-size: clamp(1.85rem, 2.8vw, 2.6rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.hero-headline .hl { color: var(--amber); }

.hero-sub {
    font-size: 14px;
    color: var(--slate);
    line-height: 1.82;
    max-width: 390px;
    margin-bottom: 36px;
}

/* N1 PRO Card */
.n1-card {
    background: rgba(255,255,255,0.038);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.n1-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245,166,35,0.55), transparent);
}

.n1-card-head {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.n1-title {
    font-size: 14.5px; font-weight: 700;
    color: var(--white);
}

.n1-title span { color: var(--amber); }

.n1-badge {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.8px; text-transform: uppercase;
    color: var(--amber);
    background: rgba(245,166,35,0.11);
    border: 1px solid rgba(245,166,35,0.28);
    border-radius: 100px; padding: 3px 10px;
}

.cap-grid {
    display: flex; flex-wrap: wrap; gap: 7px;
}

.cap-pill {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 100px;
    padding: 5px 12px;
    font-size: 12px; color: var(--slate-light);
    transition: all 0.2s; cursor: default;
}

.cap-pill:hover {
    background: rgba(245,166,35,0.1);
    border-color: rgba(245,166,35,0.28);
    color: var(--amber-light);
}

.cap-dot {
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--amber); opacity: 0.65; flex-shrink: 0;
}

/* Stats */
.stats-row { display: flex; gap: 36px; }

.stat-item { display: flex; flex-direction: column; gap: 4px; }

.stat-value {
    font-size: 20px; font-weight: 700;
    color: var(--white); line-height: 1;
}

.stat-value em { color: var(--amber); font-style: normal; }

.stat-label {
    font-size: 10.5px; color: var(--slate);
    letter-spacing: 0.5px; text-transform: uppercase;
}

/* ════ RIGHT AUTH ════ */
.auth-panel {
    width: 35%;
    min-width: 480px;
    max-width: 600px;
    flex-shrink: 0;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 8%;
    min-height: 100vh;
}

.auth-inner {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.auth-title { margin-bottom: 28px; }

.auth-title h2 {
    font-family: 'Noto Serif SC', serif;
    font-size: 23px; font-weight: 700;
    color: var(--text-dark); margin-bottom: 6px;
}

.auth-title p { font-size: 13px; color: var(--text-light); }

/* Tabs */
.tabs {
    display: flex;
    background: var(--off-white);
    border-radius: 10px; padding: 4px;
    margin-bottom: 24px;
}

.tab {
    flex: 1; text-align: center;
    padding: 9px 0;
    font-size: 14px; font-weight: 500;
    color: var(--text-light);
    cursor: pointer; border-radius: 7px;
    transition: all 0.2s; user-select: none;
}

.tab.active {
    background: var(--white); color: var(--text-dark);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.input-group { margin-bottom: 15px; }

.input-group label {
    display: block; font-size: 13px; font-weight: 500;
    color: var(--text-dark); margin-bottom: 7px;
}

.input-group input {
    width: 100%; padding: 11px 13px;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px; font-family: inherit;
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}

.verification-group { display: flex; gap: 8px; }
.verification-group input { flex: 1; }

.verification-group button {
    padding: 0 13px;
    background: var(--off-white); color: var(--primary);
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    font-size: 13px; font-weight: 500; font-family: inherit;
    cursor: pointer; white-space: nowrap;
    transition: all 0.2s;
}

.verification-group button:hover {
    background: var(--primary); color: #fff; border-color: var(--primary);
}

.verification-group button:disabled { opacity: 0.5; cursor: not-allowed; }

.submit-btn {
    width: 100%; padding: 12px;
    background: var(--navy); color: var(--white);
    border: none; border-radius: 8px;
    font-size: 15px; font-weight: 600; font-family: inherit;
    cursor: pointer;
    transition: all 0.22s;
    letter-spacing: 0.5px; margin-top: 4px;
}

.submit-btn:hover {
    background: var(--navy-mid);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(11,22,40,0.2);
}

.submit-btn:active { transform: translateY(0); }

.form-info {
    margin-top: 16px; text-align: center;
    font-size: 13px; color: var(--text-light);
}

.form-info a {
    color: var(--primary); text-decoration: none;
    font-weight: 500; cursor: pointer;
}

.form-info a:hover { text-decoration: underline; }

.privacy-line {
    margin-top: 26px; padding-top: 18px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 12px; color: var(--text-light);
    line-height: 1.6;
}

.privacy-line a { color: var(--primary); cursor: pointer; text-decoration: none; }
.privacy-line a:hover { text-decoration: underline; }

.spinner {
    display: inline-block;
    width: 13px; height: 13px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%; border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 7px; vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ════ MODALS ════ */
.modal-overlay {
    display: none; position: fixed; z-index: 1000; inset: 0;
    background: rgba(11,22,40,0.6);
    backdrop-filter: blur(5px);
    justify-content: center; align-items: center;
}

.modal-overlay.open { display: flex; }

.modal-card {
    background: var(--white);
    border-radius: 16px;
    width: 90%; max-width: 456px;
    max-height: 88vh; overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.26);
    animation: modalIn 0.3s cubic-bezier(0.16,1,0.3,1);
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.modal-card::-webkit-scrollbar { width: 4px; }
.modal-card::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

@keyframes modalIn {
    from { opacity:0; transform:translateY(20px) scale(0.97); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-light);
    position: sticky; top: 0; background: #fff; z-index: 2;
}

.modal-header h2 { font-size: 16.5px; font-weight: 700; color: var(--text-dark); }

.modal-close-btn {
    width: 28px; height: 28px;
    border-radius: 50%; background: var(--off-white);
    border: none; cursor: pointer;
    font-size: 17px; color: var(--text-light);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; line-height: 1;
}

.modal-close-btn:hover { background: #e2e8f0; color: var(--text-dark); }

.modal-body { padding: 20px 24px 24px; }

/* Bind phone */
.bind-header { text-align: center; margin-bottom: 18px; }

.bind-icon {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin: 0 auto 11px;
}

.bind-header h3 { font-size: 16.5px; font-weight: 700; color: var(--text-dark); margin-bottom: 5px; }
.bind-header p { font-size: 13px; color: var(--text-light); }

.benefits-list {
    background: var(--off-white);
    border-radius: 10px; padding: 12px 15px;
    margin-bottom: 18px;
}

.benefit-item {
    display: flex; align-items: center; gap: 9px;
    font-size: 13px; color: #4a5568; padding: 4px 0;
}

.benefit-item .ck { color: var(--success); font-weight: 700; }

/* Region select group */
.phone-field-label {
    display: block; font-size: 13px; font-weight: 500;
    color: var(--text-dark); margin-bottom: 7px;
}

.region-phone-wrap {
    display: flex; gap: 8px; margin-bottom: 15px;
}

.region-select {
    padding: 11px 10px;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    font-size: 13px; font-family: inherit;
    color: var(--text-dark); background: var(--white);
    cursor: pointer; outline: none;
    flex-shrink: 0; width: 136px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.region-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}

.phone-num-input {
    flex: 1;
    padding: 11px 13px;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px; font-family: inherit;
    color: var(--text-dark); outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.phone-num-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}

/* Privacy / Terms modal */
.privacy-card {
    background: var(--white);
    border-radius: 16px;
    width: 90%; max-width: 660px;
    max-height: 88vh;
    display: flex; flex-direction: column;
    box-shadow: 0 24px 60px rgba(0,0,0,0.26);
    animation: modalIn 0.3s cubic-bezier(0.16,1,0.3,1);
}

.privacy-card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 26px 16px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.privacy-card-header h2 { font-size: 17px; font-weight: 700; color: var(--text-dark); margin-bottom: 3px; }
.privacy-card-header span { font-size: 12px; color: var(--text-light); }

.privacy-scroll-body {
    flex: 1; overflow-y: auto;
    padding: 24px 28px;
    background: #fafafa;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.privacy-scroll-body::-webkit-scrollbar { width: 4px; }
.privacy-scroll-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

.privacy-section { margin-bottom: 24px; }

.privacy-section h3 {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; font-weight: 700;
    color: var(--navy-light); margin-bottom: 11px;
}

.section-num {
    background: rgba(26,115,232,0.1); color: var(--primary);
    font-size: 11px; font-weight: 700;
    padding: 3px 8px; border-radius: 6px;
}

.privacy-section p, .privacy-section li {
    font-size: 13.5px; line-height: 1.8; color: #4b5563;
}

.privacy-section ul { padding-left: 18px; margin-top: 8px;}
.privacy-section li { margin-bottom: 8px; }

.contact-card {
    background: linear-gradient(to right, #f0f7ff, #fff);
    border: 1px solid #dbeafe; border-left: 4px solid var(--primary);
    padding: 15px 18px; border-radius: 8px; margin-top: 12px;
}

.contact-card p { font-size: 13px; color: #555; margin-bottom: 4px; }
.contact-card a { color: var(--primary); text-decoration: none; }

/* Responsive */
@media (max-width: 900px) {
    .hero-panel { display: none; }
    .auth-panel { width: 100%; padding: 48px 28px; }
}

@media (max-width: 480px) {
    .auth-panel { padding: 36px 20px; }
}

/* Entrance */
.hero-panel { animation: fadeUp 0.7s cubic-bezier(0.16,1,0.3,1) both; }
.auth-panel  { animation: fadeUp 0.7s 0.07s cubic-bezier(0.16,1,0.3,1) both; }

@keyframes fadeUp {
    from { opacity:0; transform:translateY(12px); }
    to   { opacity:1; transform:translateY(0); }
}