:root {
    --primary: #221996;
    --accent: #bc0610;
    --portal-1: #221996;
    --portal-2: #bc0610;
    --portal-3: #e8ba37;
    --portal-rgb: 34, 25, 150;
    --white: #fff;
    --radius-btn: 18px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: #fff;
    min-height: 100vh;
}

.btn-hp-sm {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: linear-gradient(135deg, #221996, #0078d4);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: .78rem;
    font-weight: 700;
    padding: .6rem 1.25rem;
    border-radius: 100px;
    margin-top: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
}

.btn-hp-sm i {
    font-size: 1rem;
    color: var(--white);
    transition: transform 0.4s ease;
}

.btn-hp-sm:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #16106a, var(--accent));
    border-color: var(--primary);
    box-shadow: 0 10px 20px -5px rgba(188, 6, 16, 0.3);
    color: white;
}

.btn-hp-sm:hover i {
    transform: translateX(3px) scale(1.1);
    color: white;
}

.btn-hp-sm::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.btn-hp-sm:hover::before {
    left: 100%;
}

/* --- Starfield Background --- */
.space-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: 1744px 1081px #FFF, 798px 1845px #FFF, 1289px 1323px #FFF, 1543px 1563px #FFF, 1801px 1198px #FFF, 345px 1234px #FFF;
    /* Placeholder for JS-generated stars */
    z-index: -2;
}

/* --- The Celestial Portal --- */
/* --- The Celestial Portal --- */
.portal-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(400px, 80vw, 900px);
    height: clamp(400px, 80vw, 900px);
    z-index: -1;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    --orbit-1: 300px;
    --orbit-2: 200px;
}

.portal-glow {
    position: absolute;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(var(--portal-rgb), 0.4) 0%, transparent 70%);
    filter: blur(40px);
    animation: pulseGlow 4s ease-in-out infinite alternate;
}

.portal-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    background: conic-gradient(from 0deg, var(--portal-1), var(--portal-2), var(--portal-3), var(--portal-1));
    -webkit-mask: radial-gradient(circle, transparent 65%, black 66%);
    mask: radial-gradient(circle, transparent 65%, black 66%);
    animation: rotatePortal 30s linear infinite;
    filter: blur(2px);
    opacity: 0.4;
}

.portal-ring::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: rotatePortal 20s linear infinite reverse;
}

/* Planets & OTT Entities */
.entity-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.planet {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(30px, 5vw, 60px);
    height: clamp(30px, 5vw, 60px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.1),
        0 0 30px rgba(var(--portal-rgb), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -30px;
    margin-left: -30px;
}

.planet-1 {
    animation: orbitPlanet1 40s linear infinite;
}

.planet-2 {
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    animation: orbitPlanet2 25s linear infinite;
}

.ott-icon {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    animation: floatOTT 8s ease-in-out infinite alternate;
}

@keyframes rotatePortal {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes orbitPlanet1 {
    from {
        transform: rotate(0deg) translateX(var(--orbit-1)) rotate(0deg);
    }

    to {
        transform: rotate(360deg) translateX(var(--orbit-1)) rotate(-360deg);
    }
}

@keyframes orbitPlanet2 {
    from {
        transform: rotate(360deg) translateX(var(--orbit-2)) rotate(-360deg);
    }

    to {
        transform: rotate(0deg) translateX(var(--orbit-2)) rotate(0deg);
    }
}

@keyframes floatOTT {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.2;
    }

    100% {
        transform: translateY(-30px) rotate(15deg);
        opacity: 0.5;
    }
}

@keyframes pulseGlow {
    from {
        transform: scale(1);
        opacity: 0.2;
    }

    to {
        transform: scale(1.2);
        opacity: 0.4;
    }
}

/* --- Responsive Fluid Typography --- */
.fluid-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    /* line-height: 0.9; */
    font-weight: 900;
    /* letter-spacing: -0.04em; */
}

.fluid-sub {
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.5);
}

/* --- The Glass Login Card --- */
.login-card-interstellar {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: clamp(30px, 5vw, 50px);
    padding: clamp(2rem, 5vw, 4rem);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 550px;
    margin: auto;
    position: relative;
    z-index: 10;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card-interstellar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.06), transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.login-card-interstellar:hover {
    transform: scale(1.01) translateY(-5px);
}

/* --- Interactive Form Elements --- */
.input-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: clamp(0.9rem, 2vw, 1.25rem) clamp(1rem, 3vw, 1.5rem) clamp(0.9rem, 2vw, 1.25rem) clamp(2.8rem, 6vw, 3.5rem);
    color: #fff;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-field:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.2);
    transform: scale(1.02);
}

.input-icon {
    position: absolute;
    left: clamp(1rem, 2.5vw, 1.25rem);
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    transition: all 0.3s;
}

.input-field:focus+.input-icon {
    color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.btn-interstellar {
    background: linear-gradient(135deg, #221996, #0078d4);
    color: white;
    width: 100%;
    padding: clamp(0.9rem, 2vw, 1.25rem);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    border-radius: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(29, 78, 216, 0.3);
}

.btn-interstellar:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, #16106a, var(--accent));
    box-shadow: 0 15px 30px rgba(249, 115, 22, 0.4);
}

/* --- Stats Badge --- */
.stat-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 24px;
    text-align: center;
    transition: all 0.3s;
}

.stat-badge:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-10px);
    border-color: var(--accent);
}

/* --- Tabs & Stepper --- */
.login-tabs {
    display: flex;
    gap: clamp(0.5rem, 2vw, 1rem);
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.login-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    cursor: pointer;
    padding: clamp(0.4rem, 1vw, 0.5rem) clamp(0.5rem, 1.5vw, 1rem);
    border-radius: 12px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 0.5rem;
}

.login-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.login-tab.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stepper-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3.5rem;
    position: relative;
    padding: 0 10px;
}

.stepper-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
    z-index: 1;
}

.stepper-container .progress-line {
    position: absolute;
    top: 50%;
    left: 10px;
    height: 2px;
    background: #10b981;
    transform: translateY(-50%);
    z-index: 2;
    transition: width 0.4s ease;
}

.step {
    position: relative;
    z-index: 3;
    width: clamp(30px, 8vw, 35px);
    height: clamp(30px, 8vw, 35px);
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.8rem, 2vw, 1rem);
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.4s ease;
}

.step.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(188, 6, 16, 0.4);
}

.step.completed {
    border-color: #10b981;
    /* Green (success) */
    background: #10b981;
    color: white;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.step-label {
    position: absolute;
    top: 130%;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(0.6rem, 1.2vw, 0.75rem);
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.4s ease;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.step.active .step-label,
.step.completed .step-label {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

/* --- Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: revealUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Link Hover Effect --- */
.hover-link-premium {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

.hover-link-premium::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1.5px;
    bottom: -2px;
    left: 0;
    background: var(--accent);
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 10px var(--accent);
}

.hover-link-premium:hover::after {
    width: 100%;
}

.hover-link-premium:hover {
    color: var(--accent) !important;
    text-shadow: 0 0 10px rgba(188, 6, 16, 0.4);
}

.hover-link-premium i {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-right: 4px;
}

.hover-link-premium:hover i {
    animation: ringRing 0.6s ease-in-out infinite;
    color: var(--accent);
}

@keyframes ringRing {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(15deg);
    }

    20% {
        transform: rotate(-15deg);
    }

    30% {
        transform: rotate(15deg);
    }

    40% {
        transform: rotate(-15deg);
    }

    50% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* --- Responsive Grid --- */
.main-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .content-grid> :first-child {
        order: 2;
    }

    .content-grid> :last-child {
        order: 1;
    }

    .fluid-title {
        margin-bottom: 1rem;
    }

    .login-card-interstellar {
        margin: 0 auto;
        padding: 2rem;
    }

    .portal-wrap {
        width: 280px;
        height: 280px;
        top: 45%;
        left: 50%;
        --orbit-1: 120px;
        --orbit-2: 80px;
    }

    .planet {
        transform: scale(0.6) !important;
    }

    .ott-icon {
        display: none;
    }
}

@media (max-width: 640px) {
    .main-wrapper {
        padding: 1rem;
    }

    .fluid-title {
        font-size: 2.5rem;
    }

    .login-card-interstellar {
        padding: 1.5rem;
        border-radius: 30px;
    }

    .stat-badge {
        padding: 1rem;
        width: 100%;
    }
}

/* --- Light Mode Overrides --- */
body.light-mode {
    background-color: #f8fafc;
    color: #0f172a;
}

body.light-mode .space-bg {
    background: radial-gradient(ellipse at bottom, #e2e8f0 0%, #f8fafc 100%);
}

body.light-mode .stars {
    opacity: 0.2;
    box-shadow: 1744px 1081px #000, 798px 1845px #000, 1289px 1323px #000, 1543px 1563px #000, 1801px 1198px #000, 345px 1234px #000;
}

body.light-mode .portal-ring {
    border: 2px solid rgba(0, 0, 0, 0.05);
    opacity: 0.15;
}

body.light-mode .portal-glow {
    background: radial-gradient(circle, rgba(var(--portal-rgb), 0.1) 0%, transparent 70%);
}

body.light-mode .login-card-interstellar {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

body.light-mode .login-card-interstellar::before {
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(0, 0, 0, 0.03), transparent 70%);
}

body.light-mode .fluid-sub {
    color: #64748b;
}

body.light-mode .stat-badge {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

body.light-mode .stat-badge:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--primary);
}

body.light-mode .input-field {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

body.light-mode .input-field:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(34, 25, 150, 0.1);
}

body.light-mode .input-icon {
    color: rgba(0, 0, 0, 0.4);
}

body.light-mode .login-tab {
    color: rgba(0, 0, 0, 0.5);
}

body.light-mode .login-tab:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .login-tab.active {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .stepper-container::before {
    background: rgba(0, 0, 0, 0.1);
}

body.light-mode .step {
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.4);
}

body.light-mode .step.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(34, 25, 150, 0.3);
}

body.light-mode .step.completed {
    border-color: #10b981;
    background: #10b981;
    color: white;
}

body.light-mode .step-label {
    color: rgba(0, 0, 0, 0.5);
}

body.light-mode .step.active .step-label,
body.light-mode .step.completed .step-label {
    color: #0f172a;
    text-shadow: none;
}

body.light-mode .text-slate-400 {
    color: #64748b !important;
}

body.light-mode .text-white {
    color: #0f172a !important;
}

body.light-mode .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .border-white\/5 {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

body.light-mode #themeToggle {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

body.light-mode #themeToggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.light-mode .planet {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.05), 0 0 30px rgba(0, 0, 0, 0.1);
}

body.light-mode .ott-icon {
    color: rgba(0, 0, 0, 0.2);
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.1));
}

body.light-mode .text-red-500\/40 {
    color: rgba(239, 68, 68, 0.6) !important;
}

body.light-mode .text-white\/20 {
    color: rgba(0, 0, 0, 0.3) !important;
}

/* --- Additional Classes for Inline Styles --- */
.ott-icon-1 {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.ott-icon-2 {
    top: 60%;
    right: 10%;
    animation-delay: 1s;
}

.ott-icon-3 {
    bottom: 10%;
    left: 30%;
    animation-delay: 2s;
}

.ott-icon-4 {
    top: 10%;
    right: 30%;
    animation-delay: 3s;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.logo-filter {
    filter: brightness(0) invert(1) !important;
    opacity: 0.8 !important;
}

#stepper-progress {
    width: 0%;
}

body.light-mode .theme-glow {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .logo-filter {
    filter: none !important;
    opacity: 1 !important;
}

body.light-mode .login-tabs {
    border-bottom: 1px solid rgb(229 229 229);
}