/* ═══════════════════════════════════════════════════════════════════
   Sana Özel — Premium Romantic Light Theme
   ═══════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────────────────── */
:root {
    --bg-deep:       #fff0f3;
    --bg-card:       rgba(255, 255, 255, 0.55);
    --border-card:   rgba(255, 143, 163, 0.35);
    --pink-neon:     #ff4d6d;
    --pink-soft:     #e63970;
    --red-deep:      #c9184a;
    --gold-accent:   #ffd6a5;
    --text-primary:  #3d0814;
    --text-secondary: rgba(61, 8, 20, 0.55);
    --font-display:  'Playfair Display', Georgia, serif;
    --font-body:     'Inter', -apple-system, sans-serif;
    --glow-pink:     0 0 20px rgba(255, 77, 109, 0.35),
                     0 0 50px rgba(255, 77, 109, 0.12);
    --glow-pink-lg:  0 0 30px rgba(255, 77, 109, 0.4),
                     0 0 60px rgba(255, 77, 109, 0.15);
}

/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(-45deg, #fff0f3, #fce4ec, #ffd6e0, #ffe0eb, #fff0f3);
    background-size: 400% 400%;
    animation: bgShift 20s ease infinite;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

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

/* ── Arka Plan — Yavaş Hareket Eden Işık Huzmeleri ─────────────── */
.light-beams {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.beam {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.45;
    will-change: transform;
}

.beam--1 {
    background: radial-gradient(circle, rgba(255, 182, 193, 0.7) 0%, transparent 70%);
    top: -10%;
    left: -5%;
    width: 500px;
    height: 500px;
    animation: drift1 18s ease-in-out infinite alternate;
}

.beam--2 {
    background: radial-gradient(circle, rgba(255, 143, 163, 0.6) 0%, transparent 70%);
    bottom: -15%;
    right: -10%;
    width: 600px;
    height: 600px;
    animation: drift2 22s ease-in-out infinite alternate;
}

.beam--3 {
    background: radial-gradient(circle, rgba(252, 228, 236, 0.8) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    animation: drift3 15s ease-in-out infinite alternate;
}

.beam--4 {
    background: radial-gradient(circle, rgba(255, 214, 165, 0.5) 0%, transparent 70%);
    top: 20%;
    right: 20%;
    width: 250px;
    height: 250px;
    opacity: 0.35;
    animation: drift4 20s ease-in-out infinite alternate;
}

@keyframes drift1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(120px, 80px) scale(1.15); }
}
@keyframes drift2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-100px, -60px) scale(1.1); }
}
@keyframes drift3 {
    0%   { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-30%, -70%) scale(1.2); }
}
@keyframes drift4 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-60px, 40px) scale(1.3); }
}

/* ── Yüzen Parçacıklar (JS ile oluşturulur) ───────────────────── */
.floating-particles {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--pink-neon);
    opacity: 0;
    animation: float-up linear infinite;
}

@keyframes float-up {
    0%   { transform: translateY(0) scale(0); opacity: 0; }
    15%  { opacity: 0.6; }
    85%  { opacity: 0.3; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* ── Canvas (tam ekran, içeriğin üstünde, tıklama geçiren) ──── */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

/* ── Ana İçerik ────────────────────────────────────────────────── */
.content {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 20px;
}

/* ── Glassmorphism Kart ────────────────────────────────────────── */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 32px;
    padding: 60px 80px;
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    box-shadow:
        0 8px 32px rgba(201, 24, 74, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 0 60px rgba(255, 182, 193, 0.15);
    position: relative;
    overflow: hidden;
    max-width: 580px;
    width: 100%;
}

/* Kart parlama efekti */
.glass-card::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: conic-gradient(
        from 180deg,
        transparent 0%,
        rgba(255, 182, 193, 0.12) 25%,
        transparent 50%
    );
    animation: card-shimmer 12s linear infinite;
    pointer-events: none;
}

@keyframes card-shimmer {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Başlık (tıklanabilir) ──────────────────────────────────────── */
.title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 4rem);
    letter-spacing: 2px;
    color: var(--text-primary);
    text-shadow: var(--glow-pink);
    line-height: 1.2;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: text-shadow 0.3s ease, transform 0.2s ease;
    user-select: none;
}

.title:hover {
    text-shadow: var(--glow-pink-lg);
    transform: scale(1.03);
}

.title:active {
    transform: scale(0.97);
}

/* ── İsim ──────────────────────────────────────────────────────── */
.name {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    color: var(--pink-soft);
    margin-top: 16px;
    text-shadow: 0 0 14px rgba(255, 143, 163, 0.3);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* ── Kalp Alanı ────────────────────────────────────────────────── */
.heart-wrapper {
    margin-top: 40px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 6;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.heart-svg {
    width: clamp(100px, 20vw, 160px);
    height: auto;
    filter: drop-shadow(0 0 18px rgba(255, 77, 109, 0.6))
            drop-shadow(0 0 50px rgba(201, 24, 74, 0.3));
    animation: pulse 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    transition: transform 0.15s ease;
}

.heart-wrapper:hover .heart-svg {
    transform: scale(1.08);
}

.heart-wrapper:active .heart-svg {
    transform: scale(0.92);
}

.heart-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    animation: hint-fade 3s ease-in-out infinite;
}

@keyframes hint-fade {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

/* Nefes alan kalp */
@keyframes pulse {
    0%   { transform: scale(1); }
    15%  { transform: scale(1.18); }
    30%  { transform: scale(1); }
    45%  { transform: scale(1.12); }
    60%  { transform: scale(1); }
    100% { transform: scale(1); }
}

/* ── Fade-in Animasyonları ─────────────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    animation: reveal 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fade-in--delay {
    animation-delay: 0.35s;
}

.fade-in--delay2 {
    animation-delay: 0.7s;
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   Farklı Dillerde "Seni Seviyorum" — Süzülen Yazılar
   ═══════════════════════════════════════════════════════════════════ */
.love-languages {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.love-word {
    position: absolute;
    font-family: var(--font-display);
    font-style: italic;
    white-space: nowrap;
    color: var(--red-deep);
    pointer-events: none;
    animation: love-drift linear forwards;
    will-change: transform, opacity;
}

@keyframes love-drift {
    0%   { transform: translateX(0) rotate(0deg); opacity: 0; }
    8%   { opacity: 0.35; }
    85%  { opacity: 0.2; }
    100% { transform: translateX(-110vw) rotate(-8deg); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════
   Aşk Mektubu Modal
   ═══════════════════════════════════════════════════════════════════ */
.letter-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(63, 8, 20, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.letter-overlay.active {
    opacity: 1;
    visibility: visible;
}

.letter-card {
    position: relative;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 143, 163, 0.3);
    border-radius: 24px;
    padding: 48px 44px 40px;
    max-width: 520px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    box-shadow:
        0 20px 60px rgba(201, 24, 74, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.letter-overlay.active .letter-card {
    transform: translateY(0) scale(1);
}

.letter-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--red-deep);
    cursor: pointer;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.letter-close:hover {
    opacity: 1;
    transform: scale(1.15);
}

.letter-header {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    animation: letter-icon-pulse 2s ease-in-out infinite;
}

@keyframes letter-icon-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.1); }
}

.letter-body {
    font-family: var(--font-display);
    font-size: 1.15rem;
    line-height: 2;
    color: #3d0814;
    min-height: 120px;
    position: relative;
}

/* Daktilo imleci */
.letter-body::after {
    content: '|';
    color: var(--red-deep);
    font-weight: 300;
    animation: blink-cursor 0.7s step-end infinite;
    margin-left: 2px;
}

.letter-body.done::after {
    display: none;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}

.letter-signature {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--pink-soft);
    text-align: right;
    margin-top: 24px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.letter-signature.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════
   Fare Takipli Kalpler
   ═══════════════════════════════════════════════════════════════════ */
.trail-heart {
    position: fixed;
    pointer-events: none;
    z-index: 9;
    opacity: 1;
    animation: trail-float 1.2s ease-out forwards;
    user-select: none;
    filter: drop-shadow(0 0 4px rgba(255, 77, 109, 0.4));
}

@keyframes trail-float {
    0% {
        opacity: 0.9;
        transform: translateY(0) translateX(0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) translateX(var(--drift-x, 0px)) scale(0.3) rotate(20deg);
    }
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .glass-card {
        padding: 40px 28px;
        border-radius: 24px;
    }

    .heart-hint {
        font-size: 0.75rem;
    }

    .letter-card {
        padding: 36px 24px 32px;
    }

    .letter-body {
        font-size: 1rem;
    }
}

@media (max-width: 380px) {
    .glass-card {
        padding: 32px 18px;
    }
}
