/* ============================================
   AUTH-PREMIUM.CSS — Complete Redesign (v2)
   Clean, professional, zero-bug glassmorphism UI
   ============================================ */


/* ============================================
   1. LAYOUT OVERRIDES
   Lock the page at exactly 100vh.
   The right panel (marketing) stays fixed.
   The left panel (form) scrolls independently.
   ============================================ */

.auth-split-layout {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

/* ── Ambient glow orbs ── */
.auth-split-layout::before,
.auth-split-layout::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(120px);
    opacity: 0.25;
}

.auth-split-layout::before {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.18) 0%, transparent 70%);
    top: -100px;
    right: -80px;
    animation: _orbA 14s ease-in-out infinite alternate;
}

.auth-split-layout::after {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.12) 0%, transparent 70%);
    bottom: -80px;
    left: -60px;
    animation: _orbB 16s ease-in-out infinite alternate;
}

@keyframes _orbA {
    to { transform: translate(-30px, 50px) scale(1.12); }
}

@keyframes _orbB {
    to { transform: translate(40px, -35px) scale(1.08); }
}


/* ============================================
   2. FORM PANEL (Left side — scrollable)
   ============================================ */

.auth-panel {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, rgba(11, 15, 20, 0.97) 0%, rgba(8, 12, 18, 0.99) 100%) !important;
    border-inline-start: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 32px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Webkit scrollbar */
.auth-panel::-webkit-scrollbar {
    width: 5px;
}

.auth-panel::-webkit-scrollbar-track {
    background: transparent;
}

.auth-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.auth-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* Subtle light bleed on the panel */
.auth-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 15%, rgba(0, 200, 255, 0.025) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 85%, rgba(167, 139, 250, 0.015) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}


/* ============================================
   3. GLASSMORPHISM CARD
   ============================================ */

.auth-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px !important;
    margin: auto !important;
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(32px) saturate(1.4);
    -webkit-backdrop-filter: blur(32px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 20px !important;
    padding: 36px 32px !important;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    animation: _cardEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}

/* Animated gradient border */
.auth-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        var(--border-angle, 135deg),
        rgba(0, 200, 255, 0.18) 0%,
        rgba(167, 139, 250, 0.08) 33%,
        rgba(0, 200, 255, 0.04) 66%,
        rgba(167, 139, 250, 0.12) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
    animation: _borderSpin 10s linear infinite;
}

/* Card top accent glow */
.auth-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 200, 255, 0.2), rgba(167, 139, 250, 0.12), transparent);
    border-radius: 1px;
}

@property --border-angle {
    syntax: '<angle>';
    initial-value: 135deg;
    inherits: false;
}

@keyframes _borderSpin {
    to { --border-angle: 495deg; }
}

@keyframes _cardEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ============================================
   4. AUTH HEADER
   ============================================ */

.auth-header {
    margin-block-end: 24px !important;
}

.auth-header h2 {
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 60%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p,
.auth-header .text-secondary {
    color: rgba(148, 163, 184, 0.55) !important;
    font-size: 0.85rem !important;
    margin-top: 6px;
}


/* ============================================
   5. FORM ELEMENTS
   ============================================ */

/* Labels */
.form-label {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: rgba(148, 163, 184, 0.65) !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-block-end: 6px !important;
}

/* Spacing */
.form-group {
    margin-block-end: 14px !important;
}

/* Inputs */
.form-input {
    height: 44px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 0.9rem !important;
    padding-inline: 14px !important;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease !important;
}

.form-input::placeholder {
    color: rgba(148, 163, 184, 0.28) !important;
}

.form-input:hover {
    border-color: rgba(255, 255, 255, 0.11) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

.form-input:focus {
    border-color: rgba(0, 200, 255, 0.45) !important;
    background: rgba(0, 200, 255, 0.025) !important;
    box-shadow:
        0 0 0 3px rgba(0, 200, 255, 0.07),
        0 0 16px rgba(0, 200, 255, 0.03) !important;
    outline: none !important;
}


/* ── Input Icon System ── */
.input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

/* Default: icon on the end side → push text away */
.input-icon-wrap .form-input {
    padding-inline-end: 42px !important;
}

/* Password fields that also have a toggle button on the start side */
.input-icon-wrap .form-input.has-toggle {
    padding-inline-start: 42px !important;
}

.input-icon {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(148, 163, 184, 0.28);
    pointer-events: none;
    transition: color 0.3s ease, filter 0.3s ease;
    line-height: 1;
}

.input-icon-wrap .form-input:focus ~ .input-icon {
    color: rgba(0, 200, 255, 0.65);
    filter: drop-shadow(0 0 5px rgba(0, 200, 255, 0.25));
}

/* Password toggle (eye icon) */
.password-toggle {
    position: absolute;
    inset-inline-start: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(148, 163, 184, 0.3);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.25s ease, background 0.25s ease;
    z-index: 2;
    border-radius: 6px;
}

.password-toggle:hover {
    color: var(--accent);
    background: rgba(0, 200, 255, 0.06);
}


/* ============================================
   6. DIVIDER
   ============================================ */

.auth-divider {
    opacity: 0.35 !important;
    margin: 16px 0 !important;
}

.auth-divider span {
    font-size: 0.7rem !important;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.4) !important;
}


/* ============================================
   7. CHECKBOX
   ============================================ */

.auth-card input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.auth-card input[type="checkbox"]:checked {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}

.auth-card input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 11px;
    font-weight: 900;
}


/* ============================================
   8. HERO SECTION (Right side — marketing)
   ============================================ */

.auth-marketing {
    background: linear-gradient(160deg, #080c12 0%, #0a1020 40%, #0d0f1a 100%) !important;
    position: relative;
    overflow: hidden;
}

/* Hide old pattern */
.auth-pattern {
    display: none !important;
}

/* Content wrapper */
.auth-marketing-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 0;
    padding: 40px 32px;
    animation: _heroEnter 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes _heroEnter {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ── Central Orb System ── */
.hero-orb-system {
    position: relative;
    width: 220px;
    height: 220px;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: _fadeScale 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes _fadeScale {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

/* Main glowing orb */
.hero-orb-core {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        rgba(0, 200, 255, 0.22) 0%,
        rgba(0, 200, 255, 0.07) 50%,
        transparent 70%);
    box-shadow:
        0 0 50px rgba(0, 200, 255, 0.12),
        0 0 100px rgba(0, 200, 255, 0.04);
    animation: _corePulse 4s ease-in-out infinite;
}

@keyframes _corePulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50%      { transform: scale(1.06); opacity: 1; }
}

/* Logo */
.hero-orb-system .hero-logo {
    position: relative;
    z-index: 5;
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 0 16px rgba(0, 200, 255, 0.25));
    animation: _logoFloat 6s ease-in-out infinite;
}

@keyframes _logoFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}


/* ── Orbital Rings ── */
.hero-orbit-1 {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 1px solid rgba(0, 200, 255, 0.07);
    animation: _spin 24s linear infinite;
    pointer-events: none;
}

.hero-orbit-2 {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(167, 139, 250, 0.05);
    animation: _spin 36s linear infinite reverse;
    pointer-events: none;
}

.hero-orbit-3 {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 1px dashed rgba(167, 139, 250, 0.07);
    animation: _spin 14s linear infinite;
    pointer-events: none;
}

@keyframes _spin {
    to { transform: rotate(360deg); }
}


/* ── Orbiting Chess Pieces ── */
.orbit-piece {
    position: absolute;
    width: 28px;
    height: 28px;
    top: 0;
    left: 50%;
    z-index: 10;
    pointer-events: none;
}

.piece-glow-wrap {
    width: 100%;
    height: 100%;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.85;
}

.piece-glow-wrap:hover {
    opacity: 1;
    transform: scale(1.2);
}

.piece-glow-wrap svg,
.piece-glow-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
    object-fit: contain;
}

/* Cyan glow (Knight) */
.orbit-cyan .piece-glow-wrap {
    color: #00C8FF;
    filter:
        drop-shadow(0 0 5px rgba(0, 200, 255, 0.5))
        drop-shadow(0 0 10px rgba(0, 200, 255, 0.25));
}

.orbit-cyan .piece-glow-wrap:hover {
    filter:
        drop-shadow(0 0 8px rgba(0, 200, 255, 0.75))
        drop-shadow(0 0 16px rgba(0, 200, 255, 0.4));
}

/* Purple glow (Pawn & Queen) */
.orbit-pink .piece-glow-wrap {
    color: #c084fc;
    filter:
        drop-shadow(0 0 5px rgba(192, 132, 252, 0.5))
        drop-shadow(0 0 10px rgba(192, 132, 252, 0.25));
}

.orbit-pink .piece-glow-wrap:hover {
    filter:
        drop-shadow(0 0 8px rgba(192, 132, 252, 0.75))
        drop-shadow(0 0 16px rgba(192, 132, 252, 0.4));
}

/* Counter-rotation: keep pieces upright */
.hero-orbit-3 .orbit-piece {
    animation: _counterSpin 14s linear infinite;
}

.hero-orbit-1 .orbit-piece {
    animation: _counterSpin 24s linear infinite;
}

.hero-orbit-2 .orbit-piece {
    animation: _counterSpinR 36s linear infinite;
}

@keyframes _counterSpin {
    to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes _counterSpinR {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}


/* ── Hero Typography ── */
.hero-title-premium {
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    font-weight: 800;
    text-align: center;
    line-height: 1.45;
    margin-bottom: 14px;
    color: #fff;
    letter-spacing: -0.02em;
    animation: _slideUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.hero-title-premium .text-gradient {
    background: linear-gradient(135deg, #00C8FF 0%, #a78bfa 50%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: _shimmer 6s ease-in-out infinite;
}

@keyframes _shimmer {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.hero-subtitle-premium {
    font-size: 0.95rem;
    color: rgba(148, 163, 184, 0.65);
    text-align: center;
    max-width: 340px;
    line-height: 1.75;
    margin-bottom: 36px;
    font-weight: 400;
    animation: _slideUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

@keyframes _slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ── Stats Row ── */
.hero-stats {
    display: flex;
    gap: 28px;
    align-items: center;
    animation: _slideUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.65s both;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.hero-stat-value .stat-accent {
    color: var(--accent);
}

.hero-stat-label {
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.45);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
    font-weight: 600;
}

.hero-stats-divider {
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.07), transparent);
}


/* ── Decorative particles ── */
.hero-ambient {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.hero-ambient-dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: _ambientDot 9s ease-in-out infinite;
}

@keyframes _ambientDot {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
    50%      { opacity: 1; transform: translateY(-25px) scale(1); }
}


/* ── Grid background ── */
.hero-grid-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.02;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
}


/* ── Bottom accent ── */
.hero-bottom-glow {
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 200, 255, 0.12), rgba(167, 139, 250, 0.08), transparent);
    z-index: 2;
}


/* ── Floating chess pieces (decorative) ── */
.hero-chess-float {
    position: absolute;
    font-size: 1.3rem;
    opacity: 0.035;
    z-index: 1;
    animation: _chessFloat 16s ease-in-out infinite alternate;
    color: rgba(255, 255, 255, 0.8);
}

.hero-chess-float:nth-child(1) { top: 12%; left: 15%; animation-delay: 0s; font-size: 1.7rem; }
.hero-chess-float:nth-child(2) { top: 75%; right: 12%; animation-delay: -3s; font-size: 1.1rem; }
.hero-chess-float:nth-child(3) { bottom: 20%; left: 8%; animation-delay: -6s; }
.hero-chess-float:nth-child(4) { top: 30%; right: 8%; animation-delay: -9s; font-size: 0.95rem; }

@keyframes _chessFloat {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.025; }
    50%  { opacity: 0.05; }
    100% { transform: translateY(-18px) rotate(10deg); opacity: 0.025; }
}


/* ============================================
   9. BUTTONS
   ============================================ */

/* Primary CTA */
.auth-card .btn-gold {
    background: linear-gradient(135deg, #00C8FF 0%, #00a5d4 40%, #0090cc 100%) !important;
    background-size: 200% 200%;
    color: #000 !important;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    border: none;
    border-radius: 10px !important;
    height: 46px !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-position 0.4s ease !important;
    box-shadow:
        0 4px 14px rgba(0, 200, 255, 0.18),
        0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Shimmer sweep */
.auth-card .btn-gold::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.65s ease;
}

.auth-card .btn-gold:hover {
    transform: translateY(-2px) !important;
    box-shadow:
        0 8px 28px rgba(0, 200, 255, 0.3),
        0 0 40px rgba(0, 200, 255, 0.08) !important;
    background-position: 100% 50%;
}

.auth-card .btn-gold:hover::after {
    transform: translateX(100%);
}

.auth-card .btn-gold:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(0, 200, 255, 0.18) !important;
}

/* Google / secondary button */
.auth-card .btn-secondary.btn-full,
.auth-card a.btn-secondary {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 10px !important;
    height: 44px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease !important;
}

.auth-card .btn-secondary.btn-full:hover,
.auth-card a.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.055) !important;
    border-color: rgba(255, 255, 255, 0.13) !important;
    transform: translateY(-1px);
}

/* Bottom links */
.auth-card a[href]:not(.btn) {
    transition: filter 0.2s ease;
}

.auth-card a[href]:not(.btn):hover {
    filter: brightness(1.25);
}


/* ============================================
   10. PAGE TRANSITIONS
   ============================================ */

.auth-card.page-exit {
    animation: _cardExit 0.3s cubic-bezier(0.4, 0, 1, 1) forwards !important;
}

@keyframes _cardExit {
    to {
        opacity: 0;
        transform: translateY(-16px) scale(0.97);
    }
}

.auth-marketing-content.page-exit {
    animation: _heroExit 0.25s ease-in forwards;
}

@keyframes _heroExit {
    to {
        opacity: 0;
        transform: translateY(-12px);
    }
}


/* ============================================
   11. SMART PASSWORD UI
   ============================================ */

/* ── Summary line ── */
.pwd-smart-bar {
    position: relative;
}

.pwd-summary-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.7);
    line-height: 1.5;
}

.pwd-summary-text {
    flex: 1;
    min-width: 0;
}

.pwd-details-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--accent, #00c8ff);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.pwd-details-toggle:hover {
    background: rgba(0, 200, 255, 0.08);
    color: #38d9ff;
}

.pwd-details-toggle svg {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.pwd-details-toggle:hover svg {
    opacity: 1;
}

/* ── Glassmorphism Popover ── */
.pwd-popover {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-start: 0;
    inset-inline-end: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 200, 255, 0.06) inset;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.pwd-popover.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.pwd-popover-arrow {
    position: absolute;
    top: -6px;
    inset-inline-start: 24px;
    width: 12px;
    height: 12px;
    background: rgba(15, 23, 42, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
    transform: rotate(45deg);
    border-radius: 2px 0 0 0;
}

/* ── Popover rules list ── */
.pwd-popover-rules {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pwd-popover-rules li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.65);
    transition: color 0.25s ease;
    line-height: 1.4;
}

.pwd-popover-rules li .rule-icon {
    font-size: 0.72rem;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
    transition: color 0.25s ease;
}

.pwd-popover-example {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
    color: rgba(0, 200, 255, 0.6);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    direction: ltr;
    text-align: start;
}

.pwd-popover-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.3px;
}

/* ── Premium Generate Button ── */
.pwd-generate-btn-inside {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: inherit;
    color: #0b0f19 !important;
    background: linear-gradient(135deg, #00c8ff 0%, #a78bfa 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(0, 200, 255, 0.25),
        0 0 10px rgba(167, 139, 250, 0.15);
}

.pwd-generate-btn-inside::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1;
}

.pwd-generate-btn-inside > * {
    position: relative;
    z-index: 2;
}

.pwd-generate-btn-inside:hover {
    box-shadow: 
        0 6px 20px rgba(0, 200, 255, 0.4),
        0 0 15px rgba(167, 139, 250, 0.3);
    transform: translateY(-1.5px);
}

.pwd-generate-btn-inside:hover::before {
    opacity: 1;
}

.pwd-generate-btn-inside:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 10px rgba(0, 200, 255, 0.2),
        0 0 5px rgba(167, 139, 250, 0.1);
}


/* ── Toast notification ── */
.pwd-toast {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 12px rgba(34, 197, 94, 0.1);
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    z-index: 9999;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.pwd-toast.show {
    bottom: 32px;
    opacity: 1;
}


/* ============================================
   12. DYNAMIC TEXT ROTATOR
   ============================================ */

.hero-text-rotator {
    position: relative;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Smooth transitions for rotator text */
.hero-title-premium,
.hero-subtitle-premium {
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-up-out {
    opacity: 0 !important;
    transform: translateY(-16px) !important;
}

.slide-up-in {
    animation: _slideIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes _slideIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ── Progress Indicators (hidden — rotator uses simple crossfade) ── */
.rotator-indicators {
    display: none !important;
}


/* ============================================
   CUSTOM COUNTRY DROPDOWN
   Replaces native <select> with dark-themed UI
   ============================================ */

.custom-select-wrap {
    position: relative;
    width: 100%;
    user-select: none;
}

/* Trigger button */
.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.custom-select-trigger:hover {
    border-color: rgba(255, 255, 255, 0.11);
    background: rgba(255, 255, 255, 0.04);
}

.custom-select-wrap.open .custom-select-trigger {
    border-color: rgba(0, 200, 255, 0.45);
    background: rgba(0, 200, 255, 0.025);
    box-shadow: 0 0 0 3px rgba(0, 200, 255, 0.07);
}

.custom-select-trigger .cs-placeholder {
    color: rgba(148, 163, 184, 0.28);
}

.custom-select-trigger .cs-arrow {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: rgba(148, 163, 184, 0.35);
    transition: transform 0.25s ease;
}

.custom-select-wrap.open .cs-arrow {
    transform: rotate(180deg);
}

/* Dropdown panel */
.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    background: rgba(12, 16, 22, 0.96);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.custom-select-wrap.open .custom-select-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Dropdown scrollbar */
.custom-select-dropdown::-webkit-scrollbar {
    width: 5px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* Search input inside dropdown */
.custom-select-search {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 8px 10px;
    background: rgba(12, 16, 22, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-select-search input {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 7px;
    color: #fff;
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.custom-select-search input::placeholder {
    color: rgba(148, 163, 184, 0.3);
}

.custom-select-search input:focus {
    border-color: rgba(0, 200, 255, 0.35);
}

/* Option items */
.custom-select-option {
    padding: 9px 14px;
    font-size: 0.88rem;
    color: rgba(226, 232, 240, 0.85);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    border-radius: 6px;
    margin: 2px 4px;
}

.custom-select-option:hover {
    background: rgba(0, 200, 255, 0.08);
    color: #fff;
}

.custom-select-option.selected {
    background: rgba(0, 200, 255, 0.12);
    color: #00C8FF;
    font-weight: 600;
}

.custom-select-option.no-results {
    color: rgba(148, 163, 184, 0.4);
    text-align: center;
    cursor: default;
    pointer-events: none;
}

/* Hide the original native select when custom is active */
select#country.cs-hidden {
    display: none !important;
}


/* ── Forgot password link ── */
.auth-card a[style*="color: var(--accent)"] {
    font-size: 0.8rem !important;
    opacity: 0.65;
    transition: opacity 0.2s ease;
}

.auth-card a[style*="color: var(--accent)"]:hover {
    opacity: 1;
}

.btn-return-home {
    position: absolute;
    top: 24px;
    inset-inline-end: 24px;
    z-index: 100;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 42px;
    height: 42px;
    padding: 0 !important;
    font-size: 0.85rem !important;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    overflow: hidden;
    transition: all cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}

.btn-return-home i {
    font-size: 1.1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
}

.btn-return-home span {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: all cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
    margin-inline-start: 0;
}

.btn-return-home:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 130px;
}

.btn-return-home:hover i {
    transform: scale(1.05);
}

.btn-return-home:hover span {
    max-width: 150px;
    opacity: 1;
    margin-inline-start: 8px;
}

/* ============================================
   13. RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    /* 1. Vertical Stacking & Flex Order */
    .auth-split-layout {
        height: auto !important;
        min-height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* 3. Compacting the Hero Section */
    .auth-marketing {
        display: flex !important;
        padding: 40px 20px 20px !important;
        min-height: auto !important;
    }
    
    .auth-marketing-content {
        padding: 0 !important;
        margin: 0 auto !important;
    }

    .hero-orb-system {
        width: 120px !important;
        height: 120px !important;
        margin-bottom: 16px !important;
    }

    .hero-orbit-1 { width: 100px !important; height: 100px !important; }
    .hero-orbit-2 { width: 120px !important; height: 120px !important; }
    .hero-orbit-3 { width: 70px !important;  height: 70px !important; }
    .orbit-piece  { width: 16px !important; height: 16px !important; }

    .hero-orb-core {
        width: 50px !important;
        height: 50px !important;
    }

    .hero-orb-system .hero-logo {
        width: 40px !important;
        height: 40px !important;
    }

    .hero-title-premium {
        font-size: 1.6rem !important;
        margin-bottom: 8px !important;
    }

    .hero-subtitle-premium {
        font-size: 0.85rem !important;
        margin-bottom: 20px !important;
    }

    .hero-stats {
        gap: 12px !important;
        justify-content: center !important;
    }
    
    .hero-stat-value {
        font-size: 1.1rem !important;
    }

    /* 2 & 4. Form Panel & Card Adjustments */
    .auth-panel {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        overflow-y: visible !important;
        padding: 20px 16px 60px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        box-sizing: border-box !important;
    }

    .auth-card {
        width: calc(100% - 32px) !important;
        max-width: 430px !important;
        margin: 0 auto !important;
        padding: 28px 20px !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
    }

    .auth-split-layout::before {
        width: 200px;
        height: 200px;
        top: -50px;
        right: -30px;
    }

    .auth-split-layout::after {
        width: 180px;
        height: 180px;
        bottom: -30px;
        left: -30px;
    }

    /* Hide absolute background decorations on mobile to keep focus on content */
    .bg-decor, .hero-chess-float {
        display: none !important;
    }
    
    .btn-return-home span {
        display: none !important;
    }
    .btn-return-home {
        gap: 0;
        padding: 8px !important;
    }
}

@media (max-width: 500px) {
    /* Stack side-by-side forms (like password + confirm password) to prevent cramping */
    .auth-card form div[style*="display: flex"],
    .auth-card form div[style*="display:flex"] {
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    .auth-card form div[style*="display: flex"] > .form-group,
    .auth-card form div[style*="display:flex"] > .form-group {
        flex: none !important;
        width: 100% !important;
    }

    .auth-card {
        padding: 24px 18px !important;
    }

    .custom-select-dropdown {
        max-height: 200px;
    }
}

/* ============================================
   Vector Icons (Font Awesome) Replacing Emojis
   ============================================ */
.auth-vector-icon {
    font-size: 46px;
    margin-bottom: 12px;
    color: var(--text-secondary, #94a3b8);
    transition: all 0.3s ease;
    display: inline-block;
}

.auth-vector-icon:hover {
    color: var(--cyber-cyan, #00C8FF);
    text-shadow: 0 0 15px rgba(0, 200, 255, 0.4);
    transform: scale(1.05);
}

.auth-vector-icon.success {
    color: #22c55e;
}

.auth-vector-icon.success:hover {
    text-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}
/* ── Premium Toast Notifications ── */
.premium-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    max-width: 90vw;
    width: max-content;
}

.premium-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-success .toast-icon {
    color: #22c55e;
}

.toast-content {
    font-weight: 600;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    width: 100%;
    transform-origin: left;
    animation: toast-progress 4s linear forwards;
}

.toast-error .toast-progress {
    background: #ef4444;
}

.toast-success .toast-progress {
    background: #22c55e;
}

@keyframes toast-progress {
    0% { transform: scaleX(1); }
    100% { transform: scaleX(0); }
}

@media (max-width: 480px) {
    .premium-toast {
        bottom: 16px;
        width: calc(100% - 32px);
        padding: 14px 16px;
        border-radius: 8px;
    }
}
