/* Empire Pay sign-in (resources/views/auth/unified-login.blade.php).
   One scene after the logo: a starfield, a dark planet rising from the bottom
   with a lit horizon and a dawn flare, the logo floating above it and the form
   on a glass panel just over the horizon. Self-contained (ep-* classes);
   loaded after the shared skin. Bump ?v= in the view when it changes. */

.ep-gate-body {
    margin: 0; min-height: 100dvh; overflow-x: hidden;
    background: #030407 !important; color: #eef1f5;
    font-family: 'Manrope', system-ui, sans-serif;
    display: flex; flex-direction: column;
}
.ep-gate-body .mn-room, .ep-gate-body .bn-city { display: none !important; }

/* ---------------- The scene ---------------- */
.ep-scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
    background: radial-gradient(120% 80% at 50% 0%, #0c0f16 0%, #05060a 55%, #020305 100%); }
.ep-scene i { position: absolute; display: block; }

.ep-stars { inset: -10%; background-repeat: repeat; }
.ep-stars--far {
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(230, 236, 248, .7), transparent 60%),
        radial-gradient(1px 1px at 140px 90px, rgba(230, 236, 248, .45), transparent 60%),
        radial-gradient(1px 1px at 260px 160px, rgba(255, 255, 255, .6), transparent 60%),
        radial-gradient(1px 1px at 330px 40px, rgba(230, 236, 248, .4), transparent 60%),
        radial-gradient(1px 1px at 80px 210px, rgba(230, 236, 248, .5), transparent 60%),
        radial-gradient(1px 1px at 390px 250px, rgba(220, 230, 255, .55), transparent 60%);
    background-size: 420px 300px; opacity: .8;
    animation: ep-drift 240s linear infinite;
}
.ep-stars--near {
    background-image:
        radial-gradient(1.6px 1.6px at 60px 120px, #fff, transparent 60%),
        radial-gradient(1.2px 1.2px at 300px 20px, rgba(210, 225, 255, .9), transparent 60%),
        radial-gradient(2px 2px at 520px 280px, #fff, transparent 60%),
        radial-gradient(1.2px 1.2px at 640px 140px, rgba(255, 255, 255, .8), transparent 60%);
    background-size: 760px 460px;
    animation: ep-drift 160s linear infinite reverse, ep-twinkle 6s ease-in-out infinite alternate;
}
@keyframes ep-drift { to { background-position: -420px 120px; } }
@keyframes ep-twinkle { from { opacity: .35; } to { opacity: 1; } }

.ep-nebula { inset: 0;
    background:
        radial-gradient(40% 30% at 18% 30%, rgba(120, 140, 190, .08), transparent 70%),
        radial-gradient(35% 28% at 85% 22%, rgba(170, 180, 210, .06), transparent 70%); }

/* four-point stars, as on the logo */
.ep-spark { left: var(--x); top: var(--y); width: calc(26px * var(--s)); aspect-ratio: 1; transform: translate(-50%, -50%);
    background:
        radial-gradient(closest-side, rgba(255, 255, 255, .9), rgba(220, 230, 255, .25) 40%, transparent 72%),
        conic-gradient(from 45deg, transparent 0 22%, transparent 0);
    animation: ep-spark 5s ease-in-out infinite alternate; }
.ep-spark::before, .ep-spark::after { content: ''; position: absolute; left: 50%; top: 50%; background: #fff; transform: translate(-50%, -50%); border-radius: 50%; }
.ep-spark::before { width: 2px; height: 100%; box-shadow: 0 0 6px #fff; }
.ep-spark::after { width: 100%; height: 2px; box-shadow: 0 0 6px #fff; }
.ep-spark:nth-of-type(2n) { animation-delay: -2.5s; }
@keyframes ep-spark { from { opacity: .45; transform: translate(-50%, -50%) scale(.85); } to { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } }

/* the planet: its top edge is the horizon */
.ep-planet {
    --size: max(190vw, 1500px);
    width: var(--size); height: var(--size); left: 50%; top: 70vh; transform: translateX(-50%);
    border-radius: 50%; overflow: hidden;
    background: radial-gradient(60% 40% at 50% 4%, #1b1f27 0%, #0b0d12 45%, #040507 75%);
    box-shadow:
        0 -1px 0 rgba(255, 255, 255, .95),
        0 -6px 24px rgba(225, 235, 255, .55),
        0 -30px 90px rgba(190, 210, 255, .22),
        inset 0 18px 50px rgba(220, 230, 255, .12);
    animation: ep-rise 1.6s cubic-bezier(.2, .7, .2, 1) both;
}
.ep-planet-surface { inset: 0; border-radius: 50%; opacity: .35;
    background:
        radial-gradient(14% 6% at 38% 3%, rgba(255, 255, 255, .08), transparent 70%),
        radial-gradient(10% 4% at 63% 5%, rgba(255, 255, 255, .06), transparent 70%),
        repeating-radial-gradient(circle at 50% 50%, transparent 0 40px, rgba(255, 255, 255, .012) 40px 41px); }
@keyframes ep-rise { from { transform: translate(-50%, 6vh); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* dawn flare on the horizon, under the form */
.ep-dawn { left: 50%; top: calc(70vh - 10px); width: min(900px, 120vw); height: 22px; transform: translateX(-50%);
    background: radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, .95), rgba(225, 235, 255, .35) 35%, transparent 70%);
    filter: blur(3px); animation: ep-dawn 6s ease-in-out infinite alternate; }
.ep-dawn::after { content: ''; position: absolute; left: 50%; top: 50%; width: 36%; height: 160px; transform: translate(-50%, -60%);
    background: radial-gradient(50% 50% at 50% 60%, rgba(220, 230, 255, .14), transparent 70%); }
@keyframes ep-dawn { from { opacity: .75; } to { opacity: 1; } }

/* ---------------- Chrome ---------------- */
.ep-top, .ep-gate, .ep-foot { position: relative; z-index: 2; }
.ep-top { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem clamp(1rem, 4vw, 2.5rem); }
.ep-top-tag { font: 700 .7rem/1 'Exo 2', sans-serif; letter-spacing: .32em; text-transform: uppercase; color: rgba(225, 232, 245, .55); }
.ep-gate-body .mn-auth-locale { position: static !important; display: inline-flex; gap: 2px; padding: 3px; margin: 0 !important;
    border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(200, 212, 230, .14); backdrop-filter: blur(8px); }
.ep-gate-body .mn-auth-locale a { padding: .4rem .75rem; border-radius: 7px; border: 0 !important; font-size: .78rem; font-weight: 700;
    color: rgba(225, 232, 245, .7) !important; text-decoration: none; letter-spacing: .02em; background: none !important; }
.ep-gate-body .mn-auth-locale a[aria-current] { background: linear-gradient(180deg, #fff, #cfd6e0) !important; color: #0a0c10 !important; }

.ep-gate { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 0 1rem clamp(2rem, 6vh, 4rem); gap: clamp(1rem, 3vh, 2rem); }

.ep-logo { width: min(560px, 86vw); height: auto; display: block; user-select: none;
    filter: drop-shadow(0 0 30px rgba(220, 230, 255, .22)) drop-shadow(0 10px 40px rgba(0, 0, 0, .6));
    animation: ep-float 7s ease-in-out infinite alternate, ep-fade 1.2s .2s both; }
@keyframes ep-float { from { transform: translateY(-4px); } to { transform: translateY(6px); } }
@keyframes ep-fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; } }

/* ---------------- The glass card ---------------- */
.ep-card {
    position: relative; width: min(420px, 100%); box-sizing: border-box; padding: 1.9rem 1.9rem 1.5rem;
    border-radius: 22px; background: linear-gradient(180deg, rgba(20, 24, 32, .72), rgba(8, 10, 14, .78));
    border: 1px solid rgba(200, 212, 230, .14); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .02) inset;
    animation: ep-fade 1s .45s both;
}
.ep-card::before { content: ''; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent); }
.ep-title { margin: 0; font: 800 1.55rem/1.2 'Exo 2', 'Manrope', sans-serif; letter-spacing: .01em; color: #fff; text-align: center; }
.ep-sub { margin: .45rem auto 1.4rem; max-width: 30ch; text-align: center; font-size: .84rem; line-height: 1.45; color: rgba(205, 214, 228, .68); }
.ep-error { margin: -.4rem 0 1rem; padding: .7rem .9rem; border-radius: 12px; font-size: .84rem;
    color: #ffd4cf; background: rgba(255, 107, 94, .12); border: 1px solid rgba(255, 107, 94, .35); }

.ep-form { display: grid; gap: 1rem; }
.ep-field { display: grid; gap: .45rem; }
.ep-label { font-size: .78rem; font-weight: 600; letter-spacing: .03em; color: rgba(215, 223, 236, .82); }
.ep-input-wrap { position: relative; display: block; }
.ep-ico { position: absolute; left: .95rem; top: 50%; width: 1.1rem; height: 1.1rem; transform: translateY(-50%); color: #7d8796; pointer-events: none; transition: color .2s; }
.ep-input {
    width: 100%; box-sizing: border-box; height: 3.2rem; padding: 0 1rem 0 2.8rem; border-radius: 13px;
    background: rgba(3, 4, 7, .65) !important; color: #fff !important; font: 500 .95rem 'Manrope', sans-serif;
    border: 1px solid rgba(200, 212, 230, .14) !important; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.ep-input::placeholder { color: rgba(170, 180, 195, .45); }
.ep-input:focus { border-color: rgba(235, 242, 255, .7) !important; box-shadow: 0 0 0 4px rgba(220, 230, 255, .08), 0 0 22px rgba(220, 230, 255, .12) !important; background: rgba(6, 8, 12, .85) !important; }
.ep-input-wrap:focus-within .ep-ico { color: #fff; }
.ep-input--toggle { padding-right: 3rem; }
.ep-input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #07090d inset; caret-color: #fff; }
.ep-eye { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); width: 2.2rem; height: 2.2rem; display: grid; place-items: center;
    border: 0; border-radius: 9px; background: none; color: #8e98a8; cursor: pointer; }
.ep-eye:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.ep-eye svg { width: 1.15rem; height: 1.15rem; }
.ep-eye .icon-hide, .ep-eye[data-visible="true"] .icon-show { display: none; }
.ep-eye[data-visible="true"] .icon-hide { display: block; }

.ep-check { display: inline-flex; align-items: center; gap: .6rem; font-size: .84rem; color: rgba(215, 223, 236, .8); cursor: pointer; width: fit-content; }
.ep-check input { appearance: none; -webkit-appearance: none; width: 1.15rem; height: 1.15rem; margin: 0; border-radius: 5px;
    border: 1.5px solid rgba(200, 212, 230, .35); background: rgba(3, 4, 7, .6) center / 78% no-repeat; cursor: pointer; transition: .15s; }
.ep-check input:checked { border-color: #e6ebf2; background-color: #e6ebf2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230a0c10' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8'/%3E%3C/svg%3E"); }

.ep-btn {
    position: relative; overflow: hidden; height: 3.25rem; margin-top: .35rem; border: 0; border-radius: 13px; cursor: pointer;
    background: linear-gradient(180deg, #ffffff, #cfd6e1); color: #07090d; font: 800 .95rem/1 'Exo 2', 'Manrope', sans-serif; letter-spacing: .12em; text-transform: uppercase;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .5) inset, 0 10px 30px -10px rgba(210, 225, 255, .65); transition: transform .15s, box-shadow .2s;
}
.ep-btn::after { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; transform: skewX(-20deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent); transition: left .7s; }
.ep-btn:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .7) inset, 0 14px 40px -10px rgba(220, 232, 255, .9); }
.ep-btn:hover::after { left: 120%; }
.ep-btn:active { transform: translateY(1px); }
.ep-btn span { position: relative; z-index: 1; }

.ep-alt { margin: 1.1rem 0 0; text-align: center; font-size: .84rem; }
.ep-alt a { color: rgba(230, 236, 246, .85); text-decoration: none; border-bottom: 1px solid rgba(230, 236, 246, .3); padding-bottom: 1px; }
.ep-alt a:hover { color: #fff; border-color: #fff; }

.ep-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 2.5rem) 1.25rem;
    font-size: .75rem; color: rgba(200, 210, 225, .45); }
.ep-foot a { display: inline-flex; align-items: center; gap: .45rem; color: rgba(225, 232, 245, .7); text-decoration: none; font-weight: 600; }
.ep-foot a:hover { color: #fff; }
.ep-foot svg { width: 1rem; height: 1rem; }

/* ---------------- Small screens ---------------- */
@media (max-width: 640px) {
    .ep-planet { top: 78vh; --size: 260vw; }
    .ep-dawn { top: calc(78vh - 10px); }
    .ep-top-tag { display: none; }
    .ep-top { justify-content: flex-end; }
    .ep-gate { justify-content: flex-start; padding-top: 1rem; }
    .ep-logo { width: min(340px, 84vw); }
    .ep-card { padding: 1.5rem 1.25rem 1.25rem; background: linear-gradient(180deg, rgba(16, 19, 26, .82), rgba(6, 8, 11, .9)); }
    .ep-foot { flex-direction: column; gap: .4rem; }
}
@media (max-height: 760px) and (min-width: 641px) {
    .ep-logo { width: min(420px, 60vw); }
    .ep-planet { top: 76vh; } .ep-dawn { top: calc(76vh - 10px); }
}
@media (prefers-reduced-motion: reduce) {
    .ep-stars, .ep-spark, .ep-logo, .ep-dawn, .ep-planet, .ep-card { animation: none !important; }
}
