/* =============================================================
   FILE: assets/css/login.css
   PURPOSE: Standalone styles for the login page only.
            Features glowing rotating neon rings around the card,
            inspired by the reference image but using Edphics
            brand colours: cyan #00F5D4, blue #00A6FB, purple #7B2FFF.
   ============================================================= */


/* ─────────────────────────────────────────────────────────────
   PAGE BASE
   Override style.css body defaults for this specific page.
   ───────────────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    background: #080B10;          /* Slightly deeper black than main site */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    /* Restore cursor: none so the custom cursor JS works */
    cursor: none;
}

/* Also restore cursor:none on interactive elements
   (style.css sets cursor:none on these globally, but client.css
   overrides with cursor:auto — this page must undo that) */
.login-page a,
.login-page button,
.login-page input {
    cursor: none;
}


/* ─────────────────────────────────────────────────────────────
   BACKGROUND
   ───────────────────────────────────────────────────────────── */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Subtle dot-grid texture (reuses .hero-grid from style.css) */
.login-bg .hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

/* Deep radial glow exactly behind the card — like a portal light */
.login-center-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(
        ellipse at center,
        rgba(0,245,212,0.07)  0%,
        rgba(0,166,251,0.05) 35%,
        transparent          70%
    );
    border-radius: 50%;
    filter: blur(20px);
}


/* ─────────────────────────────────────────────────────────────
   LOGIN STAGE
   The full-screen centering wrapper that holds both the
   rotating rings and the login card stacked on top.
   ───────────────────────────────────────────────────────────── */
.login-stage {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 40px 20px;
}


/* ─────────────────────────────────────────────────────────────
   ROTATING NEON RINGS
   Each ring is a div styled as an ellipse with a glowing border.
   They are positioned absolutely around the card using the same
   center point, then rotated/animated independently.

   The "tilt" effect is achieved by combining a CSS rotate()
   (static tilt angle) with a @keyframes rotateX spin in 3D.
   ───────────────────────────────────────────────────────────── */
.rings-wrap {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    /* rings are contained here, card sits above via z-index */
    width: 0; height: 0;
    pointer-events: none;
}

/* Base ring styles — all rings share these */
.ring {
    position: absolute;
    border-radius: 50%;
    /* Center each ring on the same origin point */
    top: 50%; left: 50%;
    transform-origin: center center;
}

/* ── RING 1: Cyan — primary brand colour, large, slow ── */
.ring-1 {
    width: 540px;
    height: 540px;
    margin-top:  -270px;
    margin-left: -270px;
    border: 2.5px solid transparent;
    /* Multi-stop conic gradient gives the "partial glow" effect
       so not all of the ring is lit — only part of it glows */
    background:
        conic-gradient(
            from 0deg,
            rgba(0,245,212,0)    0%,
            rgba(0,245,212,0.9) 25%,
            rgba(0,245,212,0.4) 50%,
            rgba(0,245,212,0)   75%,
            rgba(0,245,212,0)  100%
        ) border-box;
    /* Clip so only the border shows, not the fill */
    -webkit-mask:
        linear-gradient(#fff 0 0) padding-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    /* Box shadow gives the soft outer glow effect */
    filter: drop-shadow(0 0 8px rgba(0,245,212,0.6))
            drop-shadow(0 0 24px rgba(0,245,212,0.25));
    /* Tilt at 30 degrees, then spin */
    transform: translate(-50%,-50%) rotate(30deg) rotateX(70deg);
    animation: ringSpinCW 8s linear infinite;
}

/* ── RING 2: Blue — secondary colour, medium, spins opposite ── */
.ring-2 {
    width: 480px;
    height: 480px;
    margin-top:  -240px;
    margin-left: -240px;
    border: 2px solid transparent;
    background:
        conic-gradient(
            from 120deg,
            rgba(0,166,251,0)    0%,
            rgba(0,166,251,0.9) 30%,
            rgba(0,166,251,0.3) 55%,
            rgba(0,166,251,0)   80%,
            rgba(0,166,251,0)  100%
        ) border-box;
    -webkit-mask:
        linear-gradient(#fff 0 0) padding-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    filter: drop-shadow(0 0 8px rgba(0,166,251,0.7))
            drop-shadow(0 0 24px rgba(0,166,251,0.3));
    transform: translate(-50%,-50%) rotate(-20deg) rotateX(65deg);
    /* Counter-clockwise, faster */
    animation: ringSpinCCW 6s linear infinite;
}

/* ── RING 3: Purple accent — smaller, fastest ── */
.ring-3 {
    width: 580px;
    height: 580px;
    margin-top:  -290px;
    margin-left: -290px;
    border: 1.8px solid transparent;
    background:
        conic-gradient(
            from 240deg,
            rgba(123,47,255,0)    0%,
            rgba(123,47,255,0.8) 20%,
            rgba(123,47,255,0.2) 45%,
            rgba(123,47,255,0)   65%,
            rgba(123,47,255,0)  100%
        ) border-box;
    -webkit-mask:
        linear-gradient(#fff 0 0) padding-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    filter: drop-shadow(0 0 6px rgba(123,47,255,0.7))
            drop-shadow(0 0 20px rgba(123,47,255,0.2));
    transform: translate(-50%,-50%) rotate(60deg) rotateX(72deg);
    animation: ringSpinCW 5s linear infinite;
    animation-delay: -2s; /* offset start so rings don't align */
}

/* ── RING 4: Thin white — very subtle depth layer ── */
.ring-4 {
    width: 620px;
    height: 620px;
    margin-top:  -310px;
    margin-left: -310px;
    border: 1px solid transparent;
    background:
        conic-gradient(
            from 80deg,
            rgba(255,255,255,0)    0%,
            rgba(255,255,255,0.15) 15%,
            rgba(255,255,255,0)    35%,
            rgba(255,255,255,0)   100%
        ) border-box;
    -webkit-mask:
        linear-gradient(#fff 0 0) padding-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    transform: translate(-50%,-50%) rotate(-50deg) rotateX(68deg);
    animation: ringSpinCCW 12s linear infinite;
    animation-delay: -5s;
}

/* Spin animations */
@keyframes ringSpinCW {
    from { transform: translate(-50%,-50%) rotate(var(--tilt, 30deg)) rotateX(70deg) rotate3d(0,0,1, 0deg); }
    to   { transform: translate(-50%,-50%) rotate(var(--tilt, 30deg)) rotateX(70deg) rotate3d(0,0,1, 360deg); }
}

@keyframes ringSpinCCW {
    from { transform: translate(-50%,-50%) rotate(var(--tilt,-20deg)) rotateX(65deg) rotate3d(0,0,1, 0deg); }
    to   { transform: translate(-50%,-50%) rotate(var(--tilt,-20deg)) rotateX(65deg) rotate3d(0,0,1,-360deg); }
}

/*
   NOTE: The conic-gradient + mask approach above creates the partial
   glowing arc effect. The drop-shadow filter on the ring div adds
   the soft bloom/glow spread, matching the reference image's neon feel.

   The rings use perspective transforms (rotateX) to appear as if they
   are orbiting around the card in 3D — like rings around a planet.
   CSS perspective is set on the rings-wrap via transform-style below.
*/
.rings-wrap { transform-style: preserve-3d; perspective: 900px; }
/* Each ring individually uses its own perspective via rotateX */


/* ─────────────────────────────────────────────────────────────
   LOGIN CARD
   Glassmorphism panel that sits at z-index above the rings.
   ───────────────────────────────────────────────────────────── */
.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    background: rgba(13, 18, 28, 0.82);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow:
        0 0 0 1px rgba(0,245,212,0.06),
        0 24px 64px rgba(0,0,0,0.7),
        inset 0 1px 0 rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    /* Subtle entrance animation when page loads */
    animation: cardReveal 0.7s cubic-bezier(0.34,1.56,0.64,1) both;
    animation-delay: 0.2s;
}

@keyframes cardReveal {
    from { opacity: 0; transform: scale(0.88) translateY(20px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ── Logo ── */
.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    text-decoration: none;
}

.login-logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
}

.login-logo-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.login-logo-dot { color: #00F5D4; }

/* ── Headings ── */
.login-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    text-align: center;
    letter-spacing: -0.02em;
}

.login-sub {
    font-size: 0.875rem;
    color: rgba(170,180,192,0.8);
    text-align: center;
    margin-bottom: 28px;
}

/* ── Error box ── */
.login-error {
    width: 100%;
    background: rgba(255,68,68,0.1);
    border: 1px solid rgba(255,68,68,0.3);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #ff9090;
    margin-bottom: 20px;
    text-align: center;
}

/* ── Form ── */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.login-field { width: 100%; }

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    color: rgba(170,180,192,0.5);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.login-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 16px 14px 44px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #fff;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    -webkit-appearance: none;
    appearance: none;
}

.login-input::placeholder { color: rgba(170,180,192,0.45); }

/* Glowing focus state matching brand cyan */
.login-input:focus {
    border-color: rgba(0,245,212,0.5);
    background: rgba(0,245,212,0.04);
    box-shadow:
        0 0 0 3px rgba(0,245,212,0.1),
        0 0 16px rgba(0,245,212,0.08);
}

/* Eye button */
.login-eye-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: rgba(170,180,192,0.5);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.login-eye-btn:hover { color: #00F5D4; }

/* ── Submit button ── */
.login-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0B0F14;
    /* Gradient matching brand colours */
    background: linear-gradient(135deg, #00F5D4 0%, #00A6FB 100%);
    border: none;
    border-radius: 12px;
    cursor: none;
    margin-top: 4px;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow:
        0 4px 20px rgba(0,245,212,0.35),
        0 0 40px rgba(0,245,212,0.12);
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 32px rgba(0,245,212,0.45),
        0 0 60px rgba(0,245,212,0.18);
}

.login-submit-btn:active { transform: translateY(0); opacity: 0.9; }

/* ── Bottom links ── */
.login-links-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

.login-link {
    font-size: 0.8rem;
    color: rgba(170,180,192,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.login-link:hover { color: #fff; }

.login-link--accent {
    color: #00F5D4;
    font-weight: 600;
}
.login-link--accent:hover { color: #00A6FB; }

/* Back to website */
.login-back {
    font-size: 0.78rem;
    color: rgba(100,115,130,0.7);
    text-decoration: none;
    transition: color 0.2s;
    margin-top: 4px;
}
.login-back:hover { color: rgba(170,180,192,0.8); }


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .login-card {
        padding: 36px 24px;
        border-radius: 20px;
        margin: 0 8px;
    }

    /* Scale rings down on small screens so they don't overflow */
    .ring-1 { width: 340px; height: 340px; margin: -170px 0 0 -170px; }
    .ring-2 { width: 300px; height: 300px; margin: -150px 0 0 -150px; }
    .ring-3 { width: 380px; height: 380px; margin: -190px 0 0 -190px; }
    .ring-4 { width: 420px; height: 420px; margin: -210px 0 0 -210px; }
}

@media (prefers-reduced-motion: reduce) {
    .ring { animation: none !important; }
    .login-card { animation: none !important; }
}