@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=VT323&display=swap');

:root {
    --bg-dark: #070816;
    --bg-mid: #111437;
    --panel: rgba(9, 12, 32, 0.88);
    --panel-border: rgba(0, 255, 255, 0.35);
    --text: #f2f4ff;
    --muted: #a8b0d8;
    --cyan: #00f5ff;
    --pink: #ff3df2;
    --purple: #7b2cff;
    --danger: #ff5f7e;
    --black: #02030a;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 15%, rgba(255, 61, 242, 0.22), transparent 28%),
        radial-gradient(circle at 80% 20%, rgba(0, 245, 255, 0.18), transparent 30%),
        linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-dark) 55%, #03030b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(0, 245, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 61, 242, 0.12) 1px, transparent 1px);
    background-size: 48px 48px;
    transform: perspective(420px) rotateX(62deg) scale(1.7);
    transform-origin: center bottom;
    opacity: 0.35;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.035) 0,
        rgba(255, 255, 255, 0.035) 1px,
        transparent 1px,
        transparent 4px
    );
    opacity: 0.32;
    mix-blend-mode: screen;
}

a {
    color: var(--cyan);
    text-decoration: none;
}

a:hover {
    color: var(--pink);
}

.auth-page {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-logo-wrap {
    width: min(680px, 100%);
    text-align: center;
    margin-bottom: 34px;
}

.auth-logo {
    display: block;
    width: min(680px, 96vw);
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    filter:
        drop-shadow(0 0 14px rgba(255, 61, 242, 0.55))
        drop-shadow(0 0 22px rgba(0, 245, 255, 0.42));
}

.lene-wrap {
    position: relative;
    width: min(500px, 90vw);
    margin-bottom: 24px;
    border: 2px solid var(--cyan);
    box-shadow:
        0 0 16px rgba(0, 255, 255, 0.62),
        0 0 28px rgba(255, 61, 242, 0.42);
    overflow: hidden;
    background: var(--black);
}

.lene-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 430px;
    object-fit: contain;
    filter:
        contrast(1.12)
        saturate(1.18);
    animation: leneImageFlicker 2.2s infinite steps(2, end);
}

.lene-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.16) 0,
            rgba(255, 255, 255, 0.16) 2px,
            rgba(0, 245, 255, 0.08) 3px,
            transparent 7px,
            transparent 11px
        );
    mix-blend-mode: screen;
    opacity: 0.72;
    animation: leneNoise 0.12s infinite steps(2, end);
}

.lene-wrap::after {
    content: "";
    position: absolute;
    inset: -6px;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 61, 242, 0.34), transparent 28%, rgba(0, 245, 255, 0.34)),
        linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.20) 48%, transparent 54%);
    mix-blend-mode: screen;
    opacity: 0.62;
    animation: leneSignal 0.9s infinite steps(5, end);
}

@keyframes leneNoise {
    0% {
        transform: translateY(0);
        opacity: 0.42;
    }

    25% {
        transform: translateY(-4px);
        opacity: 0.78;
    }

    50% {
        transform: translateY(5px);
        opacity: 0.58;
    }

    75% {
        transform: translateY(-2px);
        opacity: 0.84;
    }

    100% {
        transform: translateY(3px);
        opacity: 0.48;
    }
}

@keyframes leneSignal {
    0% {
        transform: translateX(-8px) skewX(-1deg);
        opacity: 0.38;
    }

    20% {
        transform: translateX(6px) skewX(1deg);
        opacity: 0.72;
    }

    40% {
        transform: translateX(-3px) skewX(0deg);
        opacity: 0.48;
    }

    60% {
        transform: translateX(10px) skewX(1deg);
        opacity: 0.76;
    }

    80% {
        transform: translateX(-5px) skewX(-1deg);
        opacity: 0.52;
    }

    100% {
        transform: translateX(0) skewX(0deg);
        opacity: 0.44;
    }
}

@keyframes leneImageFlicker {
    0% {
        opacity: 1;
        transform: translateX(0);
    }

    48% {
        opacity: 0.96;
        transform: translateX(0);
    }

    50% {
        opacity: 0.86;
        transform: translateX(2px);
    }

    52% {
        opacity: 1;
        transform: translateX(-1px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    background: var(--panel);
    border: 1px solid var(--panel-border);
    box-shadow:
        0 0 24px rgba(0, 245, 255, 0.16),
        0 0 54px rgba(255, 61, 242, 0.12),
        inset 0 0 24px rgba(0, 245, 255, 0.06);
    padding: 28px;
}

.auth-panel::before {
    content: "";
    position: absolute;
    inset: -2px;
    border: 1px solid rgba(255, 61, 242, 0.25);
    pointer-events: none;
}

.auth-login-panel {
    margin-top: 0;
}

.auth-title {
    margin: 0 0 8px;
    font-family: 'VT323', monospace;
    font-size: clamp(44px, 10vw, 72px);
    line-height: 0.9;
    letter-spacing: 0.04em;
    color: var(--text);
    text-shadow:
        2px 0 var(--pink),
        -2px 0 var(--cyan),
        0 0 18px rgba(255, 61, 242, 0.45);
}

.auth-subtitle {
    margin: 0 0 40px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.auth-subtitle-loading {
    text-align: center;
}

.auth-loading-dots::after {
    content: "";
    display: inline-block;
    width: 3ch;
    text-align: left;
    color: inherit;
    animation: authDots 1.2s steps(4, end) infinite;
}

@keyframes authDots {
    0% {
        content: "";
    }

    25% {
        content: ".";
    }

    50% {
        content: "..";
    }

    75%,
    100% {
        content: "...";
    }
}

.lene-text {
    min-height: 76px;
    margin: 0 0 24px;
    color: var(--cyan);
    font-size: 15px;
    line-height: 1.6;
}

.auth-errors {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 95, 126, 0.55);
    background: rgba(255, 95, 126, 0.12);
    color: #ffd6de;
}

.auth-errors ul {
    margin: 0;
    padding-left: 18px;
}

.auth-login-form {
    margin-top: 20px;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--cyan);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-field input {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(0, 245, 255, 0.35);
    background: rgba(2, 3, 10, 0.76);
    color: var(--text);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 15px;
    padding: 10px 12px;
    outline: none;
}

.auth-field input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 18px rgba(255, 61, 242, 0.22);
}

.auth-field-error {
    margin: 8px 0 0;
    color: var(--danger);
    font-size: 13px;
}

.auth-button {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--cyan);
    background: linear-gradient(90deg, rgba(0, 245, 255, 0.92), rgba(255, 61, 242, 0.92));
    color: var(--black);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-button:hover {
    filter: brightness(1.12);
}

.auth-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.auth-links {
    margin-top: 20px;
    display: grid;
    gap: 8px;
    font-size: 14px;
    text-align: center;
}

.auth-stats-counter {
    margin: 18px 0;
    padding: 12px;
    border: 1px solid rgba(255, 61, 242, 0.4);
    background: rgba(255, 61, 242, 0.08);
    color: var(--text);
}

.auth-stat-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid rgba(0, 245, 255, 0.18);
    background: rgba(2, 3, 10, 0.52);
}

.auth-stat-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-stat-btn {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(0, 245, 255, 0.45);
    background: rgba(0, 245, 255, 0.08);
    color: var(--text);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 18px;
    cursor: pointer;
}

.auth-stat-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.auth-stat-value {
    min-width: 24px;
    text-align: center;
    color: var(--pink);
    font-weight: 700;
}

.auth-summary {
    display: grid;
    gap: 14px;
}

.auth-summary-card {
    border: 1px solid rgba(0, 245, 255, 0.24);
    background: rgba(2, 3, 10, 0.52);
    padding: 14px;
}

.auth-summary-card h2 {
    margin: 0 0 10px;
    font-family: 'VT323', monospace;
    font-size: 34px;
    color: var(--cyan);
}

.auth-summary-card ul {
    margin: 10px 0 0;
    padding-left: 18px;
}

/* =========================
   RESPONSIVE LAPTOP
========================= */

@media (max-width: 1500px), (max-height: 850px) and (min-width: 901px) {
    body {
        padding: 20px;
    }

    body::before {
        background-size: 44px 44px;
        opacity: 0.30;
    }

    .auth-page {
        width: min(660px, 100%);
    }

    .auth-logo-wrap {
        width: min(620px, 100%);
        margin-bottom: 28px;
    }

    .auth-logo {
        width: min(620px, 94vw);
    }

    .lene-wrap {
        width: min(450px, 88vw);
        margin-bottom: 22px;
    }

    .lene-image {
        max-height: 380px;
    }

    .auth-panel {
        width: min(500px, 100%);
        padding: 24px;
    }

    .auth-title {
        font-size: clamp(40px, 8vw, 64px);
    }

    .auth-subtitle {
        margin-bottom: 34px;
        font-size: 13px;
    }

    .lene-text {
        min-height: 70px;
        margin-bottom: 22px;
        font-size: 14px;
        line-height: 1.55;
    }

    .auth-errors {
        margin-bottom: 16px;
        padding: 11px 13px;
        font-size: 13px;
    }

    .auth-login-form {
        margin-top: 18px;
    }

    .auth-field {
        margin-bottom: 16px;
    }

    .auth-field label {
        font-size: 12px;
    }

    .auth-field input {
        min-height: 42px;
        font-size: 14px;
        padding: 9px 11px;
    }

    .auth-button {
        min-height: 43px;
        font-size: 14px;
    }

    .auth-links {
        margin-top: 18px;
        gap: 7px;
        font-size: 13px;
    }

    .auth-stats-counter {
        margin: 16px 0;
        padding: 11px;
    }

    .auth-stat-row {
        gap: 11px;
        margin-bottom: 11px;
        padding: 9px;
    }

    .auth-stat-btn {
        width: 32px;
        height: 32px;
        font-size: 17px;
    }

    .auth-summary {
        gap: 12px;
    }

    .auth-summary-card {
        padding: 13px;
    }

    .auth-summary-card h2 {
        font-size: 31px;
    }
}

@media (max-width: 1280px), (max-height: 760px) and (min-width: 901px) {
    body {
        padding: 16px;
    }

    body::before {
        background-size: 40px 40px;
        opacity: 0.26;
    }

    body::after {
        opacity: 0.26;
    }

    .auth-page {
        width: min(600px, 100%);
    }

    .auth-logo-wrap {
        width: min(560px, 100%);
        margin-bottom: 22px;
    }

    .auth-logo {
        width: min(560px, 92vw);
    }

    .lene-wrap {
        width: min(390px, 86vw);
        margin-bottom: 18px;
        border-width: 1px;
    }

    .lene-image {
        max-height: 320px;
    }

    .auth-panel {
        width: min(470px, 100%);
        padding: 20px;
    }

    .auth-title {
        margin-bottom: 7px;
        font-size: clamp(36px, 7vw, 56px);
    }

    .auth-subtitle {
        margin-bottom: 28px;
        font-size: 12px;
    }

    .lene-text {
        min-height: 64px;
        margin-bottom: 18px;
        font-size: 13px;
        line-height: 1.5;
    }

    .auth-errors {
        margin-bottom: 14px;
        padding: 10px 12px;
        font-size: 12px;
    }

    .auth-login-form {
        margin-top: 16px;
    }

    .auth-field {
        margin-bottom: 14px;
    }

    .auth-field label {
        margin-bottom: 5px;
        font-size: 11px;
    }

    .auth-field input {
        min-height: 39px;
        font-size: 13px;
        padding: 8px 10px;
    }

    .auth-field-error {
        margin-top: 7px;
        font-size: 12px;
    }

    .auth-button {
        min-height: 40px;
        font-size: 13px;
    }

    .auth-links {
        margin-top: 16px;
        gap: 6px;
        font-size: 12px;
    }

    .auth-stats-counter {
        margin: 14px 0;
        padding: 10px;
    }

    .auth-stat-row {
        gap: 10px;
        margin-bottom: 10px;
        padding: 8px;
    }

    .auth-stat-controls {
        gap: 7px;
    }

    .auth-stat-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .auth-stat-value {
        min-width: 22px;
    }

    .auth-summary {
        gap: 10px;
    }

    .auth-summary-card {
        padding: 12px;
    }

    .auth-summary-card h2 {
        font-size: 28px;
    }
}

@media (max-width: 1100px), (max-height: 680px) and (min-width: 901px) {
    body {
        padding: 12px;
    }

    body::before {
        background-size: 36px 36px;
        opacity: 0.22;
    }

    body::after {
        opacity: 0.22;
    }

    .auth-page {
        width: min(540px, 100%);
    }

    .auth-logo-wrap {
        width: min(500px, 100%);
        margin-bottom: 16px;
    }

    .auth-logo {
        width: min(500px, 90vw);
    }

    .lene-wrap {
        width: min(330px, 84vw);
        margin-bottom: 14px;
    }

    .lene-image {
        max-height: 260px;
    }

    .auth-panel {
        width: min(440px, 100%);
        padding: 16px;
    }

    .auth-title {
        margin-bottom: 6px;
        font-size: clamp(32px, 6vw, 48px);
    }

    .auth-subtitle {
        margin-bottom: 22px;
        font-size: 11px;
    }

    .lene-text {
        min-height: 56px;
        margin-bottom: 14px;
        font-size: 12px;
        line-height: 1.45;
    }

    .auth-errors {
        margin-bottom: 12px;
        padding: 9px 11px;
        font-size: 11px;
    }

    .auth-login-form {
        margin-top: 13px;
    }

    .auth-field {
        margin-bottom: 12px;
    }

    .auth-field label {
        margin-bottom: 4px;
        font-size: 10px;
    }

    .auth-field input {
        min-height: 36px;
        font-size: 12px;
        padding: 7px 9px;
    }

    .auth-field-error {
        margin-top: 6px;
        font-size: 11px;
    }

    .auth-button {
        min-height: 36px;
        font-size: 12px;
    }

    .auth-links {
        margin-top: 13px;
        gap: 5px;
        font-size: 11px;
    }

    .auth-stats-counter {
        margin: 12px 0;
        padding: 9px;
    }

    .auth-stat-row {
        gap: 8px;
        margin-bottom: 8px;
        padding: 7px;
    }

    .auth-stat-controls {
        gap: 6px;
    }

    .auth-stat-btn {
        width: 28px;
        height: 28px;
        font-size: 15px;
    }

    .auth-stat-value {
        min-width: 20px;
        font-size: 12px;
    }

    .auth-summary {
        gap: 8px;
    }

    .auth-summary-card {
        padding: 10px;
    }

    .auth-summary-card h2 {
        margin-bottom: 8px;
        font-size: 25px;
    }

    .auth-summary-card ul {
        margin-top: 8px;
    }
}

/* =========================
   RESPONSIVE TABLET / MOBILE
========================= */

@media (max-width: 900px) {
    body {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 18px;
        align-items: flex-start;
        justify-content: center;
    }

    body::before {
        background-size: 42px 42px;
        opacity: 0.28;
    }

    body::after {
        opacity: 0.28;
    }

    .auth-page {
        width: 100%;
    }

    .auth-logo-wrap {
        width: 100%;
        margin-bottom: 26px;
    }

    .auth-logo {
        width: min(620px, 96vw);
    }

    .lene-wrap {
        width: min(460px, 94vw);
        margin-bottom: 22px;
    }

    .lene-image {
        max-height: 390px;
    }

    .auth-panel {
        width: min(520px, 100%);
        padding: 24px;
    }

    .auth-title {
        font-size: clamp(42px, 11vw, 68px);
    }

    .auth-subtitle {
        margin-bottom: 34px;
        font-size: 13px;
    }

    .lene-text {
        min-height: 82px;
        font-size: 14px;
        line-height: 1.55;
    }

    .auth-field input {
        min-height: 43px;
        font-size: 14px;
    }

    .auth-button {
        min-height: 44px;
        font-size: 14px;
    }

    .auth-stat-row {
        grid-template-columns: 1fr auto;
    }

    .auth-summary-card h2 {
        font-size: 32px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 14px;
        align-items: flex-start;
    }

    body::before {
        background-size: 38px 38px;
        opacity: 0.24;
    }

    body::after {
        opacity: 0.24;
    }

    .auth-page {
        width: 100%;
    }

    .auth-logo-wrap {
        width: 100%;
        margin-bottom: 24px;
    }

    .auth-logo {
        width: min(520px, 96vw);
    }

    .lene-wrap {
        width: min(500px, 96vw);
        margin-bottom: 22px;
    }

    .lene-image {
        max-height: 360px;
    }

    .auth-panel {
        width: 100%;
        padding: 20px;
    }

    .auth-title {
        font-size: clamp(40px, 15vw, 62px);
    }

    .auth-subtitle {
        margin-bottom: 30px;
        font-size: 12px;
    }

    .lene-text {
        min-height: 96px;
        font-size: 13px;
        line-height: 1.5;
    }

    .auth-errors {
        padding: 10px 12px;
        font-size: 12px;
    }

    .auth-field {
        margin-bottom: 16px;
    }

    .auth-field label {
        font-size: 12px;
    }

    .auth-field input {
        min-height: 42px;
        font-size: 14px;
    }

    .auth-button {
        min-height: 43px;
        font-size: 13px;
    }

    .auth-links {
        font-size: 13px;
    }

    .auth-stat-row {
        grid-template-columns: 1fr;
    }

    .auth-stat-controls {
        justify-content: space-between;
    }

    .auth-summary-card {
        padding: 12px;
    }

    .auth-summary-card h2 {
        font-size: 30px;
    }
}

@media (max-width: 420px) {
    body {
        padding: 10px;
    }

    .auth-logo-wrap {
        margin-bottom: 18px;
    }

    .lene-wrap {
        margin-bottom: 18px;
    }

    .lene-image {
        max-height: 320px;
    }

    .auth-panel {
        padding: 16px;
    }

    .auth-title {
        font-size: clamp(38px, 16vw, 56px);
    }

    .auth-subtitle {
        margin-bottom: 24px;
        font-size: 11px;
    }

    .lene-text {
        min-height: 104px;
        margin-bottom: 20px;
        font-size: 12px;
    }

    .auth-field {
        margin-bottom: 14px;
    }

    .auth-field input {
        min-height: 40px;
        font-size: 13px;
        padding: 8px 10px;
    }

    .auth-button {
        min-height: 41px;
        font-size: 12px;
    }

    .auth-links {
        margin-top: 18px;
        font-size: 12px;
    }

    .auth-stats-counter {
        margin: 14px 0;
        padding: 10px;
    }

    .auth-stat-row {
        padding: 8px;
    }

    .auth-stat-btn {
        width: 30px;
        height: 30px;
    }

    .auth-summary-card h2 {
        font-size: 28px;
    }
}

/* by LaEmiX */