/* ===========================================
   Login Page Styles - Bizim Anılarımız
   ✨ Ultra Premium Dark Romantic Theme
   =========================================== */

/* ===== CSS Değişkenleri ===== */
:root {
    /* Ana Renkler */
    --primary-pink: #ff6b9d;
    --primary-pink-light: #ff8fb3;
    --primary-pink-dark: #e84393;
    --accent-rose: #ff4081;
    --accent-coral: #ff7f7f;
    --accent-gold: #f9ca24;
    --accent-purple: #a29bfe;
    
    /* Arka Plan */
    --bg-dark: #060610;
    --bg-card: rgba(20, 12, 18, 0.92);
    --bg-card-desktop: rgba(255, 255, 255, 0.04);
    
    /* Metinler */
    --text-primary: #f5f5f7;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    /* Efektler */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 107, 157, 0.35);
    --glow-pink: rgba(255, 107, 157, 0.4);
    --glow-pink-strong: rgba(255, 107, 157, 0.6);
    --shadow-soft: 0 25px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(255, 107, 157, 0.15);
    
    /* Geçişler */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Reset ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Body ===== */
body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    color: var(--text-primary);
}

/* ===== Animated Mesh Gradient Background ===== */
.bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(255, 107, 157, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 80%, rgba(232, 67, 147, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(162, 155, 254, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 70% 30%, rgba(249, 202, 36, 0.04) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
    animation: meshShift 20s ease-in-out infinite;
}

@keyframes meshShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* ===== Star Particles (CSS Only) ===== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 80% 60%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 10% 80%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 30% 50%, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(2px 2px at 50% 90%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 70% 10%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 15% 45%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 85% 85%, rgba(255, 107, 157, 0.3), transparent),
        radial-gradient(1px 1px at 45% 35%, rgba(162, 155, 254, 0.25), transparent);
    z-index: 0;
    pointer-events: none;
    animation: starTwinkle 8s ease-in-out infinite alternate;
}

@keyframes starTwinkle {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* ===== Floating Orbs ===== */
.orb {
    display: none;
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.35;
    will-change: transform;
    transform: translateZ(0);
    pointer-events: none;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.3), transparent 70%);
    top: -120px;
    left: -100px;
}

.orb-2 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(232, 67, 147, 0.25), transparent 70%);
    bottom: -60px;
    right: -60px;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(162, 155, 254, 0.2), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ===== Floating Hearts Container ===== */
.hearts-container {
    display: none;
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.heart {
    position: absolute;
    bottom: -50px;
    opacity: 0;
    font-size: 18px;
    will-change: transform, opacity;
    animation: heartRise 14s ease-in infinite;
    filter: drop-shadow(0 0 8px rgba(255, 107, 157, 0.4));
}

@keyframes heartRise {
    0% {
        opacity: 0;
        transform: translateY(0) rotate(0deg) scale(0.5);
    }
    8% {
        opacity: 0.8;
    }
    85% {
        opacity: 0.15;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) rotate(360deg) scale(1.1);
    }
}

/* ===== Ana Container ===== */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    padding: 16px;
}

/* ===== Glass Card ===== */
.login-card {
    background: var(--bg-card);
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    padding: 40px 28px;
    box-shadow: 
        var(--shadow-soft),
        var(--shadow-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Üst dekoratif gradient çizgi */
.login-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-pink), var(--accent-purple), var(--primary-pink), transparent);
    border-radius: 2px;
    opacity: 0.7;
}

/* Shimmer efekti */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
    pointer-events: none;
}

/* ===== Header ===== */
.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.logo-hearts {
    font-size: 2.8rem;
    margin-bottom: 18px;
    display: inline-block;
    filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.5));
    position: relative;
}

/* Logo ışık halkası */
.logo-hearts::after {
    content: '';
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.15), transparent 70%);
    animation: logoGlow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes logoGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
}

.login-title {
    font-family: 'Camomile', 'Dancing Script', cursive;
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-rose), var(--accent-purple), var(--primary-pink-light));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-shadow: none;
    animation: gradientFlow 6s ease infinite;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* ===== Kullanıcı Seçici ===== */
.user-selector {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-bottom: 28px;
    perspective: 800px;
}

.user-selector.loading .user-card {
    opacity: 0.4;
    pointer-events: none;
}

.user-selector.hidden {
    display: none;
}

/* ===== Kullanıcı Kartı — 3D Premium ===== */
.user-card {
    flex: 1;
    max-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 2px solid rgba(255, 107, 157, 0.15);
    border-radius: 24px;
    cursor: pointer;
    transition: var(--transition-spring);
    position: relative;
    transform-style: preserve-3d;
    overflow: hidden;
}

.user-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* İç parlaklık overlay */
.user-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 107, 157, 0.12), transparent 65%);
    opacity: 0;
    transition: var(--transition-normal);
    border-radius: inherit;
    pointer-events: none;
}

/* Alt kenar gradient */
.user-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-pink), transparent);
    opacity: 0;
    transition: var(--transition-normal);
}

.user-card:hover::before,
.user-card:focus-within::before {
    opacity: 1;
}

.user-card:hover::after,
.user-card:focus-within::after {
    opacity: 0.8;
}

.user-card:hover,
.user-card:focus-within {
    transform: translateY(-8px) scale(1.04);
    border-color: rgba(255, 107, 157, 0.4);
    box-shadow: 
        0 20px 40px rgba(255, 107, 157, 0.15),
        0 0 30px rgba(255, 107, 157, 0.1);
}

.user-card.selected {
    background: linear-gradient(145deg, rgba(255, 107, 157, 0.15), rgba(232, 67, 147, 0.06));
    border-color: var(--primary-pink);
    box-shadow: 
        0 0 40px rgba(255, 107, 157, 0.25),
        0 0 80px rgba(255, 107, 157, 0.1),
        inset 0 0 30px rgba(255, 107, 157, 0.05);
    transform: translateY(-5px) scale(1.02);
}

.user-card.selected::after {
    opacity: 1;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-pink), var(--accent-purple), var(--primary-pink), transparent);
}

/* ===== Avatar ===== */
.user-avatar {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.12), rgba(162, 155, 254, 0.08));
    border-radius: 50%;
    border: 2px solid rgba(255, 107, 157, 0.2);
    transition: var(--transition-bounce);
    position: relative;
    z-index: 1;
}

.user-card:hover .user-avatar,
.user-card.selected .user-avatar {
    transform: scale(1.1);
    border-color: var(--primary-pink);
    box-shadow: 
        0 0 25px rgba(255, 107, 157, 0.4),
        0 0 50px rgba(255, 107, 157, 0.15);
}

.user-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    text-align: center;
    line-height: 1.3;
}

/* ===== Login Form ===== */
.login-form {
    display: none;
}

.login-form.active {
    display: block;
    animation: formReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes formReveal {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== Seçili Kullanıcı Bilgisi ===== */
.selected-user-info {
    text-align: center;
    margin-bottom: 32px;
}

.selected-avatar {
    width: 88px;
    height: 88px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.12), rgba(162, 155, 254, 0.08));
    border-radius: 50%;
    border: 3px solid var(--primary-pink);
    box-shadow: 
        0 0 30px rgba(255, 107, 157, 0.3),
        0 0 60px rgba(255, 107, 157, 0.1);
    animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(255, 107, 157, 0.3),
            0 0 60px rgba(255, 107, 157, 0.1);
    }
    50% {
        box-shadow: 
            0 0 40px rgba(255, 107, 157, 0.5),
            0 0 80px rgba(255, 107, 157, 0.2);
    }
}

.welcome-text {
    font-size: 1.4rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

/* ===== Input Group ===== */
.input-group {
    position: relative;
    margin-bottom: 22px;
}

.input-group input {
    width: 100%;
    padding: 20px 55px 20px 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 2px solid rgba(255, 107, 157, 0.15);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    outline: none;
    transition: var(--transition-normal);
    letter-spacing: 0.3px;
}

.input-group input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-group input:focus {
    border-color: var(--primary-pink);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 
        0 0 30px rgba(255, 107, 157, 0.15),
        0 0 60px rgba(255, 107, 157, 0.05),
        inset 0 0 20px rgba(255, 107, 157, 0.03);
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.5;
    pointer-events: none;
    transition: var(--transition-normal);
}

.input-group input:focus ~ .input-icon {
    opacity: 0.9;
    filter: drop-shadow(0 0 8px rgba(255, 107, 157, 0.5));
}

/* ===== Giriş Butonu — Ultra Premium ===== */
.login-btn {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-rose), var(--primary-pink-dark));
    background-size: 200% 200%;
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 30px rgba(255, 107, 157, 0.35),
        0 2px 8px rgba(255, 107, 157, 0.2);
    letter-spacing: 0.5px;
    animation: btnGradient 4s ease infinite;
}

@keyframes btnGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Shimmer wave efekti */
.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.15), 
        rgba(255, 255, 255, 0.25), 
        rgba(255, 255, 255, 0.15), 
        transparent
    );
    transition: left 0.6s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(255, 107, 157, 0.45),
        0 5px 15px rgba(255, 107, 157, 0.3),
        0 0 60px rgba(255, 107, 157, 0.15);
}

.login-btn:active {
    transform: translateY(-1px);
    box-shadow: 
        0 5px 20px rgba(255, 107, 157, 0.3);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.15);
}

/* ===== Geri Butonu ===== */
.back-btn-container {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.back-btn-container.active {
    display: block;
    animation: formReveal 0.3s ease-out;
}

.back-btn {
    padding: 12px 26px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-normal);
    letter-spacing: 0.3px;
}

.back-btn:hover {
    border-color: var(--primary-pink);
    color: var(--primary-pink);
    background: rgba(255, 107, 157, 0.06);
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.1);
}

/* ===== Hata Mesajı ===== */
.error-message {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 16px;
    text-align: center;
    min-height: 20px;
    transition: var(--transition-normal);
}

/* ===== Footer ===== */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

/* Gradient üst çizgi */
.login-footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 157, 0.3), transparent);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    letter-spacing: 0.3px;
}

.secret-link {
    cursor: default;
    user-select: none;
    transition: var(--transition-normal);
}

.secret-link:hover {
    filter: drop-shadow(0 0 10px rgba(255, 107, 157, 0.6));
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

/* Tablet ve üzeri (769px+) */
@media (min-width: 769px) {
    .login-wrapper {
        padding: 24px;
    }
    
    .login-card {
        background: var(--bg-card-desktop);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        padding: 52px 44px;
        border-radius: 36px;
        box-shadow:
            var(--shadow-soft),
            0 0 100px rgba(255, 107, 157, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }
    
    /* Shimmer animasyonu aktif */
    .login-card::before {
        animation: shimmer 10s infinite;
    }
    
    @keyframes shimmer {
        0%, 100% { left: -100%; }
        50% { left: 100%; }
    }
    
    .logo-hearts {
        font-size: 3.2rem;
        animation: heartbeat 2.5s ease-in-out infinite;
    }
    
    @keyframes heartbeat {
        0%, 100% { transform: scale(1); }
        15% { transform: scale(1.15); }
        30% { transform: scale(1); }
        45% { transform: scale(1.1); }
        60% { transform: scale(1); }
    }
    
    .login-title {
        font-size: 3rem;
    }
    
    .login-header {
        margin-bottom: 44px;
    }
    
    .user-selector {
        gap: 28px;
        margin-bottom: 36px;
    }
    
    .user-card {
        max-width: 170px;
        padding: 32px 22px;
        gap: 16px;
        border-radius: 28px;
    }
    
    .user-avatar {
        width: 78px;
        height: 78px;
        font-size: 3rem;
    }
    
    .user-name {
        font-size: 1.15rem;
    }
    
    .selected-avatar {
        width: 100px;
        height: 100px;
        font-size: 3.5rem;
    }
    
    .input-group input {
        padding: 22px 60px 22px 26px;
        font-size: 1.05rem;
        border-radius: 18px;
    }
    
    .login-btn {
        padding: 20px 32px;
        font-size: 1.15rem;
        border-radius: 18px;
    }
    
    /* Orb'ları göster */
    .orb {
        display: block;
        animation: orbFloat 30s ease-in-out infinite;
    }
    
    @keyframes orbFloat {
        0%, 100% { transform: translate(0, 0) scale(1); }
        25% { transform: translate(30px, -30px) scale(1.05); }
        50% { transform: translate(-20px, 20px) scale(0.95); }
        75% { transform: translate(20px, 30px) scale(1.02); }
    }
    
    .orb-3 {
        animation: none;
        transform: translate(-50%, -50%);
    }
    
    /* Kalpleri göster */
    .hearts-container {
        display: block;
    }
}

/* Küçük ekranlar (380px altı) */
@media (max-width: 380px) {
    .login-card {
        padding: 32px 18px;
        border-radius: 26px;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .user-card {
        padding: 20px 14px;
    }
    
    .user-avatar {
        width: 56px;
        height: 56px;
        font-size: 2.2rem;
    }

    .user-selector {
        gap: 12px;
    }
}

/* ===========================================
   ERİŞİLEBİLİRLİK
   =========================================== */

/* Azaltılmış hareket tercihi */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .orb,
    .hearts-container {
        display: none !important;
    }
}

/* Yüksek kontrast modu */
@media (prefers-contrast: high) {
    .login-card {
        border-width: 2px;
        border-color: var(--primary-pink);
    }
    
    .user-card {
        border-width: 3px;
    }
    
    .input-group input {
        border-width: 3px;
    }
}

/* Klavye odağı */
:focus-visible {
    outline: 2px solid var(--primary-pink);
    outline-offset: 3px;
}
