:root {
    /* Обновленная цветовая палитра */
    --bg-primary: #0a0e1a;
    --bg-secondary: #131826;
    --card-bg: #1a1f35;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Акцентные цвета */
    --accent-primary: #3b82f6;
    --accent-primary-hover: #2563eb;
    --accent-primary-active: #1d4ed8;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);

    /* Границы и тени */
    --border-color: #2d3548;
    --border-color-hover: #3d4658;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Тени */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.35);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-container {
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 48px 36px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 36px;
    font-size: 0.95rem;
    font-weight: 500;
}

.form-container h2 {
    font-size: 1.35rem;
    margin-bottom: 24px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

input[type="text"]:hover,
input[type="password"]:hover {
    border-color: var(--border-color-hover);
    background: rgba(255, 255, 255, 0.05);
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: var(--text-muted);
}

.btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    background: var(--accent-primary-active);
    transform: translateY(0);
}

.form-footer {
    margin-top: 24px;
    text-align: center;
}

.form-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--transition-base);
}

.form-footer a:hover {
    color: var(--accent-primary-hover);
    text-decoration: underline;
}

.error-message {
    margin-top: 24px;
    padding: 14px 16px;
    background: var(--error-bg);
    border: 2px solid var(--error);
    border-radius: var(--radius-md);
    color: var(--error);
    font-size: 0.95rem;
    font-weight: 600;
    animation: shake 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

/* Accessibility */
.btn:focus-visible,
input[type="text"]:focus-visible,
input[type="password"]:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .login-card {
        padding: 36px 24px;
        border-radius: var(--radius-md);
    }

    h1 {
        font-size: 1.85rem;
    }

    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 30px;
    }

    .form-container h2 {
        font-size: 1.2rem;
    }

    input[type="text"],
    input[type="password"] {
        padding: 12px 14px;
        font-size: 1rem;
    }

    .btn {
        padding: 12px 18px;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 28px 20px;
    }

    h1 {
        font-size: 1.65rem;
    }
}