/* ================================================================
   VoSong Theme - Account Pages (Login / Register) - Redesigned
   Modern glassmorphism + MMO hero layout
   ================================================================ */

/* === Auth shell (shared by login + register) === */
.vs-auth-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    background: var(--color-bg-primary);
    overflow: hidden;
    font-family: var(--font-body);
    color: var(--color-text-primary);
}

.vs-auth-shell-register {
    padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 32px);
    align-items: flex-start;
}

/* --- Animated ambient background --- */
.vs-auth-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.vs-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: vsOrbFloat 18s ease-in-out infinite;
}

.vs-orb-1 {
    width: 520px;
    height: 520px;
    left: -160px;
    top: -140px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.55), transparent 65%);
}

.vs-orb-2 {
    width: 480px;
    height: 480px;
    right: -120px;
    top: 40%;
    background: radial-gradient(circle, rgba(212, 162, 76, 0.45), transparent 65%);
    animation-delay: -6s;
}

.vs-orb-3 {
    width: 340px;
    height: 340px;
    left: 40%;
    bottom: -120px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.45), transparent 70%);
    animation-delay: -12s;
}

@keyframes vsOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -40px) scale(1.05); }
}

.vs-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 100%);
    opacity: 0.6;
}

/* === Login stage === */
.vs-auth-stage {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    width: 100%;
    max-width: 1180px;
    min-height: 100vh;
    padding: clamp(24px, 4vw, 48px);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
}

/* --- Hero side (login) --- */
.vs-auth-hero {
    position: relative;
    padding: clamp(20px, 3vw, 40px);
}

.vs-hero-inner {
    max-width: 520px;
}

.vs-hero-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px 8px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    margin-bottom: 28px;
}

.vs-hero-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.vs-hero-tag {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gold-primary);
    letter-spacing: 0.5px;
}

.vs-hero-title {
    font-family: 'Cinzel', var(--font-heading);
    font-weight: 700;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1.08;
    margin: 0 0 20px;
    letter-spacing: 0.5px;
}

.vs-hero-title-row {
    display: block;
    color: var(--color-text-primary);
}

.vs-hero-title-accent {
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold-primary) 60%, var(--color-gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 42px rgba(212, 162, 76, 0.25);
}

.vs-hero-lead {
    font-size: 1.02rem;
    color: var(--color-text-secondary);
    max-width: 440px;
    margin: 0 0 28px;
    line-height: 1.6;
}

.vs-hero-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vs-hero-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-primary);
    font-size: 0.92rem;
}

.vs-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-gold-primary);
    box-shadow: 0 0 12px rgba(212, 162, 76, 0.7);
}

.vs-hero-meta {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    max-width: 440px;
}

.vs-hero-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vs-meta-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
}

.vs-meta-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.vs-meta-online { color: var(--color-status-online); display: inline-flex; align-items: center; gap: 6px; }

.vs-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-status-online);
    box-shadow: 0 0 10px var(--color-status-online);
    animation: vsPulse 1.8s ease-in-out infinite;
}

@keyframes vsPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* --- Form panel (login) --- */
.vs-auth-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.vs-auth-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: clamp(28px, 3vw, 40px);
    background: linear-gradient(160deg, rgba(22, 25, 56, 0.85), rgba(11, 13, 32, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow:
        0 25px 60px -20px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(212, 162, 76, 0.06) inset;
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.vs-auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, rgba(212, 162, 76, 0.4), transparent 35%, transparent 65%, rgba(59, 130, 246, 0.35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.vs-auth-card-head {
    text-align: left;
    margin-bottom: 24px;
}

.vs-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(212, 162, 76, 0.12);
    color: var(--color-gold-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border: 1px solid rgba(212, 162, 76, 0.3);
    margin-bottom: 12px;
}

.vs-chip-soft {
    background: rgba(59, 130, 246, 0.12);
    color: var(--color-blue-light);
    border-color: rgba(59, 130, 246, 0.3);
}

.vs-auth-title {
    font-family: 'Cinzel', var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--color-text-primary);
    letter-spacing: 0.5px;
}

.vs-auth-sub {
    color: var(--color-text-secondary);
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.5;
}

/* --- Form --- */
.vs-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.vs-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vs-field-full { grid-column: 1 / -1; }

.vs-field-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    letter-spacing: 0.2px;
}

.vs-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.vs-input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.vs-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: rgba(10, 12, 28, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 0.94rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.vs-input:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.vs-input:focus {
    border-color: var(--color-gold-primary);
    background: rgba(10, 12, 28, 0.85);
    box-shadow:
        0 0 0 3px rgba(212, 162, 76, 0.15),
        0 0 20px rgba(212, 162, 76, 0.1);
}

.vs-input:focus + .vs-input-icon,
.vs-input-wrap:focus-within .vs-input-icon {
    color: var(--color-gold-primary);
}

.vs-input::placeholder {
    color: var(--color-text-muted);
}

/* When there's no icon, reduce left padding */
.vs-input-wrap:not(:has(.vs-input-icon)) .vs-input { padding-left: 14px; }

.vs-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8fa3' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

.vs-input-toggle {
    position: absolute;
    right: 8px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.vs-input-toggle:hover { background: rgba(255, 255, 255, 0.05); color: var(--color-text-primary); }
.vs-input-toggle.is-on { color: var(--color-gold-primary); }
.vs-input-toggle svg { width: 18px; height: 18px; }

.vs-field-error {
    color: var(--color-red);
    font-size: 0.78rem;
    min-height: 14px;
}

/* --- Buttons --- */
.vs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    line-height: 1;
}

.vs-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.vs-btn-block { width: 100%; }
.vs-btn-tall { padding: 15px 22px; }

.vs-btn-primary {
    background: linear-gradient(135deg, var(--color-gold-primary), var(--color-gold-dark));
    color: #101020;
    box-shadow: 0 10px 30px -12px rgba(212, 162, 76, 0.6);
    position: relative;
    overflow: hidden;
}

.vs-btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.25), transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

.vs-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 38px -10px rgba(212, 162, 76, 0.75);
    background: linear-gradient(135deg, var(--color-gold-bright), var(--color-gold-primary));
}

.vs-btn-primary:hover::before { transform: translateX(120%); }
.vs-btn-primary:active { transform: translateY(0); }

.vs-btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vs-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-gold-primary);
    color: var(--color-gold-primary);
}

/* --- Form aux + divider --- */
.vs-form-aux {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.vs-ghost-link {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.vs-ghost-link:hover { color: var(--color-gold-primary); }

.vs-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 18px;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.vs-auth-divider::before,
.vs-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.vs-auth-footnote {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    text-align: center;
    margin: 6px 0 0;
}

/* --- Alerts --- */
.vs-alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 18px;
    line-height: 1.5;
}

.vs-alert:empty { display: none; }

.vs-alert-error,
.vs-alert-error ul {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ffb4b4;
    list-style: none;
    padding-left: 14px;
}

.vs-alert-error ul { margin: 0; padding: 0 0 0 18px; border: none; background: transparent; }

.vs-alert-debug {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ffb4b4;
}

.vs-alert-debug ul { margin: 6px 0 0 18px; padding: 0; }
.vs-alert-debug b { color: #ff8888; }

/* ================================================================
   REGISTER PAGE
   ================================================================ */
.vs-register-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
}

.vs-register-card {
    position: relative;
    padding: clamp(28px, 4vw, 46px);
    background: linear-gradient(160deg, rgba(22, 25, 56, 0.88), rgba(11, 13, 32, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.vs-register-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, rgba(212, 162, 76, 0.45), transparent 30%, transparent 70%, rgba(59, 130, 246, 0.4));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.vs-register-head {
    text-align: center;
    margin-bottom: 30px;
}

.vs-register-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 18px;
}

.vs-register-brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.vs-register-brand span {
    font-family: 'Cinzel', var(--font-heading);
    font-weight: 700;
    color: var(--color-gold-primary);
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.vs-register-head .vs-chip { display: inline-block; }

.vs-register-head .vs-auth-title { text-align: center; margin: 10px 0 6px; }
.vs-register-head .vs-auth-sub { text-align: center; max-width: 480px; margin: 0 auto; }

/* Step track (decorative) */
.vs-step-track {
    list-style: none;
    padding: 0;
    margin: 24px auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.vs-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
}

.vs-step span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    font-weight: 700;
}

.vs-step-active {
    border-color: rgba(212, 162, 76, 0.45);
    color: var(--color-gold-primary);
    background: rgba(212, 162, 76, 0.1);
}

.vs-step-active span {
    background: linear-gradient(135deg, var(--color-gold-primary), var(--color-gold-dark));
    color: #101020;
}

/* Fieldsets */
.vs-fieldset {
    margin: 0 0 24px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.015);
}

.vs-legend {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    margin-left: -2px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(212, 162, 76, 0.1);
    border: 1px solid rgba(212, 162, 76, 0.3);
    color: var(--color-gold-primary);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.vs-legend svg { width: 16px; height: 16px; }

.vs-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Captcha */
.vs-captcha {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: stretch;
}

.vs-captcha .vs-input-wrap { width: 100%; }

.vs-captcha-img {
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #fff;
}

.vs-captcha-refresh {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vs-captcha-refresh:hover {
    color: var(--color-gold-primary);
    border-color: var(--color-gold-primary);
    transform: rotate(-90deg);
}

.vs-captcha-refresh svg { width: 18px; height: 18px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
    .vs-auth-stage {
        grid-template-columns: 1fr;
        padding: 24px;
        min-height: auto;
        max-width: 520px;
    }
    .vs-auth-hero { text-align: center; padding: 0; }
    .vs-hero-inner { max-width: none; }
    .vs-hero-brand { margin: 0 auto 20px; }
    .vs-hero-features { align-items: flex-start; max-width: 400px; margin-left: auto; margin-right: auto; }
    .vs-hero-meta { margin: 0 auto; }
}

@media (max-width: 640px) {
    .vs-grid-2 { grid-template-columns: 1fr; }
    .vs-step-track { gap: 8px; }
    .vs-step { font-size: 0.75rem; padding: 4px 10px 4px 4px; }
    .vs-captcha { grid-template-columns: 1fr auto; }
    .vs-captcha-img { grid-column: 2 / 3; }
    .vs-captcha-refresh { grid-column: 1 / -1; }
    .vs-hero-title { font-size: 2rem; }
    .vs-auth-card, .vs-register-card { border-radius: 16px; }
}
