/**
 * SunixGo - Giriş Sayfası Stilleri
 * Premium · Beyaz · Aurora (Haziran 2026 — v2 havalı yeniden tasarım)
 * NOT: JS bağımlılıkları korunmuştur (.input-wrapper, .form-group, .otp-input,
 * .error-message.show, .pin-input.filled, .btn-text, .btn-loading vb.)
 */

:root {
    --primary: #103595;
    --primary-dark: #0a2460;
    --primary-light: #2563eb;
    --primary-bright: #3b82f6;
    --accent: #22d3ee;
    --danger: #ef4444;

    --ink: #0c1838;
    --text-color: #1e293b;
    --text-muted: #6b7a99;
    --field-bg: #f3f6fc;
    --field-bg-focus: #ffffff;
    --border-color: #e6ecf7;

    --card-radius: 28px;
    --field-radius: 15px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body { min-height: 100%; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fbfcff;
    color: var(--text-color);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===================== Abstract Aurora Arka Plan ===================== */
.giris-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(900px 600px at 50% -5%, #eef4ff 0%, rgba(238,244,255,0) 60%),
        linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

/* Yumuşak, yavaşça akan aurora lekeleri */
.aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    will-change: transform;
    mix-blend-mode: multiply;
}

.aurora-1 {
    width: 560px;
    height: 560px;
    top: -200px;
    left: -160px;
    background: radial-gradient(circle at 35% 35%, rgba(59,130,246,0.55), rgba(16,53,149,0.0) 70%);
}

.aurora-2 {
    width: 480px;
    height: 480px;
    bottom: -200px;
    right: -150px;
    background: radial-gradient(circle at 50% 50%, rgba(34,211,238,0.45), rgba(34,211,238,0) 70%);
}

.aurora-3 {
    width: 420px;
    height: 420px;
    top: 40%;
    left: 55%;
    background: radial-gradient(circle at 50% 50%, rgba(99,102,241,0.30), rgba(99,102,241,0) 70%);
}

/* İnce nokta-grid dokusu (merkeze doğru solan) */
.bg-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(16,53,149,0.055) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 42%, #000 0%, transparent 78%);
    mask-image: radial-gradient(ellipse 65% 55% at 50% 42%, #000 0%, transparent 78%);
}

/* Çok hafif film grain dokusu — premium his */
.bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===================== Giriş Container ===================== */
.giris-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 408px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    animation: riseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Logo + glow halo */
.logo-area {
    width: 100%;
    padding: 0 30px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-glow {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-glow::before {
    content: '';
    position: absolute;
    inset: -32px -14px;
    background: radial-gradient(ellipse at center, rgba(59,130,246,0.26), rgba(59,130,246,0) 70%);
    filter: blur(8px);
    z-index: -1;
}

.logo {
    width: 100%;
    max-width: 260px;
    height: auto;
    filter: drop-shadow(0 10px 22px rgba(16,53,149,0.16));
}

/* ===================== Giriş Formu (Glass + dönen gradient kenarlık) ===================== */
.giris-form {
    position: relative;
    width: 100%;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.72));
    backdrop-filter: blur(26px) saturate(170%);
    -webkit-backdrop-filter: blur(26px) saturate(170%);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: var(--card-radius);
    padding: 34px 32px;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.9) inset,
        0 30px 70px -24px rgba(16,53,149,0.32),
        0 10px 30px -18px rgba(15,23,42,0.20);
}

.form-step {
    position: relative;
    z-index: 1;
    animation: fadeIn 0.4s ease;
}

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

/* Step Header (Geri butonu + Telefon) */
.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.btn-geri {
    background: #fff;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-geri:hover {
    background: var(--field-bg);
    color: var(--primary);
    border-color: #cdd9ee;
    transform: translateX(-2px);
}

.telefon-gosterim {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--ink);
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}

/* Telefon Input — büyük & ortalanmış */
.input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--field-bg);
    border: 1.5px solid transparent;
    border-radius: var(--field-radius);
    padding: 6px 16px;
    transition: all 0.22s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary-bright);
    background: var(--field-bg-focus);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.14), 0 10px 24px -12px rgba(16,53,149,0.28);
}

.input-prefix {
    flex: none;
    padding: 0;
    background: transparent;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.form-input {
    flex: 0 1 auto;
    width: 13ch;
    border: none;
    background: transparent;
    padding: 15px 0;
    font-size: 1.3rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--ink);
    outline: none;
    letter-spacing: 1px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    min-width: 0;
}

.form-input::placeholder {
    color: #9aa8c2;
    letter-spacing: 1px;
    font-weight: 500;
}

/* PIN / OTP Inputs */
.pin-container {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pin-input {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 1.55rem;
    font-weight: 600;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    background: var(--field-bg);
    color: var(--ink);
    outline: none;
    transition: all 0.18s ease;
    font-family: inherit;
}

.pin-input:focus {
    border-color: var(--primary-bright);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.14);
    transform: translateY(-2px);
}

.pin-input.filled {
    background: linear-gradient(135deg, var(--primary-bright), var(--primary));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 18px -7px rgba(16,53,149,0.55);
}

/* Error Message */
.error-message {
    display: none;
    background: #fff1f1;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-align: center;
}

.error-message.show {
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Giriş Butonu */
.btn-giris {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-bright) 0%, var(--primary) 100%);
    color: #fff;
    border: none;
    border-radius: var(--field-radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 14px 30px -12px rgba(16,53,149,0.7), 0 2px 6px -2px rgba(16,53,149,0.4);
    position: relative;
}

.btn-giris:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 40px -14px rgba(16,53,149,0.75), 0 4px 10px -2px rgba(16,53,149,0.4);
}

.btn-giris:active { transform: translateY(0) scale(0.99); }

.btn-giris:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-ok { transition: transform 0.24s ease; }
.btn-giris:hover .btn-ok { transform: translateX(4px); }

/* Spinner */
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Footer */
.footer-info {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    margin-top: 24px;
    opacity: 0.85;
}

/* ===================== SMS OTP Ekstra ===================== */
.otp-container {
    gap: 8px;
    flex-wrap: nowrap;
}

.otp-container .pin-input {
    width: 46px;
    height: 58px;
    font-size: 1.4rem;
    padding: 0;
    border-radius: 13px;
}

.otp-aciklama {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 18px 0;
    line-height: 1.45;
    text-align: center;
}

.btn-tekrar-gonder {
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    background: transparent;
    color: var(--primary-light);
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-tekrar-gonder:hover:not(:disabled) { text-decoration: underline; }

.btn-tekrar-gonder:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

/* ===================== Responsive ===================== */
@media (max-width: 420px) {
    body { padding: 16px; }

    .giris-container { max-width: 100%; }

    .logo-area { padding: 0 20px 24px; }

    .logo { max-width: 175px; }

    .giris-form {
        padding: 28px 22px;
        border-radius: 24px;
    }

    .step-baslik { font-size: 1.42rem; }

    .pin-input {
        width: 50px;
        height: 58px;
        font-size: 1.35rem;
    }

    .otp-container .pin-input {
        width: 42px;
        height: 54px;
        font-size: 1.2rem;
    }

    .aurora { filter: blur(55px); }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    .giris-container,
    .form-step {
        animation: none !important;
        transition: none !important;
    }
}
