/* =====================================================
   PAPA - Login / Register
   ===================================================== */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    width: 100%;
}

body.auth-body {
    background: #262338;
    color: #f3f0ff;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #262338; }
::-webkit-scrollbar-thumb {
    background: #3d3858;
    border-radius: 5px;
    border: 2px solid #262338;
}
::-webkit-scrollbar-thumb:hover { background: #47416a; }

::selection { background: #8b5cf655; color: #fff; }

/* =====================================================
   TOP BAR
   ===================================================== */
.auth-bar {
    width: 100%;
    height: 68px;
    background: #262338;
    border-bottom: 1px solid #3d3858;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    transition: box-shadow .25s ease, background .25s ease;
}

.auth-bar.scrolled {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    background: #2a2744;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.auth-logo img {
    display: block;
    width: 120px;
    height: 42px;
    object-fit: contain;
    object-position: left center;
    transition: transform .25s;
}

.auth-logo:hover img { transform: scale(1.04); }

.auth-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Dil */
.auth-lang { position: relative; }

.auth-lang-toggle {
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: #2e2b48;
    border: 1px solid #3d3858;
    border-radius: 8px;
    color: #eee9ff;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.auth-lang-toggle:hover {
    background: #332f52;
    border-color: #7a68ab;
}

.auth-lang-toggle img {
    width: 20px;
    height: auto;
    border-radius: 3px;
    display: block;
}

.auth-lang-toggle i {
    width: 14px;
    height: 14px;
    transition: transform .25s;
}

.auth-lang.open .auth-lang-toggle i { transform: rotate(180deg); }

.auth-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: #2e2b48;
    border: 1px solid #3d3858;
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 100;
}

.auth-lang.open .auth-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.auth-lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    color: #e7e2ff;
    font-size: 13px;
    text-decoration: none;
    transition: background .15s;
}

.auth-lang-item:hover { background: #3d3858; }
.auth-lang-item.active { background: #3d3858; color: #fff; }
.auth-lang-item img {
    width: 20px;
    height: auto;
    border-radius: 3px;
    display: block;
    flex-shrink: 0;
}
.auth-lang-item i {
    margin-left: auto;
    width: 15px;
    height: 15px;
    color: #a78bfa;
}

/* =====================================================
   WRAP
   ===================================================== */
.auth-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #2e2b48;
    border: 1px solid #3d3858;
    border-radius: 20px;
    padding: 36px 32px 30px;
    position: relative;
    overflow: hidden;
    animation: authIn .45s ease backwards;
}

.auth-card.wide { max-width: 460px; }

@keyframes authIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #a78bfa, #8b5cf6, #a78bfa, transparent);
    opacity: .85;
    filter: blur(.3px);
}

.auth-card::after {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, .25), transparent 65%);
    pointer-events: none;
}

/* ===== Head ===== */
.auth-head {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 14px;
}

.auth-head::after {
    content: '';
    position: absolute;
    bottom: -160px;
    left: -100px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, .12), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

/* ===== Logo Alanı ===== */
.auth-head-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 110px;
    margin: 0 auto 26px;
    padding: 18px 24px;
    border-radius: 26px;
    background:
        radial-gradient(ellipse at top, rgba(139, 92, 246, .18), transparent 65%),
        linear-gradient(145deg, #2a2744 0%, #221f34 100%);
    border: 1px solid transparent;
    background-clip: padding-box;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, .45),
        0 0 0 1px rgba(139, 92, 246, .15),
        inset 0 1px 0 rgba(255, 255, 255, .06),
        inset 0 -20px 40px rgba(124, 58, 237, .08);
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s;
    isolation: isolate;
}

/* Gradient border efekti */
.auth-head-logo::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 26px;
    padding: 1px;
    background: linear-gradient(145deg,
        rgba(167, 139, 250, .55) 0%,
        rgba(139, 92, 246, .15) 40%,
        rgba(59, 130, 246, .15) 70%,
        rgba(139, 92, 246, .45) 100%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 3;
}

/* İçte parlayan ring */
.auth-head-logo::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 20px;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, .10), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.auth-head-logo img {
    display: block;
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 62px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter:
        drop-shadow(0 4px 14px rgba(139, 92, 246, .55))
        drop-shadow(0 0 24px rgba(167, 139, 250, .35));
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), filter .35s;
}

.auth-head-logo:hover {
    transform: translateY(-2px);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, .5),
        0 0 0 1px rgba(139, 92, 246, .28),
        inset 0 1px 0 rgba(255, 255, 255, .08),
        inset 0 -20px 40px rgba(124, 58, 237, .14);
}

.auth-head-logo:hover img {
    transform: scale(1.06);
    filter:
        drop-shadow(0 6px 18px rgba(139, 92, 246, .75))
        drop-shadow(0 0 32px rgba(167, 139, 250, .5));
}

.auth-head-logo-glow {
    position: absolute;
    inset: -40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, .5), transparent 62%);
    filter: blur(32px);
    z-index: -1;
    pointer-events: none;
    animation: authLogoGlow 4s ease-in-out infinite;
}

@keyframes authLogoGlow {
    0%, 100% { opacity: .55; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.12); }
}

.auth-head h1 {
    margin: 0 0 8px;
    font-size: 23px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -.4px;
    line-height: 1.2;
}

.auth-head p {
    margin: 0;
    font-size: 13px;
    color: #a99cc9;
    line-height: 1.5;
}

/* ===== Form ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-field label {
    font-size: 12px;
    font-weight: 500;
    color: #c5c0d6;
    letter-spacing: .3px;
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input > svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #8a84a8;
    pointer-events: none;
    transition: color .2s;
    stroke-width: 1.8;
}

.auth-input input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 44px;
    background: #262338;
    border: 1.5px solid #3d3858;
    border-radius: 11px;
    outline: none;
    color: #fff;
    font: inherit;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.auth-input input::placeholder { color: #7a7494; }

.auth-input input:hover {
    border-color: #524a7a;
    background: #2a2744;
}

.auth-input input:focus {
    border-color: #8b5cf6;
    background: #2a2744;
    box-shadow: 0 0 0 4px #8b5cf622;
}

.auth-input:focus-within > svg { color: #a78bfa; }

.auth-eye {
    position: absolute;
    right: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #8a84a8;
    cursor: pointer;
    transition: color .2s, background .2s;
}

.auth-eye:hover { background: #3d3858; color: #c4b5fd; }
.auth-eye.active { color: #a78bfa; }
.auth-eye svg { width: 17px; height: 17px; stroke-width: 1.8; }

/* ===== Captcha ===== */
.auth-captcha {
    display: flex;
    justify-content: center;
    padding: 4px 0;
    min-height: 78px;
    align-items: center;
}

.auth-captcha .g-recaptcha {
    transform-origin: center;
}

/* ===== Buton ===== */
.auth-btn {
    height: 48px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    border: none;
    border-radius: 11px;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .22s;
    box-shadow: 0 10px 26px #8b5cf640;
    position: relative;
    overflow: hidden;
    margin-top: 4px;
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px #8b5cf655;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.auth-btn:disabled { opacity: .7; cursor: not-allowed; }
.auth-btn svg { width: 17px; height: 17px; }

.auth-btn-content,
.auth-btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.auth-btn-loader {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
}

.auth-btn.loading .auth-btn-content { opacity: 0; }
.auth-btn.loading .auth-btn-loader  { display: inline-flex; }

.auth-spin {
    width: 17px;
    height: 17px;
    border: 2px solid #ffffff33;
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin .7s linear infinite;
    display: inline-block;
}

@keyframes authSpin { to { transform: rotate(360deg); } }

/* ===== Alt link ===== */
.auth-foot {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #a99cc9;
    position: relative;
    z-index: 1;
}

.auth-foot a {
    color: #a78bfa;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: color .18s;
}

.auth-foot a:hover { color: #c4b5fd; }

/* ===== Mesajlar ===== */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 16px;
    animation: authIn .35s ease backwards;
}

.auth-alert svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; }

.auth-alert.error {
    background: #ef44441f;
    border: 1px solid #ef44444d;
    color: #fca5a5;
}

.auth-alert.success {
    background: #22c55e1f;
    border: 1px solid #22c55e4d;
    color: #86efac;
}

/* ===== Şifre gücü ===== */
.auth-strength {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.auth-strength-bar {
    flex: 1;
    height: 4px;
    background: #3d3858;
    border-radius: 2px;
    transition: background .3s;
}

.auth-strength-bar.weak   { background: #ef4444; }
.auth-strength-bar.medium { background: #f59e0b; }
.auth-strength-bar.strong { background: #22c55e; }

/* ===== Alt yazı ===== */
.auth-terms {
    font-size: 11px;
    color: #7a7494;
    text-align: center;
    line-height: 1.5;
    margin-top: 18px;
    position: relative;
    z-index: 1;
}

.auth-terms a {
    color: #a78bfa;
    text-decoration: none;
}
.auth-terms a:hover { text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .auth-bar { padding: 0 16px; height: 62px; }
    .auth-logo img { width: 100px; height: 36px; }

    .auth-wrap { padding: 20px 14px 30px; }
    .auth-card { padding: 28px 22px 24px; border-radius: 16px; }
    .auth-head h1 { font-size: 20px; }
    .auth-head-logo { width: 170px; height: 76px; padding: 12px 16px; }
    .auth-head-logo img { max-height: 48px; }

    .auth-captcha .g-recaptcha { transform: scale(.9); }
}

/* =====================================================
   LOGIN İYİLEŞTİRMELERİ
   ===================================================== */

/* Kart içi dekoratif ışıltı daireleri */
.auth-card-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(40px);
}

.auth-card-orb-1 {
    top: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, .28), transparent 65%);
    animation: authOrb 6s ease-in-out infinite;
}

.auth-card-orb-2 {
    bottom: -80px;
    right: -80px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(59, 130, 246, .18), transparent 65%);
    animation: authOrb 8s ease-in-out infinite reverse;
}

@keyframes authOrb {
    0%, 100% { opacity: .55; transform: scale(1) translate(0, 0); }
    50%      { opacity: .9;  transform: scale(1.15) translate(10px, -10px); }
}

/* İçerik katmanı — orbların üstünde */
.auth-head,
.auth-form,
.auth-foot,
#authAlert,
.auth-trust { position: relative; z-index: 2; }

/* Alt güven satırı */
.auth-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #3d3858;
    font-size: 10.5px;
    color: #7a7494;
    flex-wrap: wrap;
}

.auth-trust span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: .3px;
    text-transform: uppercase;
    font-weight: 500;
}

.auth-trust svg {
    width: 12px;
    height: 12px;
    color: #a78bfa;
    stroke-width: 2;
}

.auth-trust-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #57517a;
    flex-shrink: 0;
}

/* Kart içi focus halkası (in) */
.auth-card:focus-within {
    border-color: #4d4770;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, .35),
        0 0 0 1px #8b5cf622;
    transition: border-color .3s, box-shadow .3s;
}

/* Input autofill rengi (Chrome) */
.auth-input input:-webkit-autofill,
.auth-input input:-webkit-autofill:hover,
.auth-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #2a2744 inset;
    transition: background-color 5000s ease-in-out 0s;
    border-color: #524a7a;
}