:root {
    --primary-color: #000000;
    --secondary-color: #f6d365;
    --accent-color: #b21f1f;
    --text-dark: #f4f4f4;
    --text-light: #f4f4f4;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.3);
    --font-heading: 'Playfair Display', serif;
    --font-title: 'Valley Personal Use', cursive;
    --font-body: 'Inter', sans-serif;
}

@font-face {
    font-family: 'Valley Personal Use';
    src: url('../fonts/Valley Personal Use.TTF') format('truetype');
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: #000000;
    /* R:54 G:69 B:49 */
    -webkit-text-size-adjust: 100%;
    /* Prevent font scaling in landscape on iOS */
    -webkit-tap-highlight-color: transparent;
    /* Remove tap highlight on mobile */
}

.playfair {
    font-family: var(--font-heading);
}

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

.section {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.hidden {
    display: none;
}

.bg-light {
    background-color: #000000 !important;
    color: #fff;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Overlay Door */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    /* Handle mobile address bar */
    background-color: #000000;
    background-image: url('../images/hero-bg.jpg?v=2.0');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1);
}

.overlay.open {
    transform: translateY(-100%);
}

.overlay-content {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    color: white;
}

.overlay-content h1 {
    font-family: var(--font-title);
    font-size: 3.1rem;
    margin-bottom: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.overlay-content h4 {
    font-size: 0.85rem;
    letter-spacing: 4px;
    margin-bottom: 0px;
    color: var(--secondary-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
}


.top-content p {
    font-size: 0.85rem;
    line-height: 1.2;
}

.top-content {
    margin-top: 20px;
}

.bottom-content {
    position: absolute;
    bottom: 15px;
    /* Raised slightly for breathing room */
    left: 0;
    right: 0;
    padding: 0 20px;
}

.recipient {
    margin: 2px 0;
}

.recipient p {
    margin-bottom: 0px;
    font-size: 0.75rem;
}

.recipient h3 {
    font-size: 1.1rem !important;
    /* Shrink the guest name box slightly */
}

.error-note {
    font-size: 0.6rem;
    margin: 2px 0;
    opacity: 0.8;
    line-height: 1.1;
}

.btn-primary {
    margin-top: 15px;
    padding: 10px 25px;
    font-size: 0.95rem;
}

/* Hero Section */
.hero {
    min-height: 100dvh;
    padding: 45dvh 0 80px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    color: white;
    text-align: center;
    overflow: hidden;
    background: transparent !important;
}

/* Blurred bars pseudo-element removed */

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/main-bg.jpg?v=2.0') !important;
    background-color: #000000 !important;
    /* R:54 G:69 B:49 */
    background-size: 100% auto !important;
    background-position: top center !important;
    background-repeat: no-repeat !important;
    z-index: -1;
}


.hero-content h1 {
    font-family: var(--font-title);
    font-size: 3.5rem;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Event Grid */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.event-card {
    text-align: center;
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.music-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Countdown Overlay on Profile */
.countdown-overlay {
    position: absolute;
    bottom: 12%;
    /* Positioned slightly higher on the photo */
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.timer {
    display: flex;
    justify-content: center;
    gap: 4px;
    /* Even tighter for full-width safety */
}

.timer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    background-color: #f7a033;
    /* Orange background as requested */
    border-radius: 8px;
    /* Slightly smaller radius */
    padding: 6px 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    min-width: 0;
    /* Allow shrinking */
}

.timer-item span {
    font-size: 1.4rem;
    font-weight: 800;
    color: #364531;
    /* Blue text as requested */
    line-height: 1;
    margin-bottom: 2px;
}

.timer-item-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #364531;
    /* Blue text for labels too */
    text-transform: uppercase;
}

/* Extra safety for common phones */
@media (max-width: 430px) {
    .timer-item span {
        font-size: 1.15rem;
    }

    .timer-item-label {
        font-size: 0.55rem;
    }
}

/* Extra safety for very small phones */
@media (max-width: 360px) {
    .timer {
        gap: 3px;
    }

    .timer-item {
        padding: 4px 1px;
    }

    .timer-item span {
        font-size: 1rem;
    }

    .timer-item-label {
        font-size: 0.5rem;
    }
}

/* Schedule Section */
.schedule-section {
    background: url('../images/event-bg.jpg?v=2.0') center top/contain;
    background-repeat: no-repeat;
}

.schedule-header {
    width: 100%;
    margin: 0 auto;
}

.name-ornament-container {
    width: 100%;
    max-width: 280px;
    margin: 0 auto 30px;
    padding: 0;
    display: flex;
    justify-content: center;
}

.name-ornament-bg {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 480px) {
    .name-ornament-container {
        max-width: 90%;
    }
}

.schedule-items {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.schedule-item {
    width: 100%;
    max-width: 400px;
}

.schedule-label {
    display: inline-block;
    background-color: #c6ad85;
    /* Tan color from nav */
    color: #364531;
    padding: 6px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.schedule-item p {
    font-size: 1rem;
    font-weight: 500;
    color: white;
    line-height: 1.5;
    margin-bottom: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Gallery */
.gallery-section {
    background-color: var(--primary-color);
    padding: 60px 0;
    color: white;
}

.gallery-header {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-title-img {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.ornament {
    width: 150px;
    height: 30px;
    color: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.svg-ornament {
    width: 100%;
    height: 100%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    /* Tight gap matching the reference image */
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-item {
    aspect-ratio: 1/1;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background-color: rgba(255, 255, 255, 0.05);
    /* Placeholder while loading */
    content-visibility: auto;
    /* Browser optimization */
    contain: paint;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item img[loading] {
    opacity: 0;
}

.gallery-item img.loaded {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-footer {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-bottom-text {
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 1.2rem;
    line-height: 1.2;
    margin: 15px 0;
    text-transform: uppercase;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 20px 0;
}

.lightbox-content,
#lightbox-caption {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    transform: translateY(-50%);
    pointer-events: none;
}

.lightbox-nav span {
    color: white;
    font-size: 30px;
    cursor: pointer;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 50%;
    transition: background 0.3s;
}

.lightbox-nav span:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* RSVP Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.5);
}

/* RSVP Section */
.rsvp-section {
    background-color: #000000;
    padding: 60px 0;
    color: #fff;
}

.rsvp-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.counter-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fbc02d;
    line-height: 1;
    margin-bottom: 4px;
}

.counter-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: #aaa;
}

.counter-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
}

.rsvp-card {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rsvp-title {
    margin-top: 0;
    margin-bottom: 5px;
    /* Reduced from 10px */
    color: #fff !important;
    /* Theme Blue */
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    font-size: 1.8rem;
    line-height: 1.1;
    /* Tighter line height for 2 lines */
}

.rsvp-section .form-group {
    margin-bottom: 5px;
}

.rsvp-section input,
.rsvp-section select,
.rsvp-section textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.1);
    font-family: inherit;
    font-size: 0.95rem;
    color: #fff;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.rsvp-section textarea {
    resize: vertical;
}

.rsvp-section input::placeholder,
.rsvp-section textarea::placeholder {
    color: #777;
}

.rsvp-section select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
}

.rsvp-section select option {
    color: #000;
    background-color: #fff;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background-color: #a85863;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-submit:hover {
    background-color: #8e4a54;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Submissions Display */
.rsvp-submissions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.rsvp-submissions h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
}

.rsvp-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-right: 5px;
}


/* Styles for individual RSVP entries are defined below, after .rsvp-list */

.rsvp-entry .entry-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.rsvp-entry .entry-name {
    font-weight: 700;
    color: #a85863;
}

.rsvp-entry .entry-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: #f0f0f0;
}

.rsvp-entry .entry-status.hadir {
    background: #e6f4ea;
    color: #1e7e34;
}

.rsvp-entry .entry-status.tidak-hadir {
    background: #fdf2f2;
    color: #d73a49;
}

.rsvp-entry .entry-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 5px;
    opacity: 0.6;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rsvp-entry .entry-delete-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

.rsvp-entry .entry-message {
    font-size: 0.95rem;
    line-height: 1.4;
    font-style: italic;
    color: #555;
    word-break: break-word;
    margin-top: 6px;
}

/* RSVP Entry: Avatar + Body layout */
.rsvp-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: white;
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    border-left: 4px solid #a85863;
    animation: rsvpFadeIn 0.4s ease both;
}

@keyframes rsvpFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

.entry-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: white;
    text-transform: uppercase;
    flex-shrink: 0;
}

.entry-body {
    flex: 1;
    min-width: 0;
}

.entry-time {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 5px;
}

/* Loading state */
.rsvp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 0;
    color: #777;
    font-size: 0.95rem;
}

.rsvp-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(168, 88, 99, 0.2);
    border-top-color: #a85863;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty / Error state */
.rsvp-empty {
    text-align: center;
    padding: 30px 0;
    color: #777;
    opacity: 0.8;
}

.rsvp-empty p {
    margin: 8px 0 0;
    font-size: 0.95rem;
}

/* Success message (inline after form submit) */
.rsvp-success-msg {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #a8ddb9;
    border-radius: 10px;
    padding: 12px 18px;
    text-align: center;
    font-weight: 600;
    margin-top: 12px;
    animation: rsvpFadeIn 0.4s ease;
}


/* Gift Area (Relocated in Footer) */
.gift-area {
    margin-top: 30px;
    margin-bottom: 40px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.gift-title-v3 {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
}

.gift-title-v3 img {
    max-width: 140px;
    height: auto;
    display: block;
}

.gift-category-v3 {
    margin-bottom: 25px;
}

.cat-header-v3 {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.cat-title-v3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fbc02d !important;
    /* Golden Yellow */
    margin: 0;
}

.cat-note-v3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    opacity: 0.9;
    line-height: 1.4;
}

.gift-item-v3 {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 8px;
    border-bottom: 1px solid #fbc02d;
    /* Golden Underline */
    margin-bottom: 15px;
}

.gift-item-v3.no-border {
    border-bottom: none;
}

.gift-info-v3 {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gift-info-v3.horizontal {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.bank-name-v3 {
    font-size: 1.1rem;
    font-weight: 800;
}

.acc-num-v3,
.acc-num-v4 {
    margin-left: 5px;
    color: #00d4ff;
    /* Bright Light Blue */
    font-weight: 700;
}

.holder-name-v3 {
    font-size: 1.1rem;
    font-weight: 500;
}

.address-text-v3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-copy-v3 {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.2s;
}

.btn-copy-v3:hover {
    transform: scale(1.1);
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Profile Photo */
.photo-frame {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1080px;
    height: 60px;
    background-color: #c6ad85;
    /* Gold/Tan R:198 G:173 B:133 */
    z-index: 1001;
    display: flex;
    align-items: center;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
}

.bottom-nav-container {
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #364531;
    /* Theme Blue */
    flex: 1;
    transition: transform 0.2s ease;
}

.nav-item svg {
    margin-bottom: 2px;
    width: 20px;
    height: 20px;
    stroke: #364531;
    /* Blue icons as requested */
}

.nav-item span {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item:active {
    transform: scale(0.9);
}

/* --- Footer Styles --- */
.footer {
    padding: 80px 0 0;
    background-color: #000000;
    color: white;
}

.family-credits {
    margin-bottom: 60px;
}

.section-subtitle {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.family-names p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 10px;
    opacity: 0.9;
}

.guest-list-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: white;
}

.kasepuhan-label {
    font-weight: 800;
    font-size: 1.1rem;
    color: #c6ad85;
    margin-bottom: 30px;
}

.guest-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
    padding: 0 20px;
}

.guest-item {
    font-size: 0.95rem;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #c6ad85;
}

/* Ensure content doesn't get hidden behind bottom nav */
main {
    padding-bottom: 60px;
}

.footer-bottom {
    margin-top: 0;
    padding-bottom: 0;
    width: 100%;
}

.footer-image-container {
    width: 100%;
    position: relative;
    /* For absolute positioning of links */
}

.footer-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.info-content {
    display: flex;
    flex-direction: column;
    /* Stacked */
    align-items: center;
    gap: 8px;
    /* Spacing between lines */
}

.info-content.overlay-links {
    position: absolute;
    bottom: 12px;
    /* Lowered significantly to hit the black bar */
    left: 45%;
    /* Adjusted for better alignment with logo on the right */
    transform: translateX(-50%);
    width: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    /* Increased spacing between the two links */
    z-index: 10;
    white-space: nowrap;
}

.info-label {
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.contact-link {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
    font-weight: 400;
    font-size: 0.7rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.contact-link:hover {
    opacity: 0.7;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .hero {
        align-items: flex-start !important;
        padding-top: 45dvh !important;
        /* Adjusted for mobile portrait crop */
    }

    .hero-bg {
        background-size: 100% auto !important;
        background-position: top center !important;
    }

    .overlay-content h1 {
        font-size: 1.9rem;
    }


    .overlay-content {
        padding: 60px 30px;
    }

    .overlay-content h4 {
        font-size: 0.75rem;
        letter-spacing: 3px;
    }

    .top-content p {
        font-size: 0.75rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 0.9rem;
        padding: 0 10px;
    }

    .section {
        padding: 50px 0;
    }

    .glass-card {
        padding: 20px;
    }


    @media (max-width: 768px) {
        .rsvp-section {
            padding: 40px 15px;
        }

        .rsvp-section h2 {
            font-size: 1.8rem;
        }
    }

    .timer {
        gap: 8px;
    }

    .timer-item {
        min-width: 60px;
    }

    .timer-item span {
        font-size: 1.5rem;
    }

    .photo-frame {
        width: 150px;
        height: 150px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #000000;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 450px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 20px;
    position: relative;
    color: white;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.generator-header {
    text-align: center;
    margin-bottom: 25px;
}

.generator-header h3 {
    margin-bottom: 10px;
    color: #fbc02d;
}

.generator-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.generator-body .form-group {
    margin-bottom: 20px;
}

.generator-body input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-align: center;
}

.generator-body input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.generator-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    opacity: 0.5;
}

.generator-divider::before,
.generator-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: white;
}

.generator-divider span {
    padding: 0 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.generator-bulk h4 {
    margin-bottom: 10px;
    color: #fbc02d;
    text-align: center;
}

.bulk-note {
    font-size: 0.75rem;
    text-align: center;
    opacity: 0.6;
    margin-bottom: 20px;
}

.btn-bulk {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-bulk:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fbc02d;
}

.bulk-list {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bulk-guest-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.guest-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.guest-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.guest-phone {
    font-size: 0.8rem;
    opacity: 0.6;
}

.btn-share-mini {
    background: #25d366;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-share-mini:hover {
    transform: scale(1.05);
}

.guest-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.sent-badge {
    font-size: 0.65rem;
    color: #25d366;
    font-weight: 700;
    text-transform: uppercase;
}

.bulk-guest-item.sent {
    opacity: 0.7;
    border-left: 3px solid #25d366;
}

.bulk-guest-item.highlight-next {
    border: 2px solid #fbc02d;
    box-shadow: 0 0 15px rgba(251, 192, 45, 0.4);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.tab-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #fbc02d;
    color: #000;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.history-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.btn-clear {
    background: none;
    border: 1px solid rgba(255, 0, 0, 0.5);
    color: #ff4d4d;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff4d4d;
}

.history-time {
    font-size: 0.7rem;
    opacity: 0.5;
    margin-top: 2px;
}


@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .timer-item {
        min-width: 50px;
    }

    .timer-item span {
        font-size: 1.2rem;
    }
}

/* ===== DESKTOP: Tampilan Mengikuti HP ===== */
@media (min-width: 769px) {

    /* Body background untuk area di luar wrapper */
    body {
        background: #000000;
        display: flex;
        justify-content: center;
    }

    /* Overlay pintu: dibatasi lebar HP */
    .overlay {
        width: 430px;
        left: 50%;
        transform: translateX(-50%);
    }

    .overlay.open {
        transform: translateX(-50%) translateY(-100%);
    }

    /* Music player ikut lebar wrapper */
    .music-player {
        right: calc(50% - 430px / 2 + 20px);
    }

    /* Main content wrapper: lebar HP */
    #main-content {
        width: 430px;
        position: relative;
    }

    /* Hero bg: ikut lebar wrapper */
    .hero-bg {
        background-size: 430px auto !important;
    }

    /* Bottom nav: dibatasi sesuai wrapper */
    .bottom-nav {
        width: 430px;
        max-width: 430px;
    }

    /* Container: tidak perlu 1200px lagi */
    .container {
        max-width: 100%;
        padding: 0 20px;
    }

    /* Guest items: satu kolom saja seperti di HP */
    .guest-items {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    /* Footer image full width dalam wrapper */
    .footer-img {
        width: 100%;
    }

    /* Countdown timer: sesuaikan untuk lebar kecil */
    .timer {
        gap: 4px;
    }

    .timer-item {
        min-width: 0;
    }

    .timer-item span {
        font-size: 1.4rem;
    }

    /* Gallery grid maks sama seperti container wrapper */
    .gallery-grid {
        max-width: 100%;
    }
}