/* ==========================================================================
   Pınar's Birthday Website - Romantic & Nostalgic Design
   ========================================================================== */

/* CSS Variables */
:root {
    --color-cream: #fdf8f3;
    --color-blush: #f8e1e4;
    --color-rose: #e8a0a0;
    --color-dusty-rose: #c48b8b;
    --color-burgundy: #8b4557;
    --color-deep-burgundy: #5c2e3e;
    --color-gold: #c9a227;
    --color-gold-light: #e8d5a3;
    --color-sepia: #704214;
    --color-warm-brown: #8b6914;
    
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Cormorant Garamond', Georgia, serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 4px 20px rgba(139, 69, 87, 0.15);
    --shadow-lifted: 0 12px 40px rgba(139, 69, 87, 0.25);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-deep-burgundy);
    background: var(--color-cream);
    overflow-x: hidden;
}

/* ==========================================================================
   Opening Animation Overlay
   ========================================================================== */

#opening-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-blush) 0%, var(--color-rose) 50%, var(--color-dusty-rose) 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.opening-content {
    text-align: center;
    animation: scaleIn 0.8s ease-out;
}

.flower-burst {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
}

.flower-burst .petal {
    position: absolute;
    font-size: 2.5rem;
    animation: flowerBurst 2s ease-out forwards;
    opacity: 0;
}

.flower-burst .petal:nth-child(1) { animation-delay: 0.1s; --angle: 0deg; --distance: 100px; }
.flower-burst .petal:nth-child(2) { animation-delay: 0.2s; --angle: 45deg; --distance: 90px; }
.flower-burst .petal:nth-child(3) { animation-delay: 0.3s; --angle: 90deg; --distance: 100px; }
.flower-burst .petal:nth-child(4) { animation-delay: 0.4s; --angle: 135deg; --distance: 85px; }
.flower-burst .petal:nth-child(5) { animation-delay: 0.5s; --angle: 180deg; --distance: 100px; }
.flower-burst .petal:nth-child(6) { animation-delay: 0.6s; --angle: 225deg; --distance: 95px; }
.flower-burst .petal:nth-child(7) { animation-delay: 0.7s; --angle: 270deg; --distance: 100px; }
.flower-burst .petal:nth-child(8) { animation-delay: 0.8s; --angle: 315deg; --distance: 90px; }

@keyframes flowerBurst {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translateY(0) scale(0);
        opacity: 0;
        top: 50%;
        left: 50%;
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--distance))) scale(1.2);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--distance) * 0.8)) scale(1);
        top: 50%;
        left: 50%;
    }
}

.opening-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-deep-burgundy);
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    animation: titleReveal 1s ease-out 0.5s both;
}

.opening-subtitle {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 300;
    font-style: italic;
    color: var(--color-burgundy);
    animation: titleReveal 1s ease-out 0.8s both;
}

.heart-beat {
    font-size: 3rem;
    margin-top: 30px;
    animation: heartBeat 1s ease-in-out infinite;
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.click-to-start {
    margin-top: 30px;
    font-size: 1.1rem;
    color: var(--color-burgundy);
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.5s forwards;
    cursor: pointer;
}

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

#opening-overlay.clicked {
    animation: fadeOutOverlay 1s ease-out forwards;
}

@keyframes fadeOutOverlay {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* ==========================================================================
   Floating Flower Petals
   ========================================================================== */

#flower-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.floating-petal {
    position: absolute;
    font-size: 1.5rem;
    animation: floatDown linear forwards;
    opacity: 0.8;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

@keyframes floatDown {
    0% {
        transform: translateY(-50px) rotate(0deg) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) translateX(var(--drift));
        opacity: 0;
    }
}

/* ==========================================================================
   Main Content
   ========================================================================== */

#main-content {
    opacity: 0;
    transition: opacity 1s ease-out;
}

#main-content.visible {
    opacity: 1;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: 
        radial-gradient(ellipse at top, var(--color-blush) 0%, transparent 70%),
        radial-gradient(ellipse at bottom, var(--color-gold-light) 0%, transparent 50%),
        var(--color-cream);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e8a0a0' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-flower {
    font-size: 3rem;
    display: inline-block;
    animation: gentleBounce 3s ease-in-out infinite;
}

.hero-flower:last-child {
    animation-delay: 0.5s;
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    color: var(--color-deep-burgundy);
    margin: 20px 0;
    letter-spacing: 0.02em;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-style: italic;
    color: var(--color-burgundy);
    font-weight: 300;
}

/* ==========================================================================
   Love Letter Section
   ========================================================================== */

.love-letter {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-blush) 100%);
}

.letter-card {
    background: linear-gradient(135deg, #fffef9 0%, #fdf8f3 100%);
    border: 1px solid var(--color-gold-light);
    border-radius: 4px;
    padding: 60px 50px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 
        var(--shadow-soft),
        inset 0 0 100px rgba(201, 162, 39, 0.05);
    position: relative;
    transform: rotate(-1deg);
    transition: var(--transition-smooth);
}

.letter-card:hover {
    transform: rotate(0deg);
    box-shadow: var(--shadow-lifted);
}

.letter-card::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid var(--color-gold-light);
    border-radius: 2px;
    pointer-events: none;
}

.letter-header {
    text-align: center;
    margin-bottom: 30px;
}

.letter-header span {
    font-size: 3rem;
    animation: letterFloat 4s ease-in-out infinite;
}

@keyframes letterFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.letter-card h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--color-deep-burgundy);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.letter-card h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    margin: 15px auto 0;
}

.letter-card p {
    font-size: 1.2rem;
    line-height: 2;
    color: var(--color-sepia);
    text-align: center;
    margin-bottom: 20px;
}

.letter-card .signature {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--color-burgundy);
    margin-top: 40px;
}

/* ==========================================================================
   Photo Gallery Section
   ========================================================================== */

.gallery {
    padding: 100px 0;
    background: var(--color-blush);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--color-deep-burgundy);
    text-align: center;
    margin-bottom: 15px;
}

.flower-icon {
    display: inline-block;
    animation: flowerSway 3s ease-in-out infinite;
    margin: 0 15px;
}

.flower-icon:last-child {
    animation-delay: 0.3s;
}

@keyframes flowerSway {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.section-subtitle {
    text-align: center;
    font-style: italic;
    color: var(--color-burgundy);
    font-size: 1.2rem;
    margin-bottom: 50px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.photo-card {
    position: relative;
    transition: var(--transition-smooth);
}

.photo-card:hover {
    transform: translateY(-10px) rotate(1deg);
}

.photo-card.large {
    grid-column: span 2;
}

.photo-frame {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.photo-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(112, 66, 20, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.photo-placeholder {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-gold-light) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    color: var(--color-dusty-rose);
    position: relative;
    overflow: hidden;
}

/* Styling for actual images in photo frames */
.photo-frame img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
    filter: sepia(20%) saturate(90%) contrast(95%);
    transition: var(--transition-smooth);
}

.photo-card:hover .photo-frame img {
    filter: sepia(0%) saturate(100%) contrast(100%);
}

/* Add sepia/nostalgic filter for placeholder images */
.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(20%) saturate(90%) contrast(95%);
    transition: var(--transition-smooth);
}

.photo-card:hover .photo-placeholder img {
    filter: sepia(0%) saturate(100%) contrast(100%);
}

.photo-placeholder span {
    font-size: 3rem;
    margin-bottom: 10px;
}

.photo-placeholder p {
    font-size: 0.9rem;
    font-style: italic;
}

.photo-caption {
    text-align: center;
    margin-top: 15px;
    font-family: var(--font-display);
    font-style: italic;
    color: var(--color-burgundy);
    font-size: 1rem;
}

/* ==========================================================================
   Timeline Section
   ========================================================================== */

.timeline {
    padding: 100px 0;
    background: 
        linear-gradient(180deg, var(--color-blush) 0%, var(--color-cream) 100%);
}

.timeline-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--color-rose), var(--color-dusty-rose));
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
    text-align: right;
}

.timeline-item:nth-child(even) {
    text-align: left;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-soft);
    z-index: 1;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: var(--shadow-soft); }
    50% { box-shadow: 0 0 20px var(--color-rose); }
}

.timeline-content {
    width: calc(50% - 50px);
    padding: 25px 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lifted);
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--color-deep-burgundy);
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--color-burgundy);
    font-style: italic;
}

/* ==========================================================================
   Wishes Section
   ========================================================================== */

.wishes {
    padding: 100px 0;
    background: 
        radial-gradient(ellipse at center, var(--color-blush) 0%, var(--color-cream) 100%);
}

.wishes-card {
    background: #fff;
    border-radius: 20px;
    padding: 60px 40px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: var(--shadow-soft);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.wishes-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--color-gold-light) 0%, transparent 70%);
    opacity: 0.3;
    animation: shimmer 8s linear infinite;
}

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

.wishes-flowers {
    position: relative;
    z-index: 1;
    margin: 20px 0;
}

.wishes-flowers span {
    font-size: 2rem;
    margin: 0 10px;
    display: inline-block;
    animation: danceFlower 2s ease-in-out infinite;
}

.wishes-flowers span:nth-child(1) { animation-delay: 0s; }
.wishes-flowers span:nth-child(2) { animation-delay: 0.2s; }
.wishes-flowers span:nth-child(3) { animation-delay: 0.4s; }
.wishes-flowers span:nth-child(4) { animation-delay: 0.6s; }
.wishes-flowers span:nth-child(5) { animation-delay: 0.8s; }

@keyframes danceFlower {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(5deg); }
    75% { transform: translateY(-3px) rotate(-5deg); }
}

.wishes-card h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-deep-burgundy);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.wishes-list {
    list-style: none;
    position: relative;
    z-index: 1;
}

.wishes-list li {
    font-size: 1.3rem;
    color: var(--color-burgundy);
    padding: 15px 0;
    border-bottom: 1px dashed var(--color-rose);
    position: relative;
}

.wishes-list li:last-child {
    border-bottom: none;
    font-style: italic;
    color: var(--color-deep-burgundy);
}

.wishes-list li::before {
    content: '✿';
    margin-right: 15px;
    color: var(--color-rose);
}

/* ==========================================================================
   Final Message Section
   ========================================================================== */

.final-message {
    padding: 120px 0;
    background: 
        linear-gradient(180deg, var(--color-cream) 0%, var(--color-blush) 50%, var(--color-rose) 100%);
    text-align: center;
}

.message-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.final-message h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 4rem);
    color: var(--color-deep-burgundy);
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.3);
}

.big-heart {
    font-size: 5rem;
    animation: heartBeat 1.5s ease-in-out infinite;
    margin: 30px 0;
}

.final-text {
    font-size: 1.5rem;
    line-height: 2;
    color: var(--color-deep-burgundy);
    margin-bottom: 40px;
}

.signature-final {
    margin-top: 50px;
}

.signature-final p {
    font-style: italic;
    color: var(--color-burgundy);
    font-size: 1.2rem;
}

.signature-final .name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-deep-burgundy);
    margin-top: 10px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    background: var(--color-deep-burgundy);
    color: var(--color-cream);
    text-align: center;
    padding: 50px 20px;
}

.footer-flowers {
    margin-bottom: 20px;
}

.footer-flowers span {
    font-size: 1.5rem;
    margin: 0 10px;
    display: inline-block;
    animation: flowerSway 3s ease-in-out infinite;
}

.footer-flowers span:nth-child(1) { animation-delay: 0s; }
.footer-flowers span:nth-child(2) { animation-delay: 0.3s; }
.footer-flowers span:nth-child(3) { animation-delay: 0.6s; }
.footer-flowers span:nth-child(4) { animation-delay: 0.9s; }
.footer-flowers span:nth-child(5) { animation-delay: 1.2s; }

footer p {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.footer-year {
    font-size: 1rem !important;
    opacity: 0.7;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .photo-card.large {
        grid-column: span 2;
    }
    
    .timeline-container::before {
        left: 30px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(odd) {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline-marker {
        position: relative;
        left: auto;
        transform: none;
        margin-bottom: 20px;
    }
    
    .timeline-content {
        width: 100%;
    }
    
    .letter-card {
        padding: 40px 25px;
        transform: none;
    }
    
    .opening-title {
        font-size: 3rem;
    }
    
    .flower-burst {
        transform: scale(0.8);
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
    }
    
    .photo-card.large {
        grid-column: span 1;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .flower-icon {
        margin: 0 8px;
    }
    
    .wishes-card {
        padding: 40px 20px;
    }
    
    .wishes-list li {
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    #opening-overlay,
    #flower-container {
        display: none !important;
    }
    
    #main-content {
        opacity: 1 !important;
    }
    
    .photo-placeholder {
        background: #f0f0f0;
    }
}
