/* Overlay */
.auth-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Modal */
.auth-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

/* Close button */
.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #999;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-close:hover {
    color: #333;
}

/* Title */
.auth-modal-title {
    margin: 0 0 24px 0;
    font-size: 24px;
    font-weight: 600;
    color: #000;
    text-align: center;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #0066FF;
    border-radius: 8px;
    background: #fff;
    color: #0066FF;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: #0066FF;
    color: #fff;
}

.auth-tab:hover:not(.active) {
    background: #f0f7ff;
}

.auth-tab-content {
    display: none;
}

/* Показываем только активный таб */
.auth-tab-content.active {
    display: block;
}

/* Анимация переключения (опционально) */
.auth-tab-content.active {
    animation: fadeIn 0.3s ease-in;
}

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

/* Убедитесь что табы имеют правильные стили */
.auth-tab {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #0066FF;
    border-radius: 8px;
    background: #fff;
    color: #0066FF;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: #0066FF;
    color: #fff;
}

.auth-tab:hover:not(.active) {
    background: #f0f7ff;
}
/* Description */
.auth-description {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666;
    text-align: center;
    line-height: 1.5;
}



/* Form */
.auth-form {
    margin-bottom: 20px;
}

.auth-input-wrapper {
    margin-bottom: 16px;
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.auth-input::placeholder {
    color: #999;
}

/* Code input */
.auth-code-wrapper {
    margin-bottom: 16px;
}

.auth-code-input {
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 4px;
    font-size: 18px;
}

.auth-resend-code {
    display: block;
    width: 100%;
    padding: 8px;
    background: none;
    border: none;
    color: #0066FF;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
}

.auth-resend-code:hover {
    text-decoration: underline;
}

/* Submit button */
.auth-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-submit-btn:not(.auth-submit-primary) {
    background: #f5f5f5;
    color: #333;
}

.auth-submit-btn:not(.auth-submit-primary):hover {
    background: #e8e8e8;
}

.auth-submit-primary {
    background: #0066FF;
    color: #fff;
}

.auth-submit-primary:hover {
    background: #0052cc;
}

/* Social auth */
.auth-social {
    margin-bottom: 16px;
}

.auth-yandex-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: #000;
    color: #fff!important;
    border-radius: 8px;
    text-decoration: none!important;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
}

.auth-yandex-btn:hover {
    background: #1a1a1a;
}

.yandex-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #FC3F1D;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
}

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

.auth-link {
    color: #0066FF;
    text-decoration: none;
    font-size: 14px;
}

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

/* Register */
.auth-register {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.auth-register .auth-link {
    font-weight: 500;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-modal {
        padding: 24px 20px;
    }
    
    .auth-modal-title {
        font-size: 20px;
    }
    
    .auth-tab {
        padding: 10px 12px;
        font-size: 13px;
    }
}