/* ═══════════════════════════════════════════════════════════
   🌟 YILDIZLARA YAZILMIŞ ANILAR - Mobile-First Romantik Tema
   ═══════════════════════════════════════════════════════════ */

:root {
    /* Gece Gökyüzü Renkleri */
    --night-deep: #0a0a1a;
    --night-blue: #0d1b2a;
    --night-purple: #1a1033;
    --twilight: #2d1b4e;
    
    /* Romantik Vurgular */
    --rose-soft: #ff6b9d;
    --rose-glow: #ff8fab;
    --rose-light: #ffc2d4;
    --gold-star: #ffd700;
    --gold-soft: #ffecb3;
    
    /* Yıldız Renkleri */
    --star-white: #ffffff;
    --star-blue: #a0d2ff;
    --star-pink: #ffb3d9;
    
    /* Tipografi */
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Quicksand', sans-serif;
    
    /* Mobile-First Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    
    /* Safe Area for notched phones */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
    height: -webkit-fill-available;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(
        135deg,
        var(--night-deep) 0%,
        var(--night-blue) 25%,
        var(--night-purple) 50%,
        var(--twilight) 75%,
        var(--night-purple) 100%
    );
    background-size: 400% 400%;
    background-attachment: fixed;
    animation: gradientShift 15s ease infinite;
    color: var(--star-white);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
    
    /* Prevent pull-to-refresh on mobile */
    overscroll-behavior-y: contain;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Touch-friendly tap targets (minimum 44px) */
button, input, a {
    min-height: 44px;
}

/* ═══════════════════════════════════════════════════════════
   YILDIZLI ARKA PLAN CANVAS - Mobile Optimized
   ═══════════════════════════════════════════════════════════ */

#starCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    /* GPU acceleration for mobile */
    transform: translateZ(0);
    will-change: transform;
}

/* ═══════════════════════════════════════════════════════════
   KALP PARÇACİKLARI - Mobile Optimized
   ═══════════════════════════════════════════════════════════ */

#hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    /* GPU acceleration */
    transform: translateZ(0);
}

.floating-heart {
    position: absolute;
    font-size: 1.2rem;
    opacity: 0;
    animation: floatHeart 8s ease-in-out infinite;
    color: var(--rose-soft);
    text-shadow: 0 0 8px var(--rose-glow);
    /* GPU acceleration */
    will-change: transform, opacity;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) rotate(360deg) scale(1);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════════════════════
   GİRİŞ SAYFASI - Mobile-First
   ═══════════════════════════════════════════════════════════ */

.login-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

.glow-effect {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(255, 107, 157, 0.25) 0%,
        rgba(255, 107, 157, 0.1) 30%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(30px);
    animation: glowPulse 4s ease-in-out infinite;
    z-index: -1;
    /* GPU acceleration */
    transform: translateZ(0);
}

@keyframes glowPulse {
    0%, 100% {
        transform: translateZ(0) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translateZ(0) scale(1.2);
        opacity: 0.8;
    }
}

.login-box {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    width: 100%;
    max-width: 340px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 80px rgba(255, 107, 157, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: boxAppear 0.8s ease-out;
    /* GPU acceleration */
    transform: translateZ(0);
}

@keyframes boxAppear {
    from {
        opacity: 0;
        transform: translateZ(0) translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateZ(0) translateY(0) scale(1);
    }
}

/* Shimmer efekti - mobile için simplified */
.login-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.02) 50%,
        transparent 60%
    );
    animation: shimmer 10s linear infinite;
    /* GPU acceleration */
    will-change: transform;
}

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

/* ═══════════════════════════════════════════════════════════
   KALP İKONU - Mobile-First
   ═══════════════════════════════════════════════════════════ */

.heart-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        var(--rose-soft) 0%,
        var(--rose-glow) 100%
    );
    border-radius: 50%;
    box-shadow: 
        0 8px 25px rgba(255, 107, 157, 0.4),
        0 0 50px rgba(255, 107, 157, 0.2);
    animation: heartBeat 2s ease-in-out infinite;
    /* GPU acceleration */
    transform: translateZ(0);
    will-change: transform;
}

.heart-icon svg {
    width: 35px;
    height: 35px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes heartBeat {
    0%, 100% {
        transform: translateZ(0) scale(1);
    }
    14% {
        transform: translateZ(0) scale(1.1);
    }
    28% {
        transform: translateZ(0) scale(1);
    }
    42% {
        transform: translateZ(0) scale(1.1);
    }
    70% {
        transform: translateZ(0) scale(1);
    }
}

/* ═══════════════════════════════════════════════════════════
   TİPOGRAFİ - Mobile-First
   ═══════════════════════════════════════════════════════════ */

.title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    margin-bottom: 0.2rem;
    background: linear-gradient(
        135deg,
        var(--star-white) 0%,
        var(--rose-light) 50%,
        var(--gold-soft) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite;
    line-height: 1.2;
}

@keyframes titleGlow {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(255, 107, 157, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(255, 107, 157, 0.5));
    }
}

.subtitle {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    font-style: italic;
    color: var(--rose-glow);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 0 25px rgba(255, 143, 171, 0.5);
    line-height: 1.2;
}

/* ═══════════════════════════════════════════════════════════
   FORM STİLLERİ - Mobile-First & Touch-Friendly
   ═══════════════════════════════════════════════════════════ */

.login-form {
    position: relative;
    z-index: 1;
}

.input-wrapper {
    position: relative;
    margin-bottom: var(--spacing-md);
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1.2rem;
    padding-right: 2.8rem;
    font-family: var(--font-body);
    font-size: 16px; /* Prevents zoom on iOS */
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--star-white);
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    /* Touch-friendly height */
    min-height: 52px;
    /* Remove iOS styling */
    -webkit-appearance: none;
    appearance: none;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.input-wrapper input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--rose-soft);
    box-shadow: 
        0 0 20px rgba(255, 107, 157, 0.3),
        inset 0 0 15px rgba(255, 107, 157, 0.1);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--rose-soft), var(--gold-star));
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.input-wrapper input:focus ~ .input-border {
    width: 70%;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0.7;
    animation: sparkle 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.6;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.15);
    }
}

/* ═══════════════════════════════════════════════════════════
   BUTON - Mobile-First & Touch-Friendly
   ═══════════════════════════════════════════════════════════ */

.submit-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: white;
    background: linear-gradient(
        135deg,
        var(--rose-soft) 0%,
        var(--rose-glow) 50%,
        var(--rose-soft) 100%
    );
    background-size: 200% 200%;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 25px rgba(255, 107, 157, 0.35),
        0 0 0 0 rgba(255, 107, 157, 0.5);
    /* Touch-friendly height */
    min-height: 52px;
    /* Remove iOS styling */
    -webkit-appearance: none;
    appearance: none;
    /* GPU acceleration */
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

.submit-btn:active {
    background-position: 100% 0;
    transform: translateZ(0) scale(0.98);
    box-shadow: 
        0 4px 15px rgba(255, 107, 157, 0.4),
        0 0 20px rgba(255, 107, 157, 0.2);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-hearts {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
}

/* Ripple efekti */
.submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.submit-btn:active::after {
    width: 250px;
    height: 250px;
    opacity: 0;
}

/* ═══════════════════════════════════════════════════════════
   HATA MESAJI - Mobile
   ═══════════════════════════════════════════════════════════ */

.error-message {
    margin-top: var(--spacing-sm);
    font-size: 0.85rem;
    color: #ff6b6b;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-height: 1.3rem;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* ═══════════════════════════════════════════════════════════
   İPUCU METNİ - Mobile
   ═══════════════════════════════════════════════════════════ */

.hint-text {
    margin-top: var(--spacing-md);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.hint-text .star {
    font-style: normal;
    animation: twinkle 1.5s ease-in-out infinite;
}

.hint-text .star:last-child {
    animation-delay: 0.75s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ═══════════════════════════════════════════════════════════
   FLOATING YILDIZLAR - Mobile Optimized
   ═══════════════════════════════════════════════════════════ */

.floating-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.float-star {
    position: absolute;
    left: var(--x);
    top: var(--y);
    font-size: 1.2rem;
    color: var(--gold-star);
    text-shadow: 0 0 15px var(--gold-star);
    animation: floatStar 6s ease-in-out infinite;
    animation-delay: var(--delay);
    /* GPU acceleration */
    will-change: transform, opacity;
}

@keyframes floatStar {
    0%, 100% {
        transform: translateY(0) rotate(0deg) translateZ(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-15px) rotate(180deg) translateZ(0);
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════════════════════
   BAŞARILI GİRİŞ ANİMASYONU
   ═══════════════════════════════════════════════════════════ */

.login-box.success {
    animation: successPulse 0.8s ease forwards;
}

@keyframes successPulse {
    0% {
        transform: translateZ(0) scale(1);
        box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.3),
            0 0 80px rgba(255, 107, 157, 0.1);
    }
    50% {
        transform: translateZ(0) scale(1.03);
        box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.3),
            0 0 120px rgba(255, 107, 157, 0.4),
            0 0 160px rgba(255, 215, 0, 0.2);
    }
    100% {
        transform: translateZ(0) scale(1);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════════════════════
   TABLET & DESKTOP ENHANCEMENTs (min-width: 768px)
   Mobile-first: Büyük ekranlar için eklentiler
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
    .login-box {
        padding: 2.5rem 2rem;
        max-width: 400px;
        border-radius: 28px;
    }
    
    .title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.7rem;
    }
    
    .heart-icon {
        width: 80px;
        height: 80px;
    }
    
    .heart-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .float-star {
        font-size: 1.5rem;
    }
    
    .glow-effect {
        width: 300px;
        height: 300px;
    }
    
    /* Hover effects for non-touch devices */
    @media (hover: hover) {
        .submit-btn:hover {
            background-position: 100% 0;
            transform: translateZ(0) translateY(-2px);
            box-shadow: 
                0 12px 35px rgba(255, 107, 157, 0.4),
                0 0 30px rgba(255, 107, 157, 0.3);
        }
        
        .submit-btn:hover .btn-hearts {
            animation: heartsJump 0.5s ease infinite;
        }
    }
    
    @keyframes heartsJump {
        0%, 100% { transform: translateY(-50%); }
        50% { transform: translateY(-60%); }
    }
}

/* ═══════════════════════════════════════════════════════════
   KÜÇÜK TELEFONLAR (max-width: 360px)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 360px) {
    .login-box {
        padding: 1.5rem 1.2rem;
        border-radius: 20px;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1.25rem;
    }
    
    .heart-icon {
        width: 60px;
        height: 60px;
    }
    
    .heart-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .input-wrapper input {
        padding: 0.9rem 1rem;
        padding-right: 2.5rem;
        min-height: 48px;
    }
    
    .submit-btn {
        min-height: 48px;
        padding: 0.9rem 1.2rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   LANDSCAPE MODE - Yatay telefon
   ═══════════════════════════════════════════════════════════ */

@media (max-height: 500px) and (orientation: landscape) {
    .login-container {
        padding: var(--spacing-xs);
    }
    
    .login-box {
        padding: 1.2rem 1.5rem;
        max-width: 400px;
    }
    
    .heart-icon {
        width: 50px;
        height: 50px;
        margin-bottom: var(--spacing-sm);
    }
    
    .heart-icon svg {
        width: 25px;
        height: 25px;
    }
    
    .title {
        font-size: 1.4rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hint-text {
        margin-top: var(--spacing-sm);
    }
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE / REDUCED MOTION
   ═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   GALERİ SAYFASI (Sonraki adım için placeholder)
   ═══════════════════════════════════════════════════════════ */

.gallery-page {
    overflow-y: auto;
    overflow-x: hidden;
}