/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
    --primary: #8d70b5;       /* Elegant Lilac Purple */
    --gold: #6e5091;          /* Deeper Lilac / Calligraphy Purple */
    --gold-light: #ece6f2;    /* Light Lavender Tint */
    --accent: #9c82c2;        /* Soft Purple Orchid */
    --dark: #3c2452;          /* Deep Plum/Dark Violet */
    --body-text: #5c4d6a;     /* Muted Slate Purple */
    --bg-light: #faf8fc;      /* Lilac White Background */
    --white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-cursive: 'Great Vibes', cursive;
    --font-body: 'Montserrat', sans-serif;
    --shadow-soft: 0 10px 30px rgba(141, 112, 181, 0.05);
    --shadow-medium: 0 15px 35px rgba(141, 112, 181, 0.15);
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    background-repeat: repeat;
    color: var(--body-text);
    line-height: 1.6;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark);
    font-weight: 600;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

/* Global Buttons & Form Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-maps {
    background-color: var(--primary);
    color: var(--white);
    margin-top: 15px;
    gap: 10px;
}

.btn-maps:hover {
    background-color: var(--dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(47, 62, 48, 0.3);
}

.btn-submit, .btn-submit-wish {
    background-color: var(--gold);
    color: var(--white);
    width: 100%;
}

.btn-submit:hover, .btn-submit-wish:hover {
    background-color: var(--dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.3);
}

/* Music Control Button */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--white);
    border: 1px solid var(--gold-light);
    color: var(--gold);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: var(--transition);
}

.music-btn:hover {
    transform: scale(1.1);
    background-color: var(--gold-light);
}

.music-btn.playing i {
    animation: rotateMusic 4s linear infinite;
}

@keyframes rotateMusic {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.music-wave {
    display: none;
    position: absolute;
    bottom: 5px;
    align-items: flex-end;
    gap: 2px;
}

.music-btn.playing .music-wave {
    display: flex;
}

.music-wave span {
    width: 2px;
    background: var(--gold);
    border-radius: 1px;
    animation: dance 1s ease-in-out infinite alternate;
}

.music-wave span:nth-child(1) { height: 8px; animation-delay: 0.1s; }
.music-wave span:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.music-wave span:nth-child(3) { height: 10px; animation-delay: 0.5s; }

@keyframes dance {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

/* Helper Classes */
.hidden { display: none !important; }
.hidden-content {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease;
}
.visible-content {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ==========================================
   1. ENVELOPE DESIGN & ANIMATIONS
   ========================================== */
#envelope-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-light);
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    background-repeat: repeat;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1.5s cubic-bezier(0.25, 1, 0.5, 1), transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.envelope-wrapper {
    position: relative;
    width: 380px;
    height: 520px;
    cursor: pointer;
    transition: var(--transition);
}

.envelope {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #faf7fc; /* Back panel card color */
    background-image: linear-gradient(180deg, #f2eefa 0%, #e8e1f2 100%);
    box-shadow: 0 30px 60px rgba(141, 112, 181, 0.25);
    border-radius: 8px;
    perspective: 1000px;
    border: 1px solid rgba(215, 200, 230, 0.6);
}

/* Envelope Flap (Top triangle) */
.envelope .flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 190px solid transparent;
    border-right: 190px solid transparent;
    border-top: 240px solid #dbcee8; /* Top fold shade */
    transform-origin: top;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s, z-index 0.2s ease-in-out 0.7s;
    z-index: 4;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
}

/* Envelope Pocket (Sides and bottom folds) */
.envelope .pocket {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 190px solid #e5dbf0; /* Left side fold */
    border-right: 190px solid #e5dbf0; /* Right side fold */
    border-bottom: 340px solid #d1c2de; /* Bottom pocket body */
    z-index: 3;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    filter: drop-shadow(0 -4px 10px rgba(0, 0, 0, 0.03));
}

/* Letter inside the envelope */
.envelope .letter {
    position: absolute;
    left: 15px;
    bottom: 15px;
    width: 350px;
    height: 480px;
    background: var(--white);
    background-image: linear-gradient(135deg, #fffcf9 0%, #faf5f0 100%);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    z-index: 2;
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 0.9s, opacity 0.6s ease 0.9s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px solid var(--gold-light);
}

.letter-content {
    text-align: center;
    border: 2px double var(--gold);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.letter-calligraphy {
    font-family: var(--font-cursive);
    font-size: 3.5rem;
    color: var(--gold);
    margin-bottom: 10px;
    line-height: 1.2;
}

.letter-text {
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 15px;
}

.letter-date {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    border-top: 1px solid var(--gold-light);
    border-bottom: 1px solid var(--gold-light);
    padding: 8px 25px;
    margin-top: 10px;
}

/* Wax Seal Button */
.seal-container {
    position: absolute;
    top: 240px; /* Aligned exactly at the tip of the 240px border-top flap */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease 0.6s;
}

.seal {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #5c3b7a 0%, #2b113c 100%); /* Premium Wax Deep Plum/Violet */
    border-radius: 48% 52% 50% 50% / 50% 48% 52% 50%; /* Organic handmade liquid shape */
    box-shadow: 
        0 8px 20px rgba(43, 17, 60, 0.45), 
        inset 0 3px 6px rgba(255, 255, 255, 0.25),
        inset 0 -3px 6px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #2b113c;
    position: relative;
    animation: pulseSeal 2s infinite ease-in-out;
    transition: transform 0.3s ease;
}

.seal:hover {
    transform: scale(1.05);
}

.seal-initials {
    color: #ffd875; /* Premium gold initials */
    font-family: var(--font-cursive);
    font-size: 1.9rem;
    font-weight: bold;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255,255,255,0.4);
}

.seal-ring {
    position: absolute;
    width: 62px;
    height: 62px;
    border: 1px dashed rgba(255, 216, 117, 0.4);
    border-radius: 50%;
    pointer-events: none;
}

.seal-tooltip {
    position: absolute;
    top: 95px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    white-space: nowrap;
    opacity: 0.9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    pointer-events: none;
    animation: floatTooltip 2s infinite ease-in-out;
    border: 1px solid var(--gold-light);
}

/* Envelope Open State Actions */
.envelope-opened .flap {
    transform: rotateX(180deg);
    z-index: 1; /* drops behind paper */
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), z-index 0.1s ease-in-out 0.4s;
}

.envelope-opened .letter {
    transform: translateY(-280px);
    z-index: 4; /* pulls in front of pocket and flaps */
    opacity: 1;
}

.envelope-opened .seal-container {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
    pointer-events: none;
}

#envelope-screen.fade-out-screen {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

@keyframes pulseSeal {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgba(43, 17, 60, 0.4); }
    50% { transform: scale(1.04); box-shadow: 0 8px 28px rgba(43, 17, 60, 0.6); }
}

@keyframes floatTooltip {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -6px); }
}

/* Envelope scaling for mobile screens */
@media (max-width: 440px) {
    .envelope-wrapper {
        transform: scale(0.85);
        transform-origin: center;
    }
}

@media (max-width: 375px) {
    .envelope-wrapper {
        transform: scale(0.75);
        transform-origin: center;
    }
}

/* ==========================================
   2. INVITATION MAIN CONTENT WRAPPER
   ========================================== */
#invitation-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 0 40px rgba(141, 112, 181, 0.1);
    min-height: 100vh;
    padding: 0 20px 40px;
    position: relative;
    border-left: 1px solid rgba(215, 200, 230, 0.5);
    border-right: 1px solid rgba(215, 200, 230, 0.5);
}

/* Sections General */
.section {
    padding: 60px 10px;
    text-align: center;
    position: relative;
}

.section-title {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 30px;
    letter-spacing: 1.5px;
    position: relative;
    font-weight: 500;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--body-text);
    margin-top: -20px;
    margin-bottom: 35px;
    font-weight: 400;
}

/* Watercolor floral dividers */
.watercolor-divider {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.floral-divider-img {
    max-width: 150px;
    height: auto;
    opacity: 0.85;
}

.floral-divider-img.bottom {
    transform: rotate(180deg);
}

/* ==========================================
   HERO / GREETING SECTION
   ========================================== */
#hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    border-bottom: 1px solid rgba(141, 112, 181, 0.15);
}

/* Watercolor background placements inside hero container */
.floral-bg {
    position: absolute;
    width: 250px;
    height: 250px;
    background-image: url('assets/watercolor_floral.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.15;
    pointer-events: none;
}

.floral-bg.top-left {
    top: 10px;
    left: -40px;
    transform: rotate(-15deg);
}

.floral-bg.bottom-right {
    bottom: 10px;
    right: -40px;
    transform: scaleX(-1) rotate(-15deg);
}

.hero-content {
    z-index: 2;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
}

.couple-names {
    font-family: var(--font-cursive);
    font-size: 5rem;
    color: var(--gold);
    margin: 20px 0;
    line-height: 1.1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
    animation: fadeInName 2.5s ease-out;
}

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

.hero-quote {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--body-text);
    max-width: 450px;
    margin: 30px auto;
    font-weight: 400;
    line-height: 1.8;
}

.hero-date {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--dark);
    margin-top: 40px;
    border-top: 1px solid var(--gold-light);
    border-bottom: 1px solid var(--gold-light);
    padding: 15px 0;
    display: inline-block;
    width: 80%;
}

/* ==========================================
   COUNTDOWN TIMER SECTION
   ========================================== */
#countdown {
    background-color: rgba(141, 112, 181, 0.04);
    border-radius: 12px;
    margin: 20px 10px;
    border: 1px solid rgba(141, 112, 181, 0.08);
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 480px;
    margin: 0 auto;
}

.countdown-item {
    background: var(--white);
    padding: 20px 10px;
    border-radius: 12px;
    border: 1px solid var(--gold-light);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
}

.countdown-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-medium);
}

.time-num {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 5px;
}

.time-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--body-text);
}

/* ==========================================
   TIMELINE SECTION
   ========================================== */
.timeline-container {
    position: relative;
    max-width: 500px;
    margin: 40px auto 0;
    padding-left: 20px;
}

/* Vertical center line */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 28px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: var(--gold-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    text-align: left;
}

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

/* Badge (Icon circle) */
.timeline-badge {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--white);
    border: 3px solid var(--gold);
    position: absolute;
    left: -18px;
    top: 5px;
    z-index: 10;
    box-shadow: 0 0 0 5px var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-badge i {
    display: none; /* simple point on mobile is more premium */
}

/* Panel card */
.timeline-panel {
    width: 100%;
    padding-left: 30px;
    position: relative;
}

.timeline-heading {
    margin-bottom: 5px;
}

.timeline-time {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 2px;
    font-family: var(--font-body);
}

.timeline-event {
    font-size: 1.15rem;
    color: var(--dark);
    font-weight: 600;
}

.timeline-body p {
    font-size: 0.85rem;
    color: var(--body-text);
}

/* ==========================================
   LOCATION & HARİTA SECTION
   ========================================== */
.location-card {
    background: var(--white);
    border: 1px solid var(--gold-light);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
    margin: 20px 10px 0;
}

.location-info h3 {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 12px;
}

.location-info p {
    font-size: 0.9rem;
    color: var(--body-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.location-info p i {
    color: var(--gold);
}

.location-info .phone {
    margin-bottom: 25px;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gold-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* ==========================================
   RSVP (KATILIM) SECTION
   ========================================== */
.rsvp-card {
    background: var(--white);
    border: 1px solid var(--gold-light);
    border-radius: 16px;
    padding: 35px 30px;
    box-shadow: var(--shadow-soft);
    margin: 20px 10px 0;
    text-align: left;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid #dcdad5;
    background-color: var(--bg-light);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--dark);
    transition: var(--transition);
    outline: none;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 8px rgba(138, 154, 134, 0.2);
}

/* Radio styling */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    position: relative;
    user-select: none;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #dcdad5;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
    position: relative;
    background-color: var(--white);
    transition: var(--transition);
}

.radio-label:hover input ~ .custom-radio {
    border-color: var(--primary);
}

.radio-label input:checked ~ .custom-radio {
    border-color: var(--primary);
    background-color: var(--primary);
}

.radio-label input:checked ~ .custom-radio::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--white);
}

/* RSVP Success Message */
.rsvp-success-message {
    text-align: center;
    padding: 20px 0;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rsvp-success-message i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.rsvp-success-message h3 {
    margin-bottom: 10px;
}

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

/* ==========================================
   GUESTBOOK / WISHES SECTION
   ========================================== */
.guestbook-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 20px 10px 0;
    text-align: left;
}

.guestbook-form-card {
    background: var(--white);
    border: 1px solid var(--gold-light);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
}

.wishes-list-container {
    background: var(--white);
    border: 1px solid var(--gold-light);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
}

.wishes-list-container h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--gold-light);
    padding-bottom: 10px;
}

.wishes-list {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 5px;
}

.wish-item {
    border-bottom: 1px solid rgba(215, 200, 230, 0.4);
    padding: 15px 0;
    animation: fadeIn 0.8s ease-in;
}

.wish-item:last-child {
    border-bottom: none;
}

.wish-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.wish-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.wish-date {
    font-size: 0.7rem;
    color: var(--body-text);
    opacity: 0.7;
}

.wish-body {
    font-size: 0.85rem;
    color: var(--body-text);
    line-height: 1.5;
    font-style: italic;
}

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

/* ==========================================
   FOOTER SECTION
   ========================================== */
.footer {
    text-align: center;
    padding-top: 80px;
    padding-bottom: 40px;
}

.footer-names {
    font-family: var(--font-cursive);
    font-size: 3rem;
    color: var(--gold);
    margin: 15px 0 5px;
}

.footer-thanks {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--primary);
    margin-bottom: 40px;
}

.footer-copyright {
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--body-text);
    opacity: 0.6;
}

.footer-admin-link {
    color: var(--body-text);
    text-decoration: none;
    margin-left: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.footer-admin-link:hover {
    color: var(--gold);
    opacity: 1;
}

/* ==========================================
   MEDIA QUERIES FOR RESPONSIVENESS
   ========================================== */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    #invitation-container {
        padding: 0 10px 30px;
        border-left: none;
        border-right: none;
    }
    
    .couple-names {
        font-size: 3.8rem;
    }
    
    .countdown-grid {
        gap: 8px;
    }
    
    .countdown-item {
        padding: 15px 5px;
    }
    
    .time-num {
        font-size: 1.8rem;
    }
    
    .location-card, .rsvp-card, .guestbook-form-card, .wishes-list-container {
        padding: 20px 15px;
    }
}

/* ==========================================
   ORIENTATION WARNING & MOBILE ENVELOPE SCALING
   ========================================== */

/* Portrait Mode Warning Overlay */
#orientation-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--dark);
    color: var(--white);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

#orientation-warning .warning-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#orientation-warning i.rotate-icon {
    font-size: 4rem;
    color: var(--gold);
    margin-bottom: 20px;
    animation: rotatePhone 2s infinite ease-in-out;
}

#orientation-warning p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.5;
    max-width: 280px;
}

@keyframes rotatePhone {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(-90deg); }
    100% { transform: rotate(0deg); }
}

/* Show warning overlay on mobile landscape */
@media (max-width: 960px) and (orientation: landscape) {
    #orientation-warning {
        display: flex;
    }
}

/* Scale envelope wrapper on smaller portrait mobile viewports */
@media (max-width: 400px) {
    .envelope-wrapper {
        transform: scale(0.85);
    }
}

@media (max-width: 350px) {
    .envelope-wrapper {
        transform: scale(0.72);
    }
}

/* ==========================================
   PHOTO UPLOAD ADDITIONAL STYLES
   ========================================== */
.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--bg-light);
    border: 2px dashed var(--gold-light);
    border-radius: 12px;
    padding: 20px;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
}

.file-upload-label:hover {
    background-color: rgba(141, 112, 181, 0.05);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Photo Previews Grid Styles */
.photo-previews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 15px;
    background-color: rgba(250, 248, 245, 0.5);
    border: 1px dashed var(--gold-light);
    border-radius: 12px;
    padding: 12px;
}

.photo-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid var(--gold-light);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.photo-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background-color: rgba(158, 86, 92, 0.9);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    transition: var(--transition);
    padding: 0;
}

.photo-preview-item .remove-btn:hover {
    background-color: #b33939;
    transform: scale(1.15);
}

/* Progress bar styles */
.upload-progress-container {
    margin-bottom: 20px;
    text-align: center;
}

.progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background-color: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--gold-light);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--body-text);
    font-weight: 500;
}

/* Helper hidden class */
.hidden {
    display: none !important;
}

/* ==========================================
   ADMIN PHOTO GRID & LIGHTBOX STYLES
   ========================================== */
.photos-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.photo-admin-card {
    background: var(--white);
    border: 1px solid var(--gold-light);
    border-radius: 16px;
    padding: 12px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.photo-admin-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.photo-admin-img-wrapper {
    width: 100%;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background-color: var(--bg-light);
}

.photo-admin-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.photo-admin-img-wrapper:hover img {
    transform: scale(1.05);
}

.photo-admin-info {
    padding: 12px 4px 6px;
    text-align: left;
    flex-grow: 1;
}

.photo-admin-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-admin-date {
    font-size: 0.75rem;
    color: var(--body-text);
    opacity: 0.7;
}

.photo-admin-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(215, 200, 230, 0.4);
    padding-top: 10px;
    margin-top: 6px;
}

.photo-admin-btn-download {
    color: var(--primary);
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.photo-admin-btn-download:hover {
    color: var(--gold);
    transform: translateY(-1px);
}

.photo-admin-btn-delete {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.photo-admin-btn-delete:hover {
    color: #b33939;
    transform: translateY(-1px);
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(29, 36, 29, 0.95);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    position: relative;
    animation: zoomIn 0.3s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 3px solid var(--white);
}

.lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--gold);
    transform: scale(1.1);
}

.lightbox-caption {
    color: var(--white);
    text-align: center;
    margin-top: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 0.5px;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- Admin Photo Albums Styles --- */
.photo-album-card {
    background: var(--white);
    border: 1px solid var(--gold-light);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.photo-album-card:hover {
    box-shadow: var(--shadow-medium);
}

.photo-album-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(215, 200, 230, 0.4);
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.photo-album-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.photo-album-name {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.photo-album-name i {
    color: var(--gold);
}

.photo-album-count {
    background-color: rgba(141, 112, 181, 0.08);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.photo-album-btn-delete-all {
    background: none;
    border: 1px solid #eccdd2;
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.photo-album-btn-delete-all:hover {
    background-color: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.photo-album-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

.photo-album-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gold-light);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.photo-album-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.photo-album-item:hover img {
    transform: scale(1.06);
}

/* Action overlay on thumbnail hover */
.photo-item-actions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(43, 35, 52, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 2;
}

.photo-album-item:hover .photo-item-actions {
    opacity: 1;
}

.photo-item-actions button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.photo-item-btn-download {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary);
}

.photo-item-btn-download:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.photo-item-btn-delete {
    background-color: rgba(158, 86, 92, 0.9);
    color: var(--white);
}

.photo-item-btn-delete:hover {
    background-color: #b33939;
    transform: scale(1.1);
}
