/* ===== FONTS ===== */
@font-face {
    font-family: 'Onder';
    src: url('fonts/ONDER-REGULAR.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Bounded';
    src: url('fonts/Bounded-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.4);
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-hover: rgba(255, 255, 255, 0.1);
    --blur: 24px;
    --radius: 16px;
    --radius-lg: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Bounded', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== REGISTER PAGE ===== */
.register-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
}

.register-bg {
    position: fixed;
    inset: 0;
    background: url('img/fon.png') center/cover no-repeat;
    z-index: 0;
}

.register-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.85) 0%, rgba(10, 10, 10, 0.95) 100%);
    z-index: 1;
}

/* ===== BACK LINK ===== */
.back-link {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    padding: 10px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
}

.back-link svg {
    width: 18px;
    height: 18px;
}

/* ===== REGISTER CARD ===== */
.register-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    padding: 48px 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 60px rgba(255, 255, 255, 0.03);
    animation: cardAppear 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.register-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    pointer-events: none;
}

/* ===== LOGO ===== */
.register-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Onder', sans-serif;
    font-size: 10px;
    letter-spacing: 3px;
    padding: 8px 18px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 999px;
    margin: 0 auto 32px;
    width: fit-content;
}

.register-logo-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* ===== TITLE ===== */
.register-title {
    font-family: 'Onder', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 8px;
    opacity: 0.9;
}

.register-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 36px;
    font-weight: 300;
}

/* ===== FORM ===== */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fieldAppear 0.6s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

.form-group:nth-child(1) { animation-delay: 0.15s; }
.form-group:nth-child(2) { animation-delay: 0.25s; }
.form-group:nth-child(3) { animation-delay: 0.35s; }
.form-group:nth-child(4) { animation-delay: 0.45s; }
.form-group:nth-child(5) { animation-delay: 0.55s; }

@keyframes fieldAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group label {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    font-weight: 400;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Bounded', sans-serif;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
}

.toggle-password:hover {
    color: var(--text-primary);
}

.toggle-password svg {
    width: 18px;
    height: 18px;
}

.toggle-password .eye-closed {
    display: none;
}

.toggle-password.active .eye-open {
    display: none;
}

.toggle-password.active .eye-closed {
    display: block;
}

/* ===== SUBMIT BUTTON ===== */
.btn-register-submit {
    width: 100%;
    padding: 16px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 12px;
    font-family: 'Bounded', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    animation: btnAppear 0.6s ease 0.65s forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes btnAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-register-submit:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

.btn-register-submit:active {
    transform: translateY(0);
}

/* ===== LOGIN LINK ===== */
.register-login-link {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 24px;
    animation: fieldAppear 0.6s ease 0.75s forwards;
    opacity: 0;
}

.register-login-link a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.register-login-link a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .register-card {
        padding: 36px 24px;
    }

    .register-title {
        font-size: 12px;
    }

    .back-link {
        top: 16px;
        left: 16px;
        font-size: 12px;
        padding: 8px 14px;
    }

    .register-logo {
        font-size: 8px;
        padding: 6px 14px;
    }

    .register-logo-icon {
        width: 22px;
        height: 22px;
    }
}
