:root {
    --bg: #0f1116;
    --panel: rgba(255, 255, 255, 0.04);
    --accent: #5ef1a6;
    --accent-2: #72a3ff;
    --text: #e8ecf1;
    --muted: #9aa7b6;
    --danger: #ff6b81;
    --shadow: 0 20px 50px rgba(0,0,0,0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}

::-webkit-scrollbar {
    width: 0;
}

/* ===== БАЗА СТРАНИЦЫ ===== */

body {
    margin: 0;
    font-family: "Manrope","Space Grotesk",system-ui,-apple-system,sans-serif;
    background:
        radial-gradient(circle at 20% 20%, rgba(114,163,255,0.12), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(94,241,166,0.12), transparent 30%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    width: min(760px, 94%);
    margin: 0 auto;
    padding: 48px 0 64px;
}

/* ===== ХЕРО-БЛОК ===== */

header.hero {
    position: relative;
    padding: 24px 22px 28px;
    border-radius: var(--radius);
    background: linear-gradient(135deg,
        rgba(114,163,255,0.16),
        rgba(94,241,166,0.08)
    );
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(94,241,166,0.2), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(114,163,255,0.24), transparent 35%);
    filter: blur(60px);
    opacity: 0.9;
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.2px;
}

h1 {
    margin: 14px 0 10px;
    font-size: clamp(30px, 4vw + 6px, 44px);
}

.lead {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

/* ===== ТИКЕР ===== */

.ticker {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15,17,22,0.75);
    border: 1px solid rgba(255,255,255,0.12);
    overflow: hidden;
}

.ticker__item {
    white-space: nowrap;
    font-weight: 600;
}

/* ===== ТАБЫ ===== */

.tab-bar {
    display: inline-flex;
    gap: 8px;
    background: rgba(15,17,22,0.85);
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    margin-top: 18px;
}

.tab-bar.wide {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.tab-bar.wide .tab-btn {
    flex: 1;
    text-align: center;
}

.tab-btn {
    border: none;
    background: transparent;
    color: var(--text);
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.tab-btn.active {
    background: linear-gradient(120deg, #72a3ff, #5ef1a6);
    color: #0b0d12;
    transform: translateY(-1px);
}

/* чтобы реально скрывать лишние формы */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ===== КАРТЫ ФОРМ ===== */

.login-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 16px;
}

.login-card {
    position: relative;
    padding: 18px 18px 20px;
    border-radius: 16px;
    background: rgba(10,12,18,0.9);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
    backdrop-filter: blur(10px);
}

.login-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

/* ===== ФОРМЫ / ПОЛЯ ===== */

form {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
}

input {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.16);
    color: var(--text);
    padding: 11px 12px;
    border-radius: 10px;
    font: inherit;
    outline: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

input::placeholder {
    color: rgba(232,236,241,0.55);
}

input:focus {
    border-color: var(--accent);
    background: rgba(21,25,34,0.95);
    box-shadow: 0 0 0 2px rgba(94,241,166,0.25);
}

/* ===== КНОПКИ ===== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: linear-gradient(120deg, #72a3ff, #5ef1a6);
    color: #0b0d12;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 35px rgba(114,163,255,0.35);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(114,163,255,0.45);
}

/* “прозрачные” кнопки — те, у которых в html есть ghost-btn */
.ghost-btn,
.btn.ghost-btn {
    background: rgba(255,255,255,0.04);
    color: var(--text);
    border-color: rgba(255,255,255,0.16);
    box-shadow: none;
}

.ghost-btn:hover,
.btn.ghost-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.28);
    transform: translateY(-1px);
}

.btn.full {
    width: 100%;
}

.btn-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.line-btn {
    height: 48px;
    padding: 12px 14px;
}

/* ===== ТЕКСТОВЫЕ СОСТОЯНИЯ ===== */

.error {
    color: var(--danger);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.note {
    color: var(--muted);
    font-size: 13px;
}

.note.strong {
    color: var(--text);
    font-weight: 700;
}

/* ===== ССЫЛКИ ВНИЗУ ===== */

.top-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
}

.ghost {
    text-align: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text);
    background: rgba(15,17,22,0.85);
    font-weight: 500;
}

.ghost:hover {
    background: rgba(255,255,255,0.08);
}

/* ===== ТОСТ ===== */

.toast-floating {
    position: fixed;
    right: 16px;
    bottom: 16px;
    background: rgba(15,17,22,0.95);
    color: var(--text);
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: var(--shadow);
    max-width: 320px;
    z-index: 50;
    animation: fadeIn 0.2s ease;
}

.toast-floating.success {
    border-color: rgba(94,241,166,0.4);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== АДАПТИВ ===== */

@media (max-width: 777px) {
    .shell {
        padding-top: 24px;
        padding-bottom: 40px;
    }

    .ticker {
        display: none;
    }

    header.hero {
        padding: 20px 16px 22px;
    }

    .login-card {
        padding: 16px 14px 18px;
    }

    .btn-row {
        grid-template-columns: 1fr;
    }
}
