* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f2f2f7;
    color: #1d1d1f;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 15px;
}

.auth-container {
    width: 100%;
    max-width: 500px;
}

.auth-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.auth-header {
    margin-bottom: 20px;
}

.auth-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.auth-icon svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

.auth-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1d1d1f;
}

.auth-subtitle {
    font-size: 15px;
    color: #8e8e93;
    margin-bottom: 20px;
    line-height: 1.4;
}

.security-notice {
    background: #f0f7ff;
    border-left: 4px solid #007AFF;
    padding: 10px 12px;
    margin-bottom: 18px;
    border-radius: 10px;
    font-size: 13px;
    text-align: left;
    color: #1d1d1f;
}

.security-notice strong {
    color: #007AFF;
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid #e5e5ea;
    border-radius: 10px;
    background: #ffffff;
    color: #1d1d1f;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-input::placeholder {
    color: #c7c7cc;
}

.auth-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #34C759, #30B94E);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 5px;
    margin-bottom: 12px;
}

.auth-button:hover {
    background: linear-gradient(135deg, #30B94E, #2CAE45);
}

.auth-button:active {
    transform: translateY(1px);
}

.register-button {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: #007AFF;
    border: 2px solid #e5e5ea;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
}

.register-button:hover {
    background: #f8f8f8;
    border-color: #007AFF;
}

.register-button:active {
    transform: translateY(1px);
}

.error-message {
    background: #ff3b30;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 13px;
    text-align: left;
}

.error-message div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-links {
    margin-top: 15px;
    font-size: 13px;
    color: #8e8e93;
}

.auth-link {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8e8e93;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}

.toggle-password:hover {
    color: #007AFF;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card {
    animation: fadeIn 0.3s ease-out;
}

/* Адаптивность */
@media (max-width: 480px) {
    .auth-card {
        padding: 20px 16px;
        border-radius: 14px;
    }
    
    .auth-title {
        font-size: 18px;
    }
    
    .auth-subtitle {
        font-size: 14px;
    }
    
    .form-input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .auth-button,
    .register-button {
        padding: 12px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    body {
        padding: 10px;
    }
    
    .auth-card {
        padding: 18px 14px;
    }
    
    .auth-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 12px;
    }
    
    .auth-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .auth-title {
        font-size: 17px;
    }
    
    .auth-subtitle {
        font-size: 13px;
        margin-bottom: 16px;
    }
}