/* ================================
   GENEL YAPILANDIRMA
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Bahar Renk Paleti */
    --spring-pink: #FFE4E8;
    --soft-rose: #FFC4D0;
    --deep-rose: #FF9DB5;
    --lavender: #E6D5F5;
    --mint: #D5F5E3;
    --peach: #FFD6BA;
    --white: #FFFFFF;
    --text-dark: #5A4A5A;
    --shadow: rgba(255, 157, 181, 0.3);
    
    /* Animasyon Süreleri */
    --transition-fast: 0.3s;
    --transition-medium: 0.6s;
    --transition-slow: 1s;
}

body {
    font-family: 'Georgia', 'Segoe UI', serif;
    background: linear-gradient(135deg, var(--spring-pink) 0%, var(--lavender) 50%, var(--mint) 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
}

/* ================================
   ARKA PLAN FOTOĞRAFLARI
   ================================ */
.background-photos {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.background-photos.visible {
    opacity: 1;
}

.bg-photo {
    position: absolute;
    width: 180px;
    height: 180px;
    background: var(--white);
    padding: 10px;
    padding-bottom: 35px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    opacity: 0.7;
    transition: all 0.5s ease;
    filter: blur(0px);
}

.bg-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ================================
   EKRAN SİSTEMİ
   ================================ */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 10;
    padding: 2rem;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* ================================
   MÜZİK ÇALAR
   ================================ */
.music-player {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.music-toggle {
    background: var(--white);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--shadow);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px var(--shadow);
}

.music-icon {
    display: none;
}

.music-toggle.playing .music-icon.playing {
    display: block;
    animation: musicPulse 1s ease-in-out infinite;
}

.music-toggle:not(.playing) .music-icon.paused {
    display: block;
}

/* ================================
   1. HOŞ GELDİN EKRANI
   ================================ */
.welcome-content {
    text-align: center;
    animation: welcomeFadeIn 1.5s ease-out;
}

.welcome-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 4px 20px rgba(255, 157, 181, 0.5);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
    animation: titleFloat 3s ease-in-out infinite;
}

.flower-animation {
    font-size: 4rem;
    animation: flowerSpin 4s ease-in-out infinite;
    display: inline-block;
    margin: 2rem 0;
}

.welcome-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--white);
    opacity: 0.9;
    margin-bottom: 2rem;
    animation: subtitlePulse 2s ease-in-out infinite;
}

/* ================================
   TATLI BUTON (Genel)
   ================================ */
.sweet-button {
    background: linear-gradient(135deg, var(--white) 0%, #FFF5F7 100%);
    color: var(--deep-rose);
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(255, 157, 181, 0.4);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.sweet-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 157, 181, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.sweet-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 157, 181, 0.6);
}

.sweet-button:hover::before {
    width: 400px;
    height: 400px;
}

.sweet-button:active {
    transform: translateY(-1px);
}

.sweet-button span {
    position: relative;
    z-index: 1;
}

/* ================================
   2. SÖZLER EKRANI
   ================================ */
.quotes-container {
    width: 100%;
    max-width: 700px;
    text-align: center;
}

.quote-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(255, 157, 181, 0.3);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: quoteEntrance 0.8s ease-out;
}

.quote-box:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 25px 70px rgba(255, 157, 181, 0.4);
}

.quote-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    animation: iconBounce 2s ease-in-out infinite;
}

.quote-text {
    font-size: clamp(1.3rem, 4vw, 2rem);
    line-height: 1.8;
    color: var(--text-dark);
    font-style: italic;
    font-weight: 500;
    margin-bottom: 2rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.quote-hint {
    font-size: 1rem;
    color: var(--deep-rose);
    opacity: 0.8;
    animation: hintPulse 2s ease-in-out infinite;
}

/* ================================
   3. MEKTUP EKRANI
   ================================ */
.letter-container {
    width: 100%;
    max-width: 600px;
    position: relative;
}

.envelope {
    cursor: pointer;
    transition: all 0.6s ease;
    position: relative;
    animation: envelopeFloat 3s ease-in-out infinite;
}

.envelope-body {
    width: 300px;
    height: 200px;
    background: linear-gradient(135deg, #FFF5F7 0%, var(--white) 100%);
    border-radius: 10px;
    margin: 0 auto;
    box-shadow: 0 15px 50px rgba(255, 157, 181, 0.4);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--soft-rose);
}

.envelope-flap {
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-bottom: 100px solid var(--soft-rose);
    position: absolute;
    top: -97px;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: bottom;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2;
}

.envelope:hover .envelope-flap {
    transform: translateX(-50%) rotateX(180deg);
}

.envelope-heart {
    font-size: 4rem;
    animation: heartBeat 1.5s ease-in-out infinite;
}

.envelope-text {
    margin-top: 2rem;
    font-size: 1.5rem;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(255, 157, 181, 0.5);
    font-weight: 600;
    text-align: center;
    width: 100%;
}

.envelope.opened {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.letter-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    width: 100%;
    max-width: 600px;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 5;
}

.letter-content.visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.letter-paper {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 70px rgba(255, 157, 181, 0.4);
    max-height: 80vh;
    overflow-y: auto;
}

.letter-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--spring-pink);
}

.letter-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.letter-header h2 {
    font-size: 2rem;
    color: var(--deep-rose);
}

.letter-body {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-dark);
}

.letter-body p {
    margin-bottom: 1.5rem;
}

.letter-signature {
    text-align: right;
    font-style: italic;
    color: var(--deep-rose);
    margin-top: 2rem;
}

.letter-paper .sweet-button {
    margin-top: 2rem;
    width: 100%;
}

/* ================================
   4. FOTOĞRAFLAR EKRANI
   ================================ */
.photos-container {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    overflow-y: auto;
    max-height: 100vh;
    padding-bottom: 2rem;
}

.photos-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--white);
    text-shadow: 0 4px 20px rgba(255, 157, 181, 0.5);
    margin-top: 2rem;
    margin-bottom: 3rem;
    animation: titleFadeIn 1s ease-out;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.photo-item {
    background: var(--white);
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(255, 157, 181, 0.3);
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 0;
    animation: photoFallIn 0.8s ease-out forwards;
}

.photo-item:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 15px 50px rgba(255, 157, 181, 0.5);
}

.photo-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.photo-caption {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-style: italic;
}

.photos-footer {
    margin-top: 3rem;
}

.photos-footer p {
    font-size: 1.3rem;
    color: var(--white);
    font-style: italic;
    text-shadow: 0 2px 10px rgba(255, 157, 181, 0.4);
    margin-bottom: 1.5rem;
}

.floating-hearts {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.floating-heart {
    font-size: 2rem;
    display: inline-block;
    animation: floatHeart 3s ease-in-out infinite;
}

.floating-heart:nth-child(1) { animation-delay: 0s; }
.floating-heart:nth-child(2) { animation-delay: 0.5s; }
.floating-heart:nth-child(3) { animation-delay: 1s; }

/* ================================
   KONFETİ SİSTEMİ - YENİ VE YUMUŞAK
   ================================ */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.confetti {
    position: absolute;
    font-size: 1.8rem;
    pointer-events: none;
    animation: confettiFloat 4s ease-out forwards;
}

/* ================================
   SAYFA YÜKLENİYOR
   ================================ */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--spring-pink), var(--lavender));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    font-size: 4rem;
    animation: loaderSpin 2s linear infinite;
}

/* ================================
   ANIMASYONLAR
   ================================ */
@keyframes welcomeFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes flowerSpin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(10deg) scale(1.1); }
    75% { transform: rotate(-10deg) scale(1.1); }
}

@keyframes subtitlePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes musicPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes quoteEntrance {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(10deg); }
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes envelopeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.15); }
}

@keyframes titleFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes photoFallIn {
    from {
        opacity: 0;
        transform: translateY(-100px) rotate(45deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

@keyframes floatHeart {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* YENİ VE YUMUŞAK KONFETİ ANİMASYONU - Etrafa Saçılan */
@keyframes confettiFloat {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(0deg) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(var(--tx-start), var(--ty-start)) rotate(var(--r-start)) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx-end), var(--ty-end)) rotate(var(--r-end)) scale(0.3);
    }
}

@keyframes loaderSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ================================
   MOBİL OPTİMİZASYON
   ================================ */
@media (max-width: 768px) {
    .quote-box {
        padding: 2rem 1.5rem;
    }
    
    .quote-text {
        font-size: 1.2rem;
        min-height: 100px;
    }
    
    .envelope-body {
        width: 250px;
        height: 170px;
    }
    
    .envelope-flap {
        border-left-width: 125px;
        border-right-width: 125px;
        border-bottom-width: 85px;
        top: -82px;
    }
    
    .letter-paper {
        padding: 2rem 1.5rem;
        max-height: 70vh;
    }
    
    .letter-body {
        font-size: 1rem;
    }
    
    .photos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .photo-item img {
        height: 200px;
    }
    
    .music-player {
        top: 10px;
        right: 10px;
    }
    
    .music-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .bg-photo {
        width: 90px;
        height: 90px;
        padding: 5px;
        padding-bottom: 18px;
    }
}

@media (max-width: 480px) {
    .screen {
        padding: 1rem;
    }
    
    .sweet-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* ================================
   PERFORMANS İYİLEŞTİRMELERİ
   ================================ */
.sweet-button,
.quote-box,
.envelope,
.photo-item {
    will-change: transform;
}

/* Düşük performanslı cihazlar için animasyon azaltma */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
