/**
 * iOS-Style Authentication UI
 * Glassmorphic design with smooth animations
 */

/* ============================================
   AUTH PAGE LAYOUT
   ============================================ */

.auth-page-ios {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated Background Gradient */
.auth-page-ios::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            #0f0518 0%,
            #1a0b2e 25%,
            #16213e 50%,
            #0f0518 75%,
            #1a0b2e 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Floating Orbs */
.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.auth-orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--turquoise), transparent);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.auth-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--purple-glow), transparent);
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.auth-orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--gold), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ============================================
   GLASSMORPHIC CARD
   ============================================ */

.auth-card-ios {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 45px 35px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 2px 4px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    animation: cardFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   HEADER
   ============================================ */

.auth-header-ios {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo-ios {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.auth-logo-ios:hover {
    transform: scale(1.05);
}

.auth-logo-ios img {
    height: 55px;
    filter: drop-shadow(0 4px 12px rgba(0, 217, 255, 0.3));
}

.auth-logo-ios h1 {
    font-size: 2rem;
    margin: 0;
    background: linear-gradient(135deg, var(--turquoise), var(--purple-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.auth-title-ios {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
}

.auth-subtitle-ios {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* ============================================
   FORM INPUTS
   ============================================ */

.form-group-ios {
    margin-bottom: 20px;
    position: relative;
}

.form-group-ios label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.input-ios {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: white;
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.input-ios::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-ios:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--turquoise);
    box-shadow:
        0 0 0 4px rgba(0, 217, 255, 0.1),
        0 4px 12px rgba(0, 217, 255, 0.2);
    transform: translateY(-1px);
}

.input-ios:focus+label {
    color: var(--turquoise);
}

/* Password Toggle */
.password-wrapper-ios {
    position: relative;
}

.password-toggle-ios {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle-ios:hover {
    color: var(--turquoise);
}

/* Form Row (2 columns) */
.form-row-ios {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-ios-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--turquoise), #00b8d4);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(0, 217, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.btn-ios-primary::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 ease;
}

.btn-ios-primary:hover::before {
    left: 100%;
}

.btn-ios-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(0, 217, 255, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.btn-ios-primary:active {
    transform: translateY(0);
}

/* Google Button */
.btn-ios-google {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-bottom: 20px;
}

.btn-ios-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-ios-google i {
    font-size: 1.2rem;
}

/* ============================================
   DIVIDER
   ============================================ */

.auth-divider-ios {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

.auth-divider-ios::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
}

.auth-divider-ios span {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    padding: 0 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
}

/* ============================================
   EXTRAS
   ============================================ */

.form-extras-ios {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

/* Custom Checkbox */
.checkbox-ios {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-ios input {
    width: 18px;
    height: 18px;
    accent-color: var(--turquoise);
    cursor: pointer;
}

.checkbox-ios span {
    color: rgba(255, 255, 255, 0.6);
}

.forgot-link-ios {
    color: var(--turquoise);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-link-ios:hover {
    color: #00b8d4;
    text-decoration: underline;
}

/* ============================================
   FOOTER LINKS
   ============================================ */

.auth-footer-ios {
    text-align: center;
    margin-top: 25px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
}

.auth-footer-ios a {
    color: var(--turquoise);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer-ios a:hover {
    color: #00b8d4;
    text-decoration: underline;
}

/* ============================================
   ALERTS
   ============================================ */

.alert-ios {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    animation: slideInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-ios-error {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.3);
    color: #ff8e8e;
}

.alert-ios-success {
    background: rgba(0, 200, 83, 0.1);
    border: 1px solid rgba(0, 200, 83, 0.3);
    color: #72ff9d;
}

.alert-ios i {
    font-size: 1.1rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .auth-card-ios {
        padding: 35px 25px;
        border-radius: 18px;
    }

    .auth-title-ios {
        font-size: 1.4rem;
    }

    .form-row-ios {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .auth-orb {
        filter: blur(60px);
    }
}

@media (max-width: 480px) {
    .auth-page-ios {
        padding: 15px;
    }

    .auth-card-ios {
        padding: 30px 20px;
    }

    .auth-logo-ios h1 {
        font-size: 1.6rem;
    }

    .auth-title-ios {
        font-size: 1.3rem;
    }

    .btn-ios-primary,
    .btn-ios-google {
        padding: 13px;
        font-size: 0.9rem;
    }
}