/*
 * EZARO — главная ezaro.ru. Палитра и фон те же, что у входа auth.ezaro.ru
 * (authentik/branding/flow.css), чтобы переход на вход был бесшовным.
 * Только тёмная тема — как у 3x-ui и страницы входа.
 */

:root {
    --ez-bg: #0b1120;
    --ez-card: rgba(16, 23, 41, 0.78);
    --ez-card-border: rgba(148, 163, 184, 0.14);
    --ez-text: #e6eaf2;
    --ez-accent: #3b82f6;
    --ez-accent-strong: #2563eb;
    --ez-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background-color: var(--ez-bg);
}

/* фон: тёмно-синий, мягкие свечения по углам, едва заметная сетка */
body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--ez-text);
    font-family: var(--ez-font);
    -webkit-font-smoothing: antialiased;
    background-color: var(--ez-bg);
    background-image:
        radial-gradient(ellipse at center, transparent 45%, rgba(4, 7, 16, 0.5) 100%),
        linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px),
        radial-gradient(60% 55% at 10% 6%, rgba(37, 99, 235, 0.42), transparent 72%),
        radial-gradient(50% 50% at 94% 96%, rgba(29, 78, 216, 0.38), transparent 72%),
        radial-gradient(35% 35% at 50% 45%, rgba(59, 130, 246, 0.1), transparent 70%);
    background-size: 100% 100%, 44px 44px, 44px 44px, 100% 100%, 100% 100%, 100% 100%;
    background-repeat: no-repeat, repeat, repeat, no-repeat, no-repeat, no-repeat;
    background-position: center;
    background-attachment: fixed;
}

/* ---------- карточка ---------- */

.card {
    width: min(26rem, 100%);
    margin: auto 0;
    padding: 3.5rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--ez-card);
    border: 1px solid var(--ez-card-border);
    border-radius: 24px;
    box-shadow:
        0 30px 80px -20px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 1px 0 rgba(255, 255, 255, 0.06) inset;
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
}

/* знак: свечение под ним, расходящиеся кольца-сигнал, мигающий индикатор */
.mark {
    position: relative;
    width: 6rem;
    height: 6rem;
}

.mark svg {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 14px 32px rgba(37, 99, 235, 0.55));
}

.ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(96, 165, 250, 0.55);
    border-radius: 25%;
    opacity: 0;
    animation: signal 4.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.ring:nth-child(2) {
    animation-delay: 1.5s;
}

.ring:nth-child(3) {
    animation-delay: 3s;
}

@keyframes signal {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.85);
        opacity: 0;
    }
}

.led {
    animation: led 2.4s ease-in-out infinite;
}

@keyframes led {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.25;
    }
}

/* надпись и синяя черта под ней, как у 3X-UI */
.wordmark {
    margin: 2rem 0 0;
    line-height: 0;
}

.wordmark svg {
    display: block;
    width: auto;
    height: 2.25rem;
}

.bar {
    width: 3.5rem;
    height: 3px;
    margin-top: 1rem;
    border-radius: 3px;
    background: linear-gradient(90deg, #60a5fa, var(--ez-accent-strong));
}

/* ---------- кнопка входа ---------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 18rem;
    margin-top: 2.25rem;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: var(--ez-accent-strong);
    border-radius: 10px;
    box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.8);
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
    background: var(--ez-accent);
    box-shadow: 0 12px 34px -10px rgba(59, 130, 246, 0.9);
}

.button:active {
    transform: translateY(1px);
}

.button:focus-visible {
    outline: 2px solid #9cc3ff;
    outline-offset: 3px;
}

.button svg {
    transition: transform 0.15s ease;
}

.button:hover svg {
    transform: translateX(2px);
}

footer {
    flex-shrink: 0;
    padding-top: 1.5rem;
    font-size: 0.75rem;
    color: #5b6577;
}

@media (max-width: 480px) {
    .card {
        padding: 3rem 1.25rem 2rem;
        border-radius: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .button,
    .button svg {
        transition: none;
    }

    .ring,
    .led {
        animation: none;
    }
}
