/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 1rem;
}

.auth-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.register-container,
.login-container,
.forgot-password-container {
    width: 100%;
    max-width: 500px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideUp 0.6s ease-out;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

    .auth-header h2 {
        color: #2c3e50;
        font-weight: 700;
        font-size: 2.25rem;
        margin-bottom: 0.5rem;
        background: linear-gradient(135deg, #667eea, #764ba2);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.auth-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    width: 100%;
}

    .form-control:focus, .form-select:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
        transform: translateY(-2px);
        outline: none;
    }

    .form-control::placeholder {
        color: #adb5bd;
        opacity: 0.7;
    }

/* Button styles */
.auth-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    width: 100%;
}

    .auth-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
    }

    .auth-btn:active {
        transform: translateY(-1px);
    }

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    margin-top: 1rem;
}

    .btn-secondary:hover {
        box-shadow: 0 12px 30px rgba(108, 117, 125, 0.4);
    }

/* Links */
.links {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: #6c757d;
    font-size: 1rem;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

    .auth-link:hover {
        color: #764ba2;
    }

    .auth-link::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background: #764ba2;
        transition: width 0.3s ease;
    }

    .auth-link:hover::after {
        width: 100%;
    }

/* Additional links in forms */
.additional-links {
    text-align: center;
    margin-top: 1.5rem;
    color: #6c757d;
}

/* Validation styles */
.text-danger {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
    color: #e74c3c;
    font-weight: 500;
}

.input-validation-error {
    border-color: #e74c3c !important;
}

    .input-validation-error:focus {
        box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15) !important;
    }

/* Alert styles */
.alert {
    border-radius: 12px;
    border: none;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}
/* Кнопка-глазик прямо внутри поля */
.btn-toggle-password {
    position: absolute;
    top: 50%;
    right: 0.75rem;  /* отступ от края поля */
    transform: translateY(-50%);
    border: none !important;
    background: transparent !important;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.btn-toggle-password:focus {
    outline: none !important;
}

.input-group, .position-relative {
    width: 100%;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .register-container,
    .login-container,
    .forgot-password-container {
        padding: 2rem;
        margin: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-header h2 {
        font-size: 1.75rem;
    }

    .form-control, .form-select {
        padding: 0.75rem 0.875rem;
    }
}

@media (max-width: 480px) {
    .register-container,
    .login-container,
    .forgot-password-container {
        padding: 1.5rem;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }

    .auth-subtitle {
        font-size: 1rem;
    }
}
