* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #17a2b8;
    --primary-dark: #138496;
    --success: #27ae60;
    --danger: #e74c3c;
    --text-dark: #2c3e50;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-box {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: white;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 10px;
}

.logo-circle img {
    width: 120%;
    height: 120%;
    object-fit: contain;
}

.auth-header h1 {
    font-family: 'Playfair Display', serif;
    color: var(--text-dark);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #6c757d;
    font-size: 1rem;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(23, 162, 184, 0.3);
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.alert-error {
    background: #fee;
    color: var(--danger);
    border: 2px solid var(--danger);
}

.alert-success {
    background: #efe;
    color: var(--success);
    border: 2px solid var(--success);
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.auth-footer p {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.telegram-auth-section {
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    margin: 1.5rem 0;
}



@media (max-width: 768px) {
    .auth-box {
        padding: 2rem;
    }
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #7f8c8d;
    font-size: 0.8rem;
}

.form-group input:focus + small {
    color: var(--primary-color);
}

/* Анимация для success сообщения */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert {
    animation: slideIn 0.4s ease-out;
}

/* Прогресс-бар для пароля*/
.password-strength {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s;
}

.password-strength-bar.weak {
    width: 33%;
    background: #e74c3c;
}

.password-strength-bar.medium {
    width: 66%;
    background: #f39c12;
}

.password-strength-bar.strong {
    width: 100%;
    background: #27ae60;
}
