/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f5f0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Контейнер */
.container {
    display: flex;
    width: 1000px;
    max-width: 95%;
    height: 650px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.15);
}

/* Левая секция */
.left-section {
    flex: 1;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.left-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.logo i {
    font-size: 2.8rem;
    color: #FFD700;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.brand-text {
    position: relative;
    z-index: 1;
}

.brand-text h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.brand-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 350px;
}

.features {
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 1rem;
}

.feature i {
    color: #FFD700;
    font-size: 1.2rem;
}

/* Правая секция */
.right-section {
    flex: 1;
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.form-header {
    margin-bottom: 40px;
}

.form-container h2 {
    color: #8B4513;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.form-subtitle {
    color: #666;
    font-size: 1rem;
    opacity: 0.8;
}

/* Форма */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #8B4513;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group label i {
    font-size: 1.1rem;
    opacity: 0.8;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0d6cc;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #faf8f5;
    color: #333;
}

.form-group input:focus {
    outline: none;
    border-color: #8B4513;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8B4513;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #A0522D;
}

.error-message {
    color: #d9534f;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 20px;
    padding-left: 5px;
}

/* Опции формы */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #666;
    font-size: 0.9rem;
    user-select: none;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #8B4513;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s;
    background: white;
}

.checkbox-container input:checked + .checkmark {
    background-color: #8B4513;
    border-color: #8B4513;
}

.checkbox-container input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: #8B4513;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #A0522D;
    text-decoration: underline;
}

/* Кнопка входа */
.btn-login {
    width: 100%;
    padding: 17px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.btn-login:hover::before {
    left: 100%;
}

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

.btn-login.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-login.loading .btn-text {
    margin-right: 10px;
}

.btn-login.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Ссылка регистрации */
.register-link {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.register-link p {
    color: #666;
    font-size: 0.95rem;
}

.register-btn {
    color: #8B4513;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
}

.register-btn:hover {
    color: #A0522D;
    text-decoration: underline;
    background-color: rgba(139, 69, 19, 0.05);
}

/* Контейнер сообщений */
.message-container {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.message-container.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message-container.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

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

/* Футер */
.footer {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.contact-info {
    margin-top: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.contact-info i {
    margin: 0 5px;
}

/* Адаптивность */
@media (max-width: 1100px) {
    .container {
        width: 90%;
        height: auto;
        flex-direction: column;
        margin: 20px auto;
    }

    .left-section, .right-section {
        padding: 40px 30px;
    }

    .left-section {
        padding-bottom: 30px;
    }

    .logo i {
        font-size: 2.2rem;
    }

    .brand-text h2 {
        font-size: 1.8rem;
    }

    .form-container h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
    }

    .left-section, .right-section {
        padding: 30px 20px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .forgot-password {
        align-self: flex-end;
    }
}

/* Анимации для формы */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.left-section {
    animation: slideInLeft 0.6s ease-out;
}

.right-section {
    animation: slideInRight 0.6s ease-out;
}