/* Стили для страниц авторизации - iOS 26 Glassmorphism */

.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.auth-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 28px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    padding: 48px;
    width: 100%;
    max-width: 480px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    overflow: hidden;
}

/* Убираем цветную полоску */

.auth-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    border-radius: 28px;
    pointer-events: none;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.logo-title {
    font-size: 28px;
    font-weight: 700;
    color: #1D1D1F;
    margin: 0;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 14px;
    color: #86868B;
    margin: 0;
    font-style: italic;
    text-align: center;
    line-height: 1.4;
}

.auth-content {
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Стили для вкладок */
.auth-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 32px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.auth-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 12px;
    color: rgba(0, 0, 0, 0.7);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab.active {
    background: rgba(0, 0, 0, 0.1);
    color: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-tab:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.9);
}

.tab-icon {
    font-size: 16px;
}

.tab-text {
    font-weight: 500;
}

/* Стили для контента вкладок */
.auth-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-tab-content.active {
    display: block;
}

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

.auth-title {
    font-size: 26px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 12px 0;
    text-align: center;
}

.auth-description {
    font-size: 16px;
    color: #333333;
    margin: 0 0 32px 0;
    text-align: center;
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 8px 0;
}

.form-input {
    width: 100%;
    padding: 18px 24px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    font-size: 16px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    color: #000000;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: rgba(0, 122, 255, 0.6);
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 0 0 4px rgba(0, 122, 255, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.form-error {
    font-size: 12px;
    color: #FF6B6B;
    margin: 0;
    min-height: 16px;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.auth-button {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, 
        rgba(0, 122, 255, 0.9) 0%, 
        rgba(88, 86, 214, 0.9) 100%);
    backdrop-filter: blur(20px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    box-shadow: 
        0 4px 16px rgba(0, 122, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 32px rgba(0, 122, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, 
        rgba(0, 122, 255, 1) 0%, 
        rgba(88, 86, 214, 1) 100%);
}

.auth-button:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(0, 122, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-text,
.button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-links {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.auth-links p {
    margin: 0;
    font-size: 14px;
    color: #86868B;
}

.auth-link {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #5856D6;
    text-decoration: underline;
}

/* Анимации */
.auth-card {
    animation: slideInUp 0.6s ease-out;
}

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

/* Адаптивность */
@media (max-width: 768px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-card {
        padding: 30px 25px;
        border-radius: 20px;
    }
    
    .logo-title {
        font-size: 24px;
    }
    
    .logo-subtitle {
        font-size: 13px;
    }
    
    .auth-title {
        font-size: 22px;
    }
    
    .auth-description {
        font-size: 15px;
    }
    
    .form-input {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .auth-button {
        padding: 14px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 20px;
        border-radius: 16px;
    }
    
    .logo-icon {
        font-size: 40px;
    }
    
    .logo-title {
        font-size: 22px;
    }
    
    .auth-title {
        font-size: 20px;
    }
    
    .form-input {
        padding: 12px 14px;
    }
    
    .auth-button {
        padding: 12px 18px;
    }
}

/* Состояния ошибок */
.form-input.error {
    border-color: #FF3B30;
    background: rgba(255, 59, 48, 0.05);
}

.form-input.error:focus {
    border-color: #FF3B30;
    box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.1);
}

/* Успешные состояния */
.form-input.success {
    border-color: #34C759;
    background: rgba(52, 199, 89, 0.05);
}

.form-input.success:focus {
    border-color: #34C759;
    box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.1);
}

/* Стили для футера */
.auth-footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
}

.footer-text {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.7);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.footer-developer {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.7);
    margin: 0;
    line-height: 1.4;
}

.footer-link {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #5856D6;
    text-decoration: underline;
}

/* Стили для переключателя согласия в стиле iOS26 */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    color: #000000;
    margin: 0;
    padding: 0;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

/* iOS26 Toggle Switch */
.checkmark {
    width: 50px;
    height: 30px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Переключатель в выключенном состоянии */
.checkmark::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 248, 248, 0.95) 100%);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Переключатель во включенном состоянии */
.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, 
        rgba(0, 122, 255, 0.9) 0%, 
        rgba(88, 86, 214, 0.9) 100%);
    border-color: rgba(0, 122, 255, 0.3);
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 122, 255, 0.3),
        0 0 0 1px rgba(0, 122, 255, 0.1);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::before {
    transform: translateX(20px);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(248, 248, 248, 1) 100%);
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Анимация при наведении */
.checkbox-container:hover .checkmark {
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.1);
}

.checkbox-container:hover input[type="checkbox"]:checked + .checkmark {
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 122, 255, 0.4),
        0 0 0 1px rgba(0, 122, 255, 0.2);
}

/* Анимация при нажатии */
.checkbox-container:active .checkmark::before {
    transform: scale(0.95);
}

.checkbox-container:active input[type="checkbox"]:checked + .checkmark::before {
    transform: translateX(20px) scale(0.95);
}

.checkbox-text {
    flex: 1;
    color: #000000;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
}

.privacy-link {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.privacy-link:hover {
    color: #5856D6;
    text-decoration: underline;
}

/* Состояние ошибки для переключателя */
.checkbox-container.error .checkmark {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.3);
    box-shadow: 
        inset 0 1px 3px rgba(255, 59, 48, 0.1),
        0 2px 8px rgba(255, 59, 48, 0.2);
}

.checkbox-container.error .checkbox-text {
    color: #FF3B30;
}

/* Стили для информации о версии */
.version-info {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.version-text {
    font-size: 12px;
    color: #666666;
    font-weight: 400;
    opacity: 0.8;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 480px) {
    .checkmark {
        width: 44px;
        height: 26px;
        border-radius: 13px;
    }
    
    .checkmark::before {
        width: 20px;
        height: 20px;
        border-radius: 10px;
    }
    
    .checkbox-container input[type="checkbox"]:checked + .checkmark::before {
        transform: translateX(18px);
    }
    
    .checkbox-text {
        font-size: 13px;
    }
    
    .version-text {
        font-size: 11px;
    }
}
