/* =============================================
   ICON GROUP — Auth (Login / Register / Verify)
   Sliding Overlay Animation — Light Blue Theme
   Primary: #2563eb | BG: #f8fafc | Card: #ffffff
   ============================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Sayfa arka planı ── */
body.auth-page {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4ff;
}

/* ── Video arka plan (hafif soluk) ── */
.auth-video-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.auth-video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
    filter: saturate(1.2);
}

.auth-video-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(219, 234, 254, 0.85) 0%,
            rgba(240, 244, 255, 0.92) 50%,
            rgba(224, 231, 255, 0.88) 100%);
}

/* ══════════════════════════════════════════════
   ANA CONTAINER
   ══════════════════════════════════════════════ */
.auth-container {
    position: relative;
    z-index: 1;
    width: 900px;
    max-width: 98vw;
    min-height: 580px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(37, 99, 235, 0.13),
        0 8px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* ══════════════════════════════════════════════
   FORM PANELLERİ

   Login → her zaman SOL yarıda (left: 0)
   Register → her zaman SAĞ yarıda (right: 0)
   Verify → register ile aynı sağ yarı

   Geçiş sırasında form panelleri yerinden oynamaz,
   sadece opacity + küçük translateX ile soluklaşır.
   Asıl animasyonu overlay yapar.
   ══════════════════════════════════════════════ */

/* Ortak panel stili */
.auth-panel {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2.8rem;
    background: #ffffff;
    overflow-y: auto;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

/* Login: sol */
#panel-login {
    left: 0;
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
    pointer-events: all;
}

/* Register: sağ, başta gizli */
#panel-register {
    right: 0;
    opacity: 0;
    transform: translateX(24px);
    z-index: 2;
    pointer-events: none;
}

/* Verify: sağda, başta gizli */
#panel-verify {
    right: 0;
    opacity: 0;
    transform: translateX(24px);
    z-index: 2;
    pointer-events: none;
}

/* Google register paneli — başta sağda görünmez */
#panel-google-register {
    right: 0;
    opacity: 0;
    transform: translateX(24px);
    z-index: 2;
    pointer-events: none;
}

/* SMS OTP paneli — başta sağda görünmez */
#panel-sms-otp {
    right: 0;
    opacity: 0;
    transform: translateX(24px);
    z-index: 2;
    pointer-events: none;
}


/* ─── .active → register görünür, login solar ─── */
.auth-container.active #panel-login {
    opacity: 0;
    transform: translateX(-24px);
    pointer-events: none;
    z-index: 1;
}

.auth-container.active #panel-register {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

/* ─── .verify → verify görünür, diğerleri solar ─── */
.auth-container.verify #panel-login {
    opacity: 0;
    transform: translateX(-24px);
    pointer-events: none;
    z-index: 1;
}

.auth-container.verify #panel-register {
    opacity: 0;
    transform: translateX(24px);
    pointer-events: none;
    z-index: 1;
}

.auth-container.verify #panel-verify {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

/* ─── .google-reg → 4. panel görünür ─── */
.auth-container.google-reg #panel-login {
    opacity: 0;
    transform: translateX(-24px);
    pointer-events: none;
    z-index: 1;
}

.auth-container.google-reg #panel-register {
    opacity: 0;
    transform: translateX(24px);
    pointer-events: none;
    z-index: 1;
}

.auth-container.google-reg #panel-verify {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.auth-container.google-reg #panel-google-register {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

/* ─── .sms-otp → Panel 5 görünür, diğerleri solar ─── */
.auth-container.sms-otp #panel-login,
.auth-container.sms-otp #panel-register,
.auth-container.sms-otp #panel-verify,
.auth-container.sms-otp #panel-google-register {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.auth-container.sms-otp #panel-sms-otp {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.auth-container.google-reg .auth-overlay-container,
.auth-container.verify .auth-overlay-container,
.auth-container.sms-otp .auth-overlay-container {
    transform: translateX(-100%);
}

/* ══════════════════════════════════════════════
   OVERLAY — kayan mavi blok
   ══════════════════════════════════════════════ */
.auth-overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 100;
    transition: transform 0.65s cubic-bezier(0.77, 0, 0.18, 1);
}

/* .active / .verify / .google-reg → container sola kayar */
.auth-container.active .auth-overlay-container,
.auth-container.verify .auth-overlay-container,
.auth-container.google-reg .auth-overlay-container {
    transform: translateX(-100%);
}

/* auth-overlay: 2× genişlik */
.auth-overlay {
    position: relative;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #3b82f6 100%);
    transition: transform 0.65s cubic-bezier(0.77, 0, 0.18, 1);
}

.auth-container.active .auth-overlay,
.auth-container.verify .auth-overlay,
.auth-container.google-reg .auth-overlay {
    transform: translateX(50%);
}


/* ── Overlay içindeki içerik panelleri ── */
.overlay-panel {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    width: 50%;
    padding: 2.5rem;
    color: #fff;
    transition: transform 0.65s cubic-bezier(0.77, 0, 0.18, 1);
}

/* Sağ panel: varsayılan (Kayıt daveti) */
.overlay-panel.overlay-right {
    right: 0;
    transform: translateX(0);
}

/* Sol panel: aktif durumda görünen (Giriş daveti) */
.overlay-panel.overlay-left {
    left: 0;
    transform: translateX(-20%);
}

/* active/verify/google-reg → sağ panel solar çıkar, sol panel merkezlenir */
.auth-container.active .overlay-panel.overlay-right,
.auth-container.verify .overlay-panel.overlay-right,
.auth-container.google-reg .overlay-panel.overlay-right {
    transform: translateX(20%);
}

.auth-container.active .overlay-panel.overlay-left,
.auth-container.verify .overlay-panel.overlay-left,
.auth-container.google-reg .overlay-panel.overlay-left {
    transform: translateX(0);
}

/* ── Overlay logo ── */
.overlay-logo {
    width: 62px;
    height: 62px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 1.4rem;
    backdrop-filter: blur(6px);
}

.overlay-panel h2 {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.9rem;
    color: #fff;
}

.overlay-panel p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.6rem;
    max-width: 220px;
}

.btn-overlay {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.75);
    color: #fff;
    padding: 0.6rem 2rem;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.5px;
}

.btn-overlay:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
    transform: translateY(-2px);
}

/* ══════════════════════════════════════════════
   FORM HEADER & GENEL FORM STİLLERİ
   ══════════════════════════════════════════════ */
.auth-form-header {
    margin-bottom: 1.4rem;
}

.auth-form-header h1 {
    font-size: 1.55rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.3rem;
}

.auth-form-header p {
    font-size: 0.85rem;
    color: #64748b;
}

/* Social butonlar */
.auth-social-row {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.auth-social-btn,
a.auth-social-btn {
    flex: 1;
    height: 40px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-decoration: none;
}

.auth-social-btn:hover,
a.auth-social-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
    transform: translateY(-2px);
}

.auth-or {
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
    position: relative;
    margin-bottom: 1rem;
}

.auth-or::before,
.auth-or::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 28%;
    height: 1px;
    background: #e2e8f0;
}

.auth-or::before {
    left: 0;
}

.auth-or::after {
    right: 0;
}

/* Form grup */
.form-group {
    margin-bottom: 0.85rem;
    position: relative;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

/* Input wrapper */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.88rem;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s;
}

.form-control {
    width: 100%;
    padding: 0.62rem 0.75rem 0.62rem 2.2rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    color: #1e293b;
    font-family: 'Outfit', sans-serif;
    font-size: 0.875rem;
    transition: all 0.2s;
    outline: none;
}

.form-control:focus {
    background: #fff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-control:focus+.input-icon,
.form-control:focus~.input-icon {
    color: #2563eb;
}

.form-control::placeholder {
    color: #cbd5e1;
}

/* Submit butonu */
.btn-auth {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 11px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s;
    margin-top: 0.4rem;
}

.btn-auth:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Hata kutusu */
.alert-auth {
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.83rem;
}

/* Geri linki */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.9rem;
    font-size: 0.8rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-back:hover {
    color: #2563eb;
}

/* ══════════════════════════════════════════════
   VERIFY PANELİ — OTP KUTULARI
   ══════════════════════════════════════════════ */
.verify-email-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.83rem;
    color: #1e40af;
    word-break: break-all;
}

.verify-email-badge i {
    color: #2563eb;
    flex-shrink: 0;
}

.otp-wrapper {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.otp-input {
    width: 50px;
    height: 58px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    outline: none;
    transition: all 0.2s;
    caret-color: #2563eb;
}

.otp-input:focus {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.otp-input.filled {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

.resend-link {
    text-align: center;
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

.resend-link button {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0;
    transition: color 0.2s;
}

.resend-link button:hover {
    color: #1d4ed8;
}

/* ══════════════════════════════════════════════
   MOBİL (≤700px)
   ══════════════════════════════════════════════ */
.auth-mobile-tabs {
    display: none;
    width: 100%;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.auth-mobile-tab {
    flex: 1;
    text-align: center;
    padding: 0.7rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.auth-mobile-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

@media (max-width: 991px) {
    body.auth-page {
        overflow: auto;
        align-items: flex-start;
        padding: 1rem;
    }

    .auth-container {
        border-radius: 16px;
        margin: 0 auto;
        min-height: unset;
        width: 100% !important;
        max-width: 500px !important;
    }

    .auth-overlay-container {
        display: none;
    }

    .auth-mobile-tabs {
        display: flex;
    }

    .auth-panel {
        position: relative;
        width: 100%;
        height: auto;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: all !important;
        display: none;
    }

    #panel-login {
        display: flex;
    }

    .auth-container.active #panel-login {
        display: none;
    }

    .auth-container.active #panel-register {
        display: flex;
    }

    .auth-container.verify #panel-login,
    .auth-container.verify #panel-register {
        display: none;
    }

    .auth-container.verify #panel-verify {
        display: flex !important;
    }

    .auth-container.google-reg #panel-login,
    .auth-container.google-reg #panel-register,
    .auth-container.google-reg #panel-verify {
        display: none;
    }

    .auth-container.google-reg #panel-google-register {
        display: flex !important;
    }

    /* Panel 5: SMS OTP — mobil */
    .auth-container.sms-otp #panel-login,
    .auth-container.sms-otp #panel-register,
    .auth-container.sms-otp #panel-verify,
    .auth-container.sms-otp #panel-google-register {
        display: none;
    }

    .auth-container.sms-otp #panel-sms-otp {
        display: flex !important;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    /* Mobilde yatay taşmayı önlemek için padding ve sabit boyutları daraltıyoruz */
    .auth-panel {
        padding: 2rem 1.5rem;
    }

    .otp-wrapper {
        gap: 0.35rem;
    }

    .otp-input {
        width: 42px;
        height: 52px;
        font-size: 1.25rem;
    }

    .verify-email-badge {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        word-break: break-all;
    }

    /* iOS Safari: 16px altı inputlar zoom yapıyor, bunu önle */
    .form-control,
    .otp-input {
        font-size: 16px !important;
    }
}

@media (min-width: 992px) {
    .auth-mobile-tabs {
        display: none !important;
    }
}