@font-face {
    font-family: 'Random Grotesque';
    src: url('fonts/RG-StandardBook.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Random Grotesque Medium';
    src: url('fonts/RG-StandardMedium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    font-family: 'Random Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0a0a0a;
    overflow: hidden;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

#gridCanvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
}

/* ===== КОНТЕЙНЕР ===== */
.auth-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 20px;
}

/* ===== КАРТОЧКА ===== */
.auth-card {
    width: 100%;
    max-width: 400px;
    background-color: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px) saturate(100%);
    -webkit-backdrop-filter: blur(25px) saturate(100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* ===== ЛОГОТИП ===== */
.auth-logo-link {
    display: block;
    transition: opacity 0.2s ease;
}
.auth-logo-link:hover { opacity: 0.8; }

.auth-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

/* ===== ЗАГОЛОВОК ===== */
.auth-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 500;
    font-family: 'Random Grotesque Medium', 'Random Grotesque', sans-serif;
    letter-spacing: 1px;
    text-align: center;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.45);
    font-size: 15px;
    font-weight: 400;
    font-family: 'Random Grotesque', sans-serif;
    letter-spacing: 0.5px;
    text-align: center;
    margin-top: -16px;
}

/* ===== ФОРМА ===== */
.auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-field {
    width: 100%;
}

.auth-input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 400;
    font-family: 'Random Grotesque', sans-serif;
    letter-spacing: 0.5px;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.auth-input::placeholder { color: rgba(255, 255, 255, 0.3); }
.auth-input:focus {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.06);
}

.auth-submit {
    width: 100%;
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 14px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Random Grotesque Medium', 'Random Grotesque', sans-serif;
    cursor: pointer;
    letter-spacing: 0.8px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    margin-top: 4px;
}
.auth-submit:hover {
    background-color: #e0e0e0;
    transform: scale(0.98);
}

/* ===== РАЗДЕЛИТЕЛЬ ===== */
.auth-divider {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.08);
}

.auth-divider-text {
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    font-weight: 400;
    font-family: 'Random Grotesque', sans-serif;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* ===== VK ID КОНТЕЙНЕР ===== */
.auth-vkid {
    width: 100%;
    display: flex;
    justify-content: center;
    min-height: 44px;
}

/* ===== СОГЛАШЕНИЕ ===== */
.auth-agreement {
    color: rgba(255, 255, 255, 0.25);
    font-size: 12px;
    font-weight: 400;
    font-family: 'Random Grotesque', sans-serif;
    letter-spacing: 0.4px;
    text-align: center;
    line-height: 1.6;
}
.auth-agreement a {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color 0.2s ease;
}
.auth-agreement a:hover { color: rgba(255, 255, 255, 0.6); }

/* ===== ФУТЕР ===== */
.auth-footer {
    color: rgba(255, 255, 255, 0.35);
    font-size: 14px;
    font-weight: 400;
    font-family: 'Random Grotesque', sans-serif;
    letter-spacing: 0.5px;
    text-align: center;
}
.auth-footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}
.auth-footer a:hover { color: #ffffff; }

/* ===== АДАПТИВ ===== */
@media (max-width: 480px) {
    .auth-card {
        padding: 32px 24px;
        border-radius: 20px;
        gap: 20px;
    }
    .auth-title { font-size: 22px; }
    .auth-subtitle { font-size: 14px; }
    .auth-logo { width: 44px; height: 44px; }
    .auth-input { font-size: 14px; padding: 10px 14px; }
    .auth-submit { font-size: 15px; padding: 10px 20px; }
}

@media (max-width: 374px) {
    .auth-card {
        padding: 28px 18px;
        gap: 16px;
    }
    .auth-title { font-size: 20px; }
    .auth-subtitle { font-size: 13px; margin-top: -12px; }
    .auth-logo { width: 38px; height: 38px; }
    .auth-input { font-size: 13px; padding: 9px 12px; }
    .auth-submit { font-size: 14px; padding: 9px 18px; }
}