/* ========================================
   VINTAGE WEDDING WEBSITE - MAIN STYLES
   Tuấn Anh & Diệp Anh - 21.12.2025
   ======================================== */

/* ==================== COLOR PALETTE ==================== */
:root {
    --sepia-dark: #5C4839;
    --sepia-medium: #8B7355;
    --sepia-light: #a57e4a;
    --cream: #F5F1E8;
    --olive: #9CA986;
    --warm-white: #FFF9F0;
    --film-black: #2C2416;
}

/* ==================== BASE STYLES ==================== */
body {
    font-family: 'Cormorant', serif;
    background: linear-gradient(135deg, var(--cream) 0%, var(--warm-white) 100%);
    background-attachment: fixed;
    color: var(--film-black);
    overflow-x: hidden;
}

/* Film Grain Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9998;
    opacity: 0.3;
}

/* ==================== TYPOGRAPHY ==================== */
/* Headings - Elegant Serif */
.vintage-serif,
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Decorative Script - For special text */
.vintage-script {
    font-family: 'Dancing Script', cursive;
    font-weight: 500;
}

/* Body Text - Readable Serif */
.vintage-text,
p, a, button, div {
    font-family: 'Cormorant', serif;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInSlow {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce-gentle {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

@keyframes float-gentle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-soft {
    0%, 100% { box-shadow: 0 0 20px rgba(196, 165, 123, 0.3); }
    50% { box-shadow: 0 0 40px rgba(196, 165, 123, 0.6); }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(245, 241, 232, 0.8);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 60px rgba(245, 241, 232, 1), 0 0 100px rgba(196, 165, 123, 0.6);
        transform: scale(1.1);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.3);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes popOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Princess Rescue Animations */
@keyframes heroWalk {
    0% { left: 0%; }
    100% { left: 85%; }
}

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

@keyframes princessWave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

@keyframes heartsPop {
    0% { 
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    50% { 
        transform: translateY(-30px) scale(1.2);
        opacity: 1;
    }
    100% { 
        transform: translateY(-60px) scale(0.8);
        opacity: 0;
    }
}

@keyframes castleShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

@keyframes swordSlash {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-45deg) scale(1.3); }
    50% { transform: rotate(45deg) scale(1.3); }
    75% { transform: rotate(-45deg) scale(1.3); }
    100% { transform: rotate(0deg) scale(1); }
}

@keyframes explode {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(2) rotate(180deg);
        opacity: 0.5;
    }
    100% { 
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

@keyframes jumpJoy {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.2); }
}

@keyframes sparkleRotate {
    0% { 
        transform: rotate(0deg) scale(0);
        opacity: 0;
    }
    50% { 
        transform: rotate(180deg) scale(1.5);
        opacity: 1;
    }
    100% { 
        transform: rotate(360deg) scale(1);
        opacity: 0.8;
    }
}

@keyframes celebrationPop {
    0% { 
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% { 
        transform: scale(1.3) rotate(10deg);
        opacity: 1;
    }
    100% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes celebrationBounce {
    0%, 100% { 
        transform: translateY(0) scale(1);
    }
    25% { 
        transform: translateY(-10px) scale(1.1) rotate(-5deg);
    }
    75% { 
        transform: translateY(-5px) scale(1.05) rotate(5deg);
    }
}

/* Animation Classes */
.animate-bounce-gentle {
    animation: bounce-gentle 2s ease-in-out infinite;
}

.animate-wiggle {
    animation: wiggle 1s ease-in-out infinite;
}

.animate-float-gentle {
    animation: float-gentle 3s ease-in-out infinite;
}

.fade-in {
    animation: fadeInSlow 1.5s ease-out forwards;
    opacity: 0;
}

/* Animation Delays */
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 0.9s; }
.delay-4 { animation-delay: 1.2s; }

/* ==================== COMPONENTS ==================== */

/* Film Frame Effect */
.film-frame {
    position: relative;
    border: 3px solid var(--sepia-dark);
    box-shadow: 0 4px 20px rgba(92, 72, 57, 0.2),
                inset 0 0 0 8px var(--cream),
                inset 0 0 0 11px var(--sepia-light);
    background: white;
    transition: all 0.3s ease;
}

.film-frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(92, 72, 57, 0.3),
                inset 0 0 0 8px var(--cream),
                inset 0 0 0 11px var(--sepia-light);
}

/* Polaroid Effect */
.polaroid {
    background: white;
    padding: 15px 15px 50px 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: rotate(-2deg);
    transition: all 0.3s ease;
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.polaroid:nth-child(even) {
    transform: rotate(2deg);
}

.polaroid:nth-child(even):hover {
    transform: rotate(0deg) scale(1.05);
}

/* Vintage Ticket */
.vintage-ticket {
    background: linear-gradient(to bottom, var(--cream) 0%, var(--warm-white) 100%);
    border: 2px dashed var(--sepia-medium);
    position: relative;
}

.vintage-ticket::before,
.vintage-ticket::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--warm-white);
    border: 2px solid var(--sepia-medium);
    transform: translateY(-50%);
}

.vintage-ticket::before {
    left: -11px;
}

.vintage-ticket::after {
    right: -11px;
}

/* Vintage Button */
.vintage-btn {
    background: var(--sepia-dark);
    color: var(--cream);
    padding: 1rem 2.5rem;
    border: 2px solid var(--sepia-dark);
    border-radius: 50px;
    font-family: 'Cormorant', serif;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.vintage-btn:hover {
    background: transparent;
    color: var(--sepia-dark);
    transform: translateY(-2px);
}

/* Vintage Character Circle */
.vintage-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--sepia-dark);
    box-shadow: 0 10px 30px rgba(92, 72, 57, 0.3),
                inset 0 5px 15px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--cream) 0%, var(--sepia-light) 100%);
}

/* Sepia Filter */
.sepia-filter {
    filter: sepia(50%) brightness(100%) contrast(95%);
}

/* Old Paper Texture */
.paper-texture {
    background-image: 
        linear-gradient(to bottom, transparent 0%, rgba(92, 72, 57, 0.02) 100%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3CfeColorMatrix values='0 0 0 0 0, 0 0 0 0 0, 0 0 0 0 0, 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Vintage Input */
.vintage-input {
    border: 2px solid var(--sepia-medium);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    font-family: 'Cormorant', serif;
    font-weight: 500;
    transition: all 0.3s;
    background: var(--cream);
}

.vintage-input:focus {
    outline: none;
    border-color: var(--sepia-dark);
    box-shadow: 0 0 0 3px rgba(92, 72, 57, 0.1);
}

/* Vintage Sticker */
.vintage-sticker {
    background: white;
    border: 3px solid var(--sepia-medium);
    border-radius: 50%;
    padding: 1rem;
    box-shadow: 0 5px 20px rgba(92, 72, 57, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.vintage-sticker:hover {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 10px 30px rgba(92, 72, 57, 0.5);
}

/* Light Leak Effect */
.light-leak {
    position: relative;
    overflow: hidden;
}

.light-leak::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 200, 150, 0.2));
    pointer-events: none;
    mix-blend-mode: screen;
}

/* Tape Effect */
.tape {
    position: relative;
}

.tape::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) rotate(-5deg);
    width: 80px;
    height: 25px;
    background: rgba(255, 255, 200, 0.4);
    border: 1px solid rgba(200, 180, 100, 0.3);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* ==================== CALENDAR ==================== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    max-width: 450px;
    margin: 0 auto;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid var(--sepia-medium);
    background: white;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.calendar-day:hover {
    transform: scale(1.05);
    background: var(--sepia-light);
    color: white;
}

.calendar-day.header {
    background: var(--sepia-dark);
    color: var(--cream);
    font-weight: 700;
    border: none;
}

.calendar-day.wedding-day {
    background: linear-gradient(135deg, var(--sepia-medium) 0%, var(--sepia-light) 100%);
    color: white;
    transform: scale(1.15);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.6);
    position: relative;
    font-weight: 900;
    animation: pulse-soft 2s ease-in-out infinite;
}

.wedding-day::after {
    content: '💕';
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 1.3rem;
}

.calendar-day.party-day {
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d4b8 100%);
    color: var(--sepia-dark);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(196, 165, 123, 0.25);
    position: relative;
    font-weight: 900;
    animation: pulse-soft 2s ease-in-out infinite;
    border: 2px solid var(--sepia-light);
}

.party-day::after {
    content: '🍽️';
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 1.2rem;
}

/* ==================== LOADING SCREEN ==================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--sepia-light) 0%, var(--cream) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--sepia-medium);
    border-radius: 10px;
    border: 2px solid var(--cream);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sepia-dark);
}

/* ==================== COUNTDOWN CELEBRATION ==================== */
.celebration-icon {
    display: inline-block;
    font-size: inherit;
    line-height: 1;
}

.celebration-animation {
    animation: celebrationPop 0.8s ease-out forwards, celebrationBounce 1.5s ease-in-out infinite 0.8s;
}

.celebration-animation .celebration-icon {
    display: inline-block;
    animation: celebrationBounce 1.5s ease-in-out infinite;
}

/* ==================== VINTAGE BACKGROUND ==================== */
.vintage-background {
    background: 
        /* Subtle paper texture */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(92, 72, 57, 0.03) 2px,
            rgba(92, 72, 57, 0.03) 4px
        ),
        /* Vintage gradient overlay */
        radial-gradient(
            ellipse at top left,
            rgba(196, 165, 123, 0.15) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse at bottom right,
            rgba(156, 169, 134, 0.1) 0%,
            transparent 50%
        ),
        /* Main gradient */
        linear-gradient(
            135deg,
            var(--cream) 0%,
            var(--warm-white) 50%,
            rgba(245, 241, 232, 0.95) 100%
        );
    background-attachment: fixed;
    position: relative;
}

.vintage-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* Vintage dots pattern */
        radial-gradient(circle at 1px 1px, rgba(92, 72, 57, 0.15) 1px, transparent 0);
    background-size: 20px 20px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.vintage-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        /* Light vignette effect */
        radial-gradient(
            ellipse at center,
            transparent 0%,
            rgba(44, 36, 22, 0.05) 100%
        );
    pointer-events: none;
    z-index: 0;
}

/* ==================== MOBILE OPTIMIZATIONS ==================== */
@media (max-width: 768px) {
    .vintage-background {
        background-attachment: scroll;
    }
    
    /* Reduce overlay on mobile for better visibility */
    .mobile-overlay {
        background-color: rgba(255, 255, 255, 0.2) !important;
    }
    
    /* Optimize image loading on mobile */
    img[loading="lazy"] {
        content-visibility: auto;
        will-change: transform;
    }
    
    /* Optimize scrolling performance on mobile */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* ==================== FEATURED PHOTO STYLES ==================== */
.featured-photo {
    position: relative;
    z-index: 10;
}

.featured-photo-frame {
    position: relative;
}

.featured-photo-frame::before {
    content: '✨';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    animation: featuredSparkle 2s ease-in-out infinite;
    z-index: 20;
    filter: drop-shadow(0 4px 12px rgba(196, 165, 123, 0.5));
}

.featured-photo-frame::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, rgba(196, 165, 123, 0.4), rgba(139, 115, 85, 0.3), rgba(196, 165, 123, 0.4));
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-photo:hover .featured-photo-frame::after {
    opacity: 1;
}

/* Decorative border glow */
.featured-border-glow {
    animation: borderGlow 4s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(196, 165, 123, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(196, 165, 123, 0.5);
    }
}

/* Tape corners animation */
.tape-corner-1, .tape-corner-2 {
    animation: tapeFloat 3s ease-in-out infinite;
}

.tape-corner-2 {
    animation-delay: 1.5s;
}

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

/* Corner decorations */
.featured-corner-decoration {
    animation: cornerFade 4s ease-in-out infinite;
}

.featured-corner-decoration:nth-child(2) {
    animation-delay: 1s;
}

.featured-corner-decoration:nth-child(3) {
    animation-delay: 2s;
}

.featured-corner-decoration:nth-child(4) {
    animation-delay: 3s;
}

@keyframes cornerFade {
    0%, 100% {
        opacity: 0.15;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.1);
    }
}

/* Corner brackets */
.featured-corner-bracket {
    transition: all 0.3s ease;
}

.featured-photo:hover .featured-corner-bracket {
    opacity: 0.8;
    border-color: var(--sepia-dark);
}

/* Decorative lines */
.featured-decorative-line {
    position: relative;
}

.featured-decorative-line::before,
.featured-decorative-line::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 4px;
    height: 4px;
    background: var(--sepia-medium);
    border-radius: 50%;
    transform: translateY(-50%);
}

.featured-decorative-line::before {
    left: -8px;
}

.featured-decorative-line::after {
    right: -8px;
}

.featured-photo-label {
    position: relative;
}

.featured-photo-label::after {
    content: '💕';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    animation: featuredHeart 1.5s ease-in-out infinite;
}

@keyframes featuredGlow {
    0%, 100% {
        box-shadow: 0 20px 40px rgba(139, 115, 85, 0.3), 0 0 30px rgba(196, 165, 123, 0.2);
    }
    50% {
        box-shadow: 0 25px 50px rgba(139, 115, 85, 0.4), 0 0 40px rgba(196, 165, 123, 0.3);
    }
}

@keyframes featuredSparkle {
    0%, 100% {
        opacity: 0.6;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.2);
    }
}

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

/* Featured photo image container - responsive height */
.featured-photo-image {
    height: 320px;
    width: 100%;
}

@media (min-width: 640px) {
    .featured-photo-image {
        height: 400px;
    }
}

@media (min-width: 768px) {
    .featured-photo-image {
        height: 480px;
    }
}

@media (min-width: 1024px) {
    .featured-photo-image {
        height: 560px;
    }
}

/* Ensure image displays properly */
.featured-photo-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}



