/* Стили для страниц авторизации */
/* Используется дизайн система сайта: glassmorphism, синий (#2997ff) + фиолетовый (#bf5af2) */

:root {
    --bg-primary: #000000;
    --bg-secondary: rgba(255, 255, 255, 0.05);
    --bg-card: rgba(255, 255, 255, 0.08);
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent-blue: #2997ff;
    --accent-purple: #bf5af2;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-glow: rgba(41, 151, 255, 0.3);
}

[data-theme="light"] {
    --bg-primary: #f5f5f7;
    --bg-secondary: rgba(0, 0, 0, 0.03);
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-primary: #1d1d1f;
    --text-secondary: #5a5a5e;
    --accent-blue: #0066cc;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-glow: rgba(0, 102, 204, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Particles фон */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    clip-path: inset(5% 0 0 0);
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: float 15s infinite linear;
    opacity: 0.6;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    80% {
        opacity: 0.6;
    }
    90% {
        opacity: 0;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--shadow-glow);
}

/* Auth Container */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

/* Auth Card */
.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(41, 151, 255, 0.2);
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo-link {
    text-decoration: none;
    display: inline-block;
}

.auth-logo-text {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Title */
.auth-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 16px;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.1);
}

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

/* Button */
.auth-button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    font-family: inherit;
    min-height: 44px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
}

.auth-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(41, 151, 255, 0.4);
}

.auth-button:active:not(:disabled) {
    transform: translateY(0);
}

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

/* Alert Messages */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(48, 209, 88, 0.1);
    border: 1px solid rgba(48, 209, 88, 0.3);
    color: #30d158;
}

.alert-error {
    background: rgba(255, 69, 58, 0.1);
    border: 1px solid rgba(255, 69, 58, 0.3);
    color: #ff453a;
}

/* Links */
.auth-links {
    text-align: center;
    margin-top: 24px;
}

.auth-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.auth-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 767px) {
    .auth-container {
        padding: 12px;
    }

    .auth-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .auth-title {
        font-size: 28px;
    }

    .auth-subtitle {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
    }

    .auth-title {
        font-size: 24px;
    }

    .form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
