@import url('https://fonts.googleapis.com/css2?family=Imperial+Script&family=Spectral:ital,wght@0,400;0,600;1,400;1,600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');



body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: white;
    background-size: 100% 100%;
    font-family: 'Georgia', serif;
    overflow-x: hidden;
}

.envelope-wrapper {
    position: relative;
    width: 95vw;
    max-width: 1200px;
    perspective: 2500px;
}

.base-image {
    display: block;
    width: 100%;
    height: auto;
    z-index: -1;
    position: relative;

}

#seal-checkbox {
    display: none;
}

.envelope-inside {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #d1cbc0;
    z-index: 0;
    clip-path: polygon(var(--env-left) var(--env-top), var(--env-right) var(--env-top), var(--env-right) var(--env-bottom), var(--env-left) var(--env-bottom));
}

.letter {
    position: absolute;
    top: var(--env-top);
    left: 15%;
    width: 70%;
    height: 42%;
    background: #fffdf8;
    z-index: 2;
    box-sizing: border-box;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid #e0dcd2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 1.2s cubic-bezier(0.4, 0.0, 0.2, 1) 0.6s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
}

.letter h1 {
    margin: 0 0 15px 0;
    font-size: 2.5rem;
    color: #5a554e;
    font-style: italic;
    font-weight: normal;
}

.letter p {
    margin: 0;
    font-size: 1.2rem;
    color: #888;
    line-height: 1.6;
    font-family: sans-serif;
}

.envelope-body {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/envelope-body.png');
    background-size: 100% 100%;
    z-index: 3;
    clip-path: polygon(var(--env-left) var(--env-top), 50% var(--flap-point), var(--env-right) var(--env-top), var(--env-right) var(--env-bottom), var(--env-left) var(--env-bottom));
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    transform-origin: 50% var(--env-top);
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.4, 0.0, 0.2, 1), z-index 0s 0.6s;
}

.flap-front,
.flap-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flap-front {
    background-image: url('../images/envelope-flap.jpg');
    background-size: 100% 100%;
    clip-path: polygon(var(--env-left) var(--env-top), var(--env-right) var(--env-top), 50% var(--flap-point));
}

.flap-back {
    background-color: #e5e0d5;
    transform: rotateY(180deg);
    clip-path: polygon(var(--env-left) var(--env-top), var(--env-right) var(--env-top), 50% var(--flap-point));
}

.seal-label {
    position: absolute;
    left: 50%;
    top: calc(var(--flap-point) - 11%);
    transform: translate(-50%, 0) scale(1);
    width: 22%;
    aspect-ratio: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 11;
    overflow: hidden;

    backface-visibility: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    pointer-events: auto;
    transform-origin: 50% 50%;
}

.seal-label:hover {
    transform: translate(-50%, 0) scale(1.08);

}

.app-container {
    width: 100%;
    min-height: 100vh;
    position: relative;
    background-image: url('../images/page-background.jpg');
    background-size: 100% 100%;
    overflow: hidden;
}

#seal-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 50;
    transition: opacity 0.6s ease;
}

#seal-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.envelope-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.instruction {
    margin-top: 7.5rem;
    color: #8a7350;
    font-style: italic;
    letter-spacing: 0.15rem;
    font-size: 0.95rem;
    text-align: center;
}

#main-content {
    padding: 2rem 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
    display: none;
    box-sizing: border-box;
    min-height: 100vh;
    background-color: white;
    background-size: 100% 100%;
}

#main-content.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.hero-card {
    max-width: 680px;
    margin: 0 auto;
    background-image: url('../images/paper-texture.webp');

    border: 1px solid rgba(212, 175, 55, 0.2);

    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.hero-card h1 {
    text-align: center;
    font-size: 2rem;
    color: #5a554e;
    margin: 0 0 0.5rem 0;
    font-weight: normal;
    letter-spacing: 0.15rem;
}

.hero-card .subtitle {
    text-align: center;
    font-size: 2.2rem;
    color: #aa7c11;
    margin: 0 0 2rem 0;
    font-weight: normal;
}

.intro-text {
    text-align: center;
    font-size: 1.05rem;
    color: #5a554e;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.location-section {

    padding: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
}

.location-section h3 {
    color: #aa7c11;
    margin: 0 0 0.8rem 0;
    font-size: 1.2rem;
    font-weight: normal;
}

.location-date {
    font-weight: bold;
    font-size: 1rem;
    margin: 0 0 1.2rem 0;
    color: #5a554e;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}

.countdown-unit {
    min-width: 120px;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.16);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.countdown-value {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: #aa7c11;
}

.countdown-label {
    display: block;
    margin-top: 4px;
    font-size: 0.7rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: #8a7350;
}

.location-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.calendar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #aa7c11, #d4af37);
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 6px 12px rgba(212, 175, 55, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.calendar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(212, 175, 55, 0.3);
}

.calendar-btn.secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #5a554e;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: none;
}

.calendar-btn.secondary:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.location-details {
    font-size: 0.95rem;
    color: #8a7350;
    margin: 0;
    line-height: 1.6;
    font-style: italic;
}

.register-card {

    padding: 2rem;
    margin-top: 1rem;
    margin-bottom: 2rem;

}

.register-card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #aa7c11;
    text-align: center;
    font-size: 1.15rem;
    font-weight: normal;
}

.registration-form {
    display: grid;
    gap: 1rem;

}

.registration-form label {
    display: grid;
    gap: 0.5rem;
    text-align: left;
}

.registration-form span {
    font-size: 0.9rem;
    font-weight: bold;
    color: #5a554e;
}

.registration-form input,
.registration-form select,
.registration-form textarea {
    width: 100%;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: #5a554e;
    background: white;

}

.registration-form textarea {
    resize: vertical;
}

.registration-form button {
    border: none;
    border-radius: 8px;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, #aa7c11, #d4af37);
    color: white;
    font-size: 0.95rem;
    letter-spacing: 0.05rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.25);
    font-weight: bold;
    margin-top: 0.5rem;
}

.registration-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.35);
}

.form-helper {
    margin: 1rem 0 0 0;
    text-align: center;
    font-size: 0.8rem;
    color: #8a7350;
    font-style: italic;
}

.tracker-link-row {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.tracker-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, #aa7c11, #d4af37);
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tracker-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.35);
}

.footer-note {
    text-align: center;
    margin: 2.5rem 0 1.5rem 0;
    font-style: italic;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 2rem;
    line-height: 1.6;
    color: #5a554e;
    font-size: 0.95rem;
}

.privacy-link-row {
    text-align: center;
    margin: 1rem 0 1.5rem 0;
}

.privacy-link {
    display: inline-block;
    color: #aa7c11;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
}

.privacy-link:hover {
    text-decoration: underline;
}

.formal-invite {
    text-align: center;
    font-weight: bold;
    color: #aa7c11;
    margin: 1rem 0 0 0;

    letter-spacing: 0.1rem;
    font-size: 0.85rem;
}

.invitation-card {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(250, 248, 245, 0.98);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.invitation-card h1 {
    font-size: 2rem;
    color: #5a554e;
    margin: 0 0 0.5rem 0;
    font-weight: normal;
    letter-spacing: 0.15rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #aa7c11;
    margin: 0 0 1.5rem 0;
}

.event-details {
    background-color: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.event-details h2 {
    text-align: center;
    font-size: 1.1rem;
    color: #aa7c11;
    margin: 0 0 1rem 0;
    font-weight: normal;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

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

.detail-label {
    font-weight: bold;
    color: #8a7350;
    font-size: 0.9rem;
}

.detail-value {
    color: #5a554e;
    font-size: 0.95rem;
}

.invitation-message {
    font-size: 1rem;
    line-height: 1.7;
    color: #5a554e;
    margin: 1.5rem 0;
    font-style: italic;
}

.rsvp-section {
    background-color: rgba(212, 175, 55, 0.06);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.rsvp-section h3 {
    color: #aa7c11;
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: normal;
}

.rsvp-form {
    display: grid;
    gap: 1rem;
}

.rsvp-form label {
    display: grid;
    gap: 0.5rem;
    text-align: left;
}

.rsvp-form span {
    font-size: 0.9rem;
    font-weight: bold;
    color: #5a554e;
}

.rsvp-form input,
.rsvp-form textarea {
    width: 100%;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: #5a554e;
    background: white;
}

.rsvp-form textarea {
    resize: vertical;
}

al-invite .rsvp-form button {
    border: none;
    border-radius: 8px;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, #aa7c11, #d4af37);
    color: white;
    font-size: 0.95rem;
    letter-spacing: 0.05rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.25);
    font-weight: bold;
}

.rsvp-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.35);
}

.form-message {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    text-align: center;
    font-size: 0.95rem;
}

.form-message.success {
    background: rgba(87, 158, 96, 0.1);
    color: #296a37;
}

.form-message.error {
    background: rgba(184, 53, 53, 0.1);
    color: #8f2d2d;
}

.formal-invite {
    text-align: center;
    font-weight: bold;
    color: #aa7c11;
    margin: 0;

    letter-spacing: 0.1rem;
    font-size: 0.85rem;
}

.open-envelope .envelope-flap {
    animation: flapOpen 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.open-envelope .letter {
    animation: letterPullOut 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes flapOpen {
    0% {
        transform: rotateX(0deg);
    }

    100% {
        transform: rotateX(180deg);
    }
}

@keyframes letterPullOut {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-60px);
        opacity: 0.8;
    }
}

.seal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.envelope-wrapper.is-open .envelope-flap {
    transform: rotateX(180deg);
    z-index: 1;
}

.envelope-wrapper.is-open .letter {
    transform: translateY(-45%);
}

/* Tracker Page Styles */
.tracker-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #efe8dc 0%, #e3d5bc 100%);
}

.tracker-card {
    width: min(100%, 720px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.tracker-card h1 {
    font-size: 2rem;
    color: #5a554e;
    margin: 0 0 1rem 0;
    font-weight: normal;
    letter-spacing: 0.1rem;
}

.tracker-intro {
    line-height: 1.7;
    color: #5a554e;
    margin-bottom: 18px;
}

.tracker-status {
    margin: 18px 0;
}

.status-pill {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: #aa7c11;
    font-weight: bold;
    text-transform: capitalize;
}

.tracker-details {
    margin: 20px 0 24px;
    color: #8a7350;
    line-height: 1.7;
}

.progress-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    overflow: hidden;
    margin: 16px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #aa7c11, #d4af37);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.status-current,
.status-note,
.status-updated {
    margin: 8px 0;
    color: #5a554e;
}

.tracker-status-panel {
    margin-bottom: 22px;
    text-align: left;
    padding: 16px;
    background-color: rgba(212, 175, 55, 0.06);
    border-radius: 10px;
}

.milestone-list {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.milestone-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.14);
    text-align: left;
}

.milestone-item.active {
    border-color: #aa7c11;
    background: rgba(212, 175, 55, 0.15);
}

.milestone-item.complete {
    opacity: 0.9;
}

.milestone-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #aa7c11;
    margin-top: 7px;
    flex-shrink: 0;
}

.tracker-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #aa7c11, #d4af37);
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tracker-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.35);
}

.tracker-btn.secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #5a554e;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* =========================================
   Admin Layout & Sidebar (Modern Dashboard)
   ========================================= */

.admin-body {
    background-image: none;
    background-color: #f4f6f8;
    /* Soft light gray background */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333333;
}

.admin-body,
.admin-body p,
.admin-body span,
.admin-body div,
.admin-body input,
.admin-body select,
.admin-body textarea,
.admin-body a,
.admin-body label,
.admin-body button,
.admin-body .nav-link,
.admin-body .admin-header .subtitle,
.admin-body .action-card p,
.admin-body .admin-table td,
.admin-body form label,
.admin-body form input,
.admin-body form select,
.admin-body form textarea {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

.admin-body h1,
.admin-body h2,
.admin-body h3,
.admin-body h4,
.admin-body h5,
.admin-body h6,
.admin-body .sidebar-header h2,
.admin-body .admin-header h1,
.admin-body .stat-card h3,
.admin-body .action-card h3,
.admin-body .admin-table th,
.admin-body .stat-value {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-style: normal !important;
    font-weight: 600 !important;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Styles */
.admin-sidebar {
    width: 260px;
    background-color: #262626;
    /* Dark gray to match the image mockup */
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 2rem 1.5rem;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.85rem 1.25rem;
    color: #a1a1aa;
    /* Muted text */
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 12px;
    /* Pill shape for active/hover states */
    transition: all 0.2s ease;
    margin: 0 0.5rem;
    border-left: none;
}

.nav-link:hover,
.nav-link:active {
    background-color: #383838;
    /* Highlight state */
    color: #ffffff;
}

.sidebar-footer {
    padding: 1.5rem 1rem;
}

.back-link {
    color: #888888;
}

.back-link:hover {
    background-color: transparent;
    color: #ffffff;
}

/* Main Content Area */
.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 2.5rem 3.5rem;
    box-sizing: border-box;
}

.admin-header {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-header h1 {
    color: #111111;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.admin-header .subtitle {
    color: #71717a;
    margin: 0;
    font-size: 0.95rem;
}

/* Stat Cards (Dashboard Overview) */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: #ffffff;
    border: none;
    border-radius: 20px;
    /* Highly rounded corners */
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Targeting the first stat card to be dark like "Total Sales" in the image */
.stat-card:nth-child(1) {
    background-color: #262626;
    color: #ffffff;
}

.stat-card:nth-child(1) h3 {
    color: #a1a1aa;
}

.stat-card:nth-child(1) .stat-value {
    color: #ffffff;
}

.stat-card h3 {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: #71717a;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: #111111;
}

/* Highlighted Stat Card (Days until event) */
.stat-card.highlight-card {
    background-color: #faf8f5;
    border-bottom: 4px solid #aa7c11;
}

.stat-card.highlight-card .stat-value {
    color: #aa7c11;
}

/* Standard Cards for Tables & Forms */
.admin-card {
    background: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 2rem;
}

/* Table Styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    color: #71717a;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    padding: 1rem 0.5rem;
    border-bottom: 1px solid #e4e4e7;
    font-weight: 600;
}

.admin-table td {
    padding: 1.2rem 0.5rem;
    border-bottom: 1px solid #f4f4f5;
    color: #3f3f46;
    font-size: 0.95rem;
}

/* Forms (Add Event, Add Guest, Tracker Update) */
form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #3f3f46;
    font-weight: 500;
    font-size: 0.95rem;
    margin-top: 1rem;
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    background-color: #fafafa;
    margin-bottom: 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
}

form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: #a1a1aa;
    background-color: #ffffff;
}

/* Buttons */
.btn-primary,
.btn-delete {
    background-color: #262626;
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    /* Pill/rounded button shape */
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}

.btn-primary:hover {
    background-color: #111111;
    transform: translateY(-1px);
}

.btn-delete {
    background-color: #ef4444;
    margin-top: 0;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-delete:hover {
    background-color: #dc2626;
}

/* Badges for RSVP status */
.badge-success {
    background: #dcfce7;
    color: #166534;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Quick Actions Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    color: #111111;
}

.action-icon,
.admin-body .material-symbols-outlined,
.admin-body .material-symbols-outlined.action-icon {
    display: inline-flex;
    align-items: left;
    justify-content: left;
    color: #111111 !important;
    font-family: 'Material Symbols Outlined' !important;
    font-size: 2rem !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    font-style: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    margin-bottom: 0.75rem;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    border-color: #d4d4d8;
}

.action-card h3 {
    margin: 0 0 0.5rem 0;
    color: #111111;
    font-size: 1.05rem;
    font-weight: 400;
}

.action-card p {
    margin: 0;
    color: #71717a;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* =========================================
   GLOBAL TYPOGRAPHY (IMPERIAL SCRIPT & SPECTRAL)
   ========================================= */

/* 1. Body Text: Apply Spectral globally */
body,
p,
span,
div,
input,
select,
textarea,
a,
label {
    font-family: 'Spectral', serif !important;
}

/* 2. Headings: Apply Imperial Script */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Imperial Script', cursive !important;
    /* You might need to increase font sizes slightly, as script fonts often render smaller */
}

.admin-body h1,
.admin-body h2,
.admin-body h3,
.admin-body h4,
.admin-body h5,
.admin-body h6,
.admin-body .sidebar-header h2,
.admin-body .admin-header h1,
.admin-body .stat-card h3,
.admin-body .action-card h3,
.admin-body .admin-table th,
.admin-body .stat-value {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-style: normal !important;
    font-weight: 600 !important;
}

/* 3. Subtitles: Override headings to ensure they stay Spectral */
.subtitle {
    font-family: 'Spectral', serif !important;
}

/* =========================================
   GLOBAL TYPOGRAPHY CONSISTENCY RESET
   ========================================= */

/* 1. Enforce Consistent Font Families */
body,
p,
span,
div,
a,
label,
input,
select,
textarea,
h3,
button,
.subtitle,
.instruction {
    font-family: 'Spectral', serif !important;
}

h1,
h2,
h4,
h5,
h6 {
    font-family: 'Imperial Script', cursive !important;
    font-weight: normal !important;
}

.admin-body h1,
.admin-body h2,
.admin-body h4,
.admin-body h5,
.admin-body h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-weight: 600 !important;
}

/* 2. Consistent Desktop Typography Scale */
h1,
.hero-card h1,
.letter h1,
.tracker-card h1 {
    font-size: 3.5rem !important;
    margin-bottom: 0.5rem !important;
}




h2,
h3,
.register-card h3,
.event-details h2,
.rsvp-section h3 {
    font-size: 2.5rem !important;
    margin-bottom: 0.8rem !important;
}

.subtitle {
    font-size: 1.4rem !important;
    color: #aa7c11 !important;
}

p,
.intro-text,
.location-date,
.location-details,
.footer-note,
.tracker-intro {
    font-size: 1.05rem !important;
    line-height: 1.6 !important;
    color: #5a554e !important;
}

.registration-form span,
.rsvp-form span,
.checkbox-group label {
    font-size: 0.95rem !important;
}

/* Ensure buttons match */
.calendar-btn,
.tracker-link-btn,
.registration-form button,
.tracker-btn {
    font-size: 0.95rem !important;
}

/* 3. Consistent Mobile Typography Scale */
@media (max-width: 768px) {

    h1,
    .hero-card h1,
    .letter h1,
    .tracker-card h1 {
        font-size: 2.8rem !important;
    }

    h2,
    h3,
    .location-section h3,
    .register-card h3,
    .event-details h2,
    .rsvp-section h3 {
        font-size: 2.2rem !important;
    }

    .subtitle {
        font-size: 1rem !important;
    }

    p,
    .intro-text,
    .location-date,
    .location-details,
    .footer-note {
        font-size: 0.95rem !important;
    }
}

/* =========================================
   FIX FORM SPACING (REMOVE ROGUE MARGINS)
   ========================================= */

/* 1. Remove the default margins pushing the questions apart */
.registration-form label,
.rsvp-form label {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.registration-form input,
.registration-form select,
.registration-form textarea,
.rsvp-form input,
.rsvp-form textarea {
    margin-bottom: 0 !important;
}

/* 2. Set the exact gap BETWEEN each question (e.g. between Name and Email) */
.registration-form,
.rsvp-form {
    gap: 12px !important;
    /* Adjust this number to make the gap bigger or smaller */
}

/* 3. Set the exact gap INSIDE each question (between the word "Name" and the input box) */
.registration-form label,
.rsvp-form label {
    gap: 4px !important;
}

/* =========================================
   FIX INSTRUCTION SPACING & MOBILE BACKGROUND
   ========================================= */

/* 1. Remove the letter spacing from the instruction text */
.instruction {
    letter-spacing: normal !important;
}

/* 2. Force the background to perfectly cover the whole screen on all devices */
html,
body,
.app-container {
    min-height: 100vh !important;
    min-height: 100dvh !important;
    /* This fixes the gap caused by mobile browser address bars */
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

:root {
    /* Slightly increased to trim the top edge (was 27.8%) */
    --env-top: 28.2%;
    --env-bottom: 74.5%;

    /* Slightly increased to trim the left edge (was 10%) */
    --env-left: 10.5%;

    /* Slightly decreased to trim the right edge (was 90%) */
    --env-right: 89.5%;

    --flap-point: 53.5%;
}

/* =========================================
   METALLIC SILVER BUTTONS
   ========================================= */
button,
.calendar-btn,
.tracker-link-btn,
.tracker-btn,
.btn-primary {
    /* The silver metallic gradient */
    background: linear-gradient(135deg, #d3d3d3 0%, #ffffff 40%, #a9a9a9 100%) !important;

    /* Dark text for contrast */
    color: #333333 !important;

    /* Subtle border to define the edges */
    border: 1px solid #9e9e9e !important;

    /* 3D shadow effect (outer drop shadow + inner white highlight) */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15), inset 0 2px 3px rgba(255, 255, 255, 0.8) !important;

    /* Optional: Slight text shadow to make the text pop */
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.6) !important;

    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

/* Hover state for a brighter metallic shine when hovered */
button:hover,
.calendar-btn:hover,
.tracker-link-btn:hover,
.tracker-btn:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #e0e0e0 0%, #ffffff 50%, #b5b5b5 100%) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), inset 0 2px 3px rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-2px) !important;
}

/* Exclude the delete button from turning silver so it remains visibly distinct/red */
.btn-delete {
    background: #ef4444 !important;
    color: white !important;
    border: none !important;
    box-shadow: none !important;
}

/* =========================================
   IMPROVED READABILITY (SLIGHTLY BOLDER TEXT)
   ========================================= */
body,
p,
span,
div,
a,
label,
input,
select,
textarea,
.subtitle,
.instruction,
.location-details,
.footer-note {
    font-weight: 800 !important;
}

/* =========================================
   HERO CARD ORNAMENT
   ========================================= */
.top-ornament {
    display: block;
    margin: 0 auto;
    /* Centers the image horizontally and adds space below it */
    max-width: 540px;
    /* Controls the size of the ornament. Increase or decrease as needed */
    height: auto;
    mix-blend-mode: multiply;
    /* Magically hides the white background of the JPEG */
    opacity: 0.9;
    /* Softens the gold just a touch so it isn't overpowering */
}

/* =========================================
   HERO CARD BOTTOM ORNAMENT
   ========================================= */
.bottom-ornament {
    display: block;
    margin: 0 auto;
    /* Adds space above the image to separate it from the text */
    max-width: 540px;
    /* Keeps it the exact same size as the top one */
    height: auto;
    mix-blend-mode: multiply;
    /* Hides the white background */
    opacity: 0.9;
    transform: rotate(180deg);
    /* Flips the image upside down for a mirrored effect */
}

/* =========================================
   SOLID GREY BUTTONS
   ========================================= */
button,
.calendar-btn,
.tracker-link-btn,
.tracker-btn,
.btn-primary {
    /* Solid neutral grey background */
    background: #e9e9ec !important;

    /* White text for high contrast */
    color: #000000 !important;

    /* Remove borders and metallic text shadows */
    border: none !important;
    text-shadow: none !important;

    /* Simple, modern drop shadow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;

    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

/* Hover state for a slightly darker grey */
button:hover,
.calendar-btn:hover,
.tracker-link-btn:hover,
.tracker-btn:hover,
.btn-primary:hover {
    background: #ababac !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px) !important;
}

/* Keep the delete button red */
.btn-delete {
    background: #ef4444 !important;
    color: rgb(0, 0, 0) !important;
    border: none !important;
    box-shadow: none !important;
}

/* =========================================
   FROSTED GLASS HERO CARD (BLURRED BACKGROUND)
   ========================================= */
.hero-card {
    /* Remove the solid image from the card itself */


    /* Apply the heavy blur effect to everything behind the card */
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    /* Ensures it works on Safari */
}

/* =========================================
   BLURRED BACKGROUND IMAGE (HERO CARD)
   ========================================= */
.hero-card {
    /* Set up the card to hold the background layer */
    position: relative !important;
    background-color: transparent !important;

    /* We remove the image from the main card so we can put it on the layer below */


    /* This ensures the blur doesn't bleed outside the rounded corners */
    overflow: hidden !important;
    z-index: 1;
}

/* This creates a dedicated layer just for the blurred background image */
.hero-card::before {
    content: "";
    position: absolute;
    /* We stretch it slightly past the edges so the blur doesn't create a weird halo */
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;

    /* Re-apply your original background image */
    background-image: url('../images/paper-texture.webp') !important;
    background-size: cover !important;
    /* 'cover' usually looks better with blur than 100% 100% */

    /* This applies the heavy blur ONLY to the image */
    filter: blur(3px) !important;

    /* Places the image layer behind all your text and content */
    z-index: -1;

    /* Optional: Lighten the image slightly so dark text is easier to read */
    opacity: 0.85;
}

/* =========================================
   Activities Checkbox Section
   ========================================= */

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-top: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.8rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #5a554e;
    font-size: 0.9rem;
    font-weight: normal;
}

.checkbox-group label:hover {
    background: rgba(212, 175, 55, 0.15);
    transform: translateY(-1px);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #aa7c11;
    cursor: pointer;
}


/* Mobile responsive */
@media (max-width: 600px) {
    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .instruction {

        font-size: 1.4rem;

    }
}

@media (max-width: 768px) {
    /* ... your other mobile rules ... */

    .top-ornament,
    .bottom-ornament {
        max-width: 80%;
        /* Shrinks the ornament proportionally on smaller screens */
    }

    .instruction {

        font-size: 1.4rem;

    }

    .location-section h3 {
        font-size: 1rem !important;
    }

}

.location-section h3 {
    font-size: 1.5rem !important;
}

/* =========================================
   PLUS ONE DYNAMIC FIELDS
   ========================================= */
.plus-one-fields {
    display: none;
    gap: 12px;
    /* Matches your form spacing */
}

/* This class will be added by JavaScript when "Yes" is selected */
.plus-one-fields.visible {
    display: grid;
    animation: fadeInDown 0.4s ease forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.instruction {
    position: absolute;
    top: 10%;
    /* Controls how high up the text sits. Decrease to move it higher, increase to move it lower */
    left: 50%;
    transform: translateX(-50%);
    /* Keeps it perfectly centered */
    z-index: 100;
    /* Ensures it sits on top of all envelope elements */
    margin: 0;
    color: #8a7350;
    font-style: italic;
    font-size: 2rem;
    /* Slightly larger so it's easy to read over the background */
    text-align: center;
    font-weight: 800 !important;
    /* Matches your bolder readability styles */
    pointer-events: none;
    /* Prevents the text from accidentally blocking the user from clicking the seal */
}

/* 1. Flap opens first */
.open-envelope .envelope-flap {
    animation: flapOpen 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 2. Letter waits 0.6s for the flap to open, then pulls out */
.open-envelope .letter {
    animation: letterPullOut 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
    /* Removed z-index to keep it properly tucked behind the envelope body */
}

/* Flap rotation: Z-index drops behind the letter halfway through the flip */
@keyframes flapOpen {
    0% {
        transform: rotateX(0deg);
        z-index: 4;
        /* Starts entirely in front */
    }

    50% {
        transform: rotateX(90deg);
        z-index: 4;
    }

    51% {
        transform: rotateX(91deg);
        z-index: 1;
        /* Flips behind the letter (z:2) once it points upward */
    }

    100% {
        transform: rotateX(180deg);
        z-index: 1;
    }
}

/* Letter slides out from behind the envelope body and fades */
@keyframes letterPullOut {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(-55%);
        opacity: 1;
        /* Remains fully visible as it clears the top flap */
    }

    100% {
        transform: translateY(-150%);
        opacity: 0;
        /* Fades into mist completely at the end */
    }
}

.base-image {
    display: block;
    width: 100%;
    height: auto;
    z-index: -1;
    position: relative;
    /* Force the image to be completely invisible */
    opacity: 0 !important;
    visibility: hidden !important;
}

@media (max-width: 768px) {

    /* Existing rules */
    h1,
    .hero-card h1,
    .letter h1,
    .tracker-card h1 {
        font-size: 2.8rem !important;
    }

    h2,
    h3,
    .location-section h3,
    .register-card h3,
    .event-details h2,
    .rsvp-section h3 {
        font-size: 2.2rem !important;
    }

    .subtitle {
        font-size: 1rem !important;
    }

    p,
    .intro-text,
    .location-date,
    .location-details,
    .footer-note {
        font-size: 0.95rem !important;
    }

    .top-ornament,
    .bottom-ornament {
        max-width: 80%;
    }

    /* Add this new rule to make the instruction text smaller on mobile */
    .instruction {
        font-size: 1rem !important;
        /* Adjust this value if you want it even smaller or slightly larger */
    }
}

.p {
    text-align: justify !important;
    margin-top: 0px !important;
}

@media (max-width: 768px) {
    /* ... your existing mobile rules ... */

    /* Remove extra horizontal padding on inner cards so they align with the main text */
    .register-card,
    .location-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Optional: Slightly reduce the main hero card padding on mobile to give the text more breathing room */
    .hero-card {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .p {
        text-align: justify !important;
    }
}

.letter {
    position: absolute;
    top: var(--env-top);
    left: 15%;
    width: 70%;
    height: 42%;
    background: #fffdf8;
    z-index: 2;
    box-sizing: border-box;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid #e0dcd2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 1.2s cubic-bezier(0.4, 0.0, 0.2, 1) 0.6s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;

    /* Add this line to stop content from bleeding out of the letter */
    overflow: hidden;
}

@media (max-width: 768px) {
    /* ... your other mobile rules ... */

    /* Reduce padding so the larger text/ornaments fit better inside the letter */
    .letter {
        padding: 1rem !important;
    }
}

@media (max-width: 768px) {
    /* ... your other mobile rules ... */

    /* Override the location h3 size specifically for mobile (half of 2.2rem) */
    .location-section h3 {
        font-size: 0.8rem !important;
    }
}

/* =========================================
   DECREASE ENVELOPE SIZE ON DESKTOP
   ========================================= */
@media (min-width: 768px) {
    .envelope-wrapper {
        width: 58vw !important;
        /* Reduces the width relative to the screen size */
        max-width: 700px !important;
        /* Prevents it from getting larger than 800px */
    }
}

/* =========================================
   DECREASE ENVELOPE, LETTER, AND SEAL SIZE ON DESKTOP
   ========================================= */
@media (min-width: 768px) {


    /* Reduce the letter's inner spacing so text has room to breathe */
    .letter {
        padding: 1.5rem 1rem !important;
        height: 38% !important;
        /* Slightly reduced height to match the smaller width */
    }

    /* Scale down the text inside the letter */
    .letter h1 {
        font-size: 2.2rem !important;
        margin-bottom: 0.25rem !important;
    }

    .letter p {
        font-size: 0.9rem !important;
    }

    /* Shrink the gold seal and keep it perfectly centered on the flap */
    .seal-label {
        width: 20% !important;
        /* Reduced from 22% */
        top: calc(var(--flap-point) - 8%) !important;
        /* Adjusted to keep it vertically centered based on the new 16% size */
    }
}

/* =========================================
   CUSTOM ELEGANT SIGNATURE LINE
   ========================================= */
.signature-line {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Keeps it centered on your card */
    gap: 12px !important;
    /* Space between the line and the word */
}

/* =========================================
   KEEP H3 ON ONE LINE (MOBILE VIEW)
   ========================================= */
@media (max-width: 768px) {

    /* Scale down the mobile h3 font size just enough to fit one line */
    h3,
    .location-section h3,
    .register-card h3,
    .rsvp-section h3 {
        font-size: 1.6rem !important;
        white-space: nowrap !important;
        /* Forces text to stay on one line */
    }

    /* Reduce the side padding of the cards on mobile to give text more horizontal room */
    .location-section,
    .register-card {
        padding-left: 0.8rem !important;
        padding-right: 0.8rem !important;
    }
}

/* =========================================
   LETTER ORNAMENT & OPACITY FIX
   ========================================= */

/* 1. Force the letter to stay at 100% opacity */
.letter,
.open-envelope .letter {
    opacity: 1 !important;
}

/* 2. Adjust the spacing around the gold ornament inside the letter */
.letter-ornament {
    margin-top: 20px !important;
    /* Pushes the ornament down from the top edge */
    margin-bottom: 10px !important;
    /* Keeps breathing room between the ornament and the "Save The Date" text */
    align-self: center !important;
    /* Ensures it stays perfectly centered */
}

/* =========================================
   MOBILE ADJUSTMENTS & OPACITY FIX FOR LETTER
   ========================================= */

/* 1. Scale down the ornament and adjust spacing specifically for mobile */
@media (max-width: 768px) {
    .letter-ornament {
        width: 120px !important;
        /* Overrides the 200px inline style so it fits the mobile letter */
        margin-top: 15px !important;
        margin-bottom: 5px !important;
    }
}

/* 2. Update the pull-out animation so the letter stays at 100% opacity */
@keyframes letterPullOut {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(-55%);
        opacity: 1;
    }

    100% {
        transform: translateY(-150%);
        opacity: 1;
        /* Changed from 0 to 1 so it stays completely solid */
    }
}



/* =========================================
   MOBILE BACKGROUND FIX (ENVELOPE SCREEN)
   ========================================= */
@media (max-width: 768px) {

    html,
    body {
        /* Prevent body scroll bounce from showing white space */
        background-color: #000 !important;
    }

    .app-container {
        /* Use dynamic viewport height to account for mobile browser address bars */
        min-height: 100vh !important;
        min-height: 100dvh !important;
        width: 100vw !important;



        /* Ensure it covers every pixel of the screen without distorting */
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;

        /* Disable 'fixed' on mobile to prevent the iOS zoom bug */
        background-attachment: scroll !important;
    }
}

.activities-header {
    margin-bottom: 0.2rem !important;
    /* Pulls the checkboxes closer to the text section */
}

.activities-header p.p {
    margin-bottom: 1rem !important;
}

.select-apply-text {
    margin-top: 0.5rem !important;
    margin-bottom: 0.4rem !important;
    font-weight: bold !important;
    display: block;
}

/* --- ACTIVITIES INTRO DESKTOP SPACING --- */
.activities-intro {
    margin-bottom: 0.5rem !important;
}

.activities-intro p.p {
    line-height: 1.4 !important;
    margin-top: 0.4rem !important;
    margin-bottom: 0.4rem !important;
}

.select-apply-text {
    display: block;
    font-weight: bolder !important;
    color: #000000 !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
}

/* --- MOBILE: ZERO SPACING OVERRIDE --- */
@media (max-width: 768px) {
    .activities-intro {
        margin-bottom: 0 !important;
    }

    .activities-intro p.p {
        margin-top: 0.1rem !important;
        margin-bottom: 0.1rem !important;
        line-height: 1.3 !important;
        /* Tightens the text wrap */
    }

    .select-apply-text {
        margin-top: 0.2rem !important;
        margin-bottom: 0 !important;
    }

    .checkbox-group {
        margin-top: 0 !important;
        /* Pulls the box flush against the text */
    }
}

/* --- DISCLAIMER & REGISTER INTRO DESKTOP SPACING --- */
.disclaimer-text {
    margin-top: 1rem !important;
}

.disclaimer-text p.p {
    margin-top: 0.4rem !important;
    margin-bottom: 0.4rem !important;
    line-height: 1.4 !important;
}

.register-header {
    margin-top: 1.5rem !important;
    margin-bottom: 0.5rem !important;
    text-align: center;
}

.register-header h3 {
    margin-bottom: 0.2rem !important;
}

.register-header p.register-intro {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
    line-height: 1 !important;
}

/* --- MOBILE: ZERO SPACING OVERRIDE --- */
@media (max-width: 768px) {
    .disclaimer-text {
        margin-top: 0.5rem !important;
        /* Pulls it closer to checkboxes */
    }

    .disclaimer-text p.p {
      
        line-height: 1.3 !important;
    }

    .register-header {
  
        /* Small gap to separate from disclaimer */
        margin-bottom: 0 !important;
    }

    .register-header h3 {
        margin-bottom: 0 !important;
    }

    .register-header p.register-intro {
        margin-top: 0.1rem !important;
        margin-bottom: 0 !important;
        /* Pulls it right against the first input box */
        line-height: 0.6 !important;
    }
}

/* --- BOLDER COUNTDOWN NUMBERS --- */
.countdown-value {
    font-weight: 400 !important;
    /* Forces maximum boldness */
    font-size: 1.3rem !important;
    /* Slightly larger (was 1.1rem) to give it more presence */
    -webkit-text-stroke: 0.5px #aa7c11 !important;
    /* Adds a tiny border of the same color to artificially thicken the numbers */
}

/* --- TIGHTEN COUNTDOWN SPACING --- */
.countdown-value {
    margin-bottom: 0 !important;
    line-height: 1 !important;
    /* Removes invisible padding around the text */
}

.countdown-label {
    margin-top: 0 !important;
    /* Removes the default 4px gap */
    line-height: 1 !important;
}

/* --- MOVE INSTRUCTION TEXT DOWN ON MOBILE --- */
@media (max-width: 768px) {
    .instruction {
        top: 20% !important;
        /* Pushes the text further down the screen */
    }
}

/* --- REDUCE LETTER H1 SIZE ON MOBILE --- */
@media (max-width: 768px) {
    .letter h1 {
        font-size: 2.24rem !important;
        /* 20% smaller than the default 2.8rem */
    }
}

/* --- REDUCE SPACE BETWEEN LOCATION AND REGISTER CARD --- */
.location-section {
    margin-bottom: 0 !important;
    /* Reduces the gap (was previously 2.5rem) */
}

.register-card {
    margin-top: 0 !important;
    /* Ensures no extra space is added to the top of the register card */
    padding-top: 0 !important;
    /* Removes any internal padding at the top of the card */
}

/* --- LEFT ALIGN "SELECT ALL THAT APPLY" TEXT --- */
.select-apply-text {
    text-align: left !important;
}

/* --- INCREASE LETTER ORNAMENT SIZE ON MOBILE --- */
@media (max-width: 768px) {
    .letter-ornament {
        width: 75% !important;
        /* 10% larger than the previous 120px */
    }

    /* --- ZERO LETTER SPACING FOR COUNTDOWN LABELS --- */

}

.countdown-label {
    letter-spacing: 0 !important;
    /* Overrides the previous 0.08rem spacing */
}

/* --- GOLD FORM LABELS --- */
.registration-form span,
.rsvp-form span {
    color: #aa7c11 !important;
}

/* --- KEEP FORMAL INVITE ON ONE LINE (MOBILE) --- */
@media (max-width: 768px) {
    .formal-invite {
        white-space: nowrap !important;
        /* Forces the text to stay on a single line */
        width: 100% !important;
        font-size: 0.75rem !important;
        /* Slightly smaller to ensure it fits within the screen width */
    }
}

/* --- HARDWARE ACCELERATION FOR SMOOTH ANIMATION --- */
.envelope-flap {
    will-change: transform, z-index !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    transform: translateZ(0);
    /* Forces GPU rendering */
}

.letter {
    will-change: transform, opacity !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    transform: translateZ(0);
    /* Forces GPU rendering */
}

.open-envelope .envelope-flap,
.open-envelope .letter {
    /* Ensures rendering is optimized during the active animation */
    pointer-events: none;
}

/* =========================================
   HERO CARD CONSISTENT 5PX SPACING OVERRIDE
   ========================================= */

/* Enforce a strict maximum 5px bottom margin for all direct children of the hero card */
.hero-card>* {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove bottom margin on the very last element to keep the card flush */
.hero-card>*:last-child {
    margin-bottom: 0 !important;
}





/* =========================================
   H3 AND PARAGRAPH SPACING OVERRIDE
   ========================================= */

/* 1. Force all h3 tags to have a maximum bottom margin of 5px */
h3,
.location-section h3,
.register-card h3,
.activities-section h3,
.rsvp-section h3 {
    margin-bottom: 1rem !important;
}

/* 2. Target any paragraph (or class .p) that directly follows an h3 and remove its top margin */

/* 3. Handle stacked paragraphs (if multiple paragraphs follow an h3) to keep them tight but readable */

/* =========================================
   CONSECUTIVE PARAGRAPH 1PX SPACING OVERRIDE
   ========================================= */





/* =========================================
   PAGE LOADER STYLES
   ========================================= */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #fffdf8;
    /* Matches your letter background */
    z-index: 99999;
    /* Ensures it sits on top of everything, including your seal */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

/* This class is added by JavaScript when loading is done */
#page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

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

.loader-content p {
    color: #aa7c11;
    font-size: 1.1rem;
    margin-top: 15px;
    letter-spacing: 0.1rem;
    font-weight: bold !important;
}

.loading-bar-container {
    width: 200px;
    height: 4px;
    background-color: rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(135deg, #aa7c11, #d4af37);
    /* Creates a smooth indeterminate loading sweep animation */
    animation: loadingSweep 1.5s infinite ease-in-out;
    border-radius: inherit;
}

@keyframes loadingSweep {
    0% {
        width: 0%;
        transform: translateX(-100%);
    }

    50% {
        width: 100%;
        transform: translateX(0);
    }

    100% {
        width: 100%;
        transform: translateX(100%);
    }
}

/* =========================================
   MOBILE VIEWPORT & OVERFLOW FIXES
   ========================================= */

/* 1. Prevent inputs, textareas, and the checkbox container from exceeding 100% width */
.registration-form input,
.registration-form select,
.registration-form textarea,
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea,
.checkbox-group {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

/* 2. Fix the h3 right-shifting (Overrides the previous white-space: nowrap rule) */
@media (max-width: 768px) {

    h3,
    .location-section h3,
    .register-card h3,
    .rsvp-section h3,
    .activities-section h3 {
        white-space: normal !important;
        /* Allows long text to wrap naturally */
        word-wrap: break-word !important;
        line-height: 1.3 !important;
        /* Keeps wrapped lines looking neat */
    }

    /* 3. Ensure the main containers don't break the viewport */
    .hero-card,
    .register-card,
    .location-section,
    .activities-section {
        box-sizing: border-box !important;
        max-width: 100% !important;
    }

    /* 4. Strictly prevent horizontal scrolling on the entire page */
    body,
    html,
    .app-container {
        overflow-x: hidden !important;
        width: 100vw !important;
        max-width: 100% !important;
    }
}


.gv {
    font-family: 'Great Vibes', cursive !important;
    font-weight: 400 !important;
    font-size: 4.3rem !important;
    
    /* Add these two lines to nudge it left */
    display: inline-block !important;
    margin-right: -3px !important; /* Increase or decrease this number to adjust the spacing */
}
.hero-card .subtitle {
    text-align: center;
    font-size: 2.2rem;
    color: #aa7c11;
    margin: 0 0 0.5rem 0; /* Reduced from 2rem to 0.5rem */
    font-weight: normal;
}

.location-section {
    padding: 0.5rem 1.8rem 0; /* Reduced top padding to 0.5rem (was 1.8rem all around) */
    margin-bottom: 0 !important; /* Kept your previous override */
    text-align: center;
}
/* --- ACTIVITIES INTRO DESKTOP SPACING --- */
.select-apply-text {
    display: block;
    margin-bottom: 0.9rem !important; /* Increased from 0 to 0.5rem */
}

.location-details {
    text-align: center;
}
.location-date {
    font-size: 1.4rem !important; /* Increase this value until it looks right (e.g., 1.5rem, 1.6rem) */
}

@media (max-width: 768px) {
    .subtitle {
        font-size: 1.1rem !important;
        /* Slightly reduced to help fit narrower screens */
        width: 100% !important;
        white-space: nowrap !important;
        /* Forces the text to stay on one line */
        overflow: visible !important;
    }

    .gv {
        font-family: 'Great Vibes', cursive !important;
        font-weight: 400 !important;
        font-size: 2.5rem !important;
        /* Slightly reduced to help fit narrower screens */

    }

    .top-ornament {
        display: block;
        margin: 0 auto;
        /* Centers the image horizontally and adds space below it */
        max-width: 100%;
        
    }
    .bottom-ornament {
        display: block;
        margin: 0 auto;
        /* Centers the image horizontally and adds space below it */
        max-width: 100%;
        
    }
}
/* --- UNIFY H2, H3, AND SUBTITLE SIZES --- */

/* 1. Desktop Sizes */
h2, 
h3,
.location-section h3, 
.register-card h3, 
.event-details h2, 
.rsvp-section h3 {
    font-size: 2.5rem !important; /* Sets all of these to the exact same size on desktop */
}

/* 2. Mobile Sizes */
@media (max-width: 768px) {

    h3, 
    .subtitle,
    .register-card h3, 
    .event-details h2, 
    .rsvp-section h3 {
        font-size: 1.8rem !important; /* Sets all of these to the exact same size on mobile */
        white-space: normal !important; /* Ensures the text can wrap cleanly onto a second line if it gets too long */
        max-width: 100% !important;
    }
    .location-date{
        font-size: 1.3rem !important; /* Sets all of these to the exact same size on mobile */
        max-width: 100% !important;
    }
    .location-section h3 {
        font-size: 1.4rem !important; /* Sets all of these to the exact same size on mobile */
        max-width: 100% !important;
    }
    h2 .subtitle {
        font-size: 0.8rem !important; /* Reduced by 0.6rem from 1.4rem */
        max-width: 100% !important;
    }
}

/* =========================================
   FINAL MOBILE TYPOGRAPHY & SPACING (unified)
   Place this at the very bottom of the file —
   later rules win, so this overrides all earlier
   scattered mobile blocks.
   ========================================= */
@media (max-width: 768px) {

    /* Main title */
    h1,
    .hero-card h1,
    .letter h1,
    .tracker-card h1 {
        font-size: 2.4rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* All secondary headings unified */
    h2,
    h3,
    .register-card h3,
    .event-details h2,
    .rsvp-section h3 {
        font-size: 1.6rem !important;
        white-space: normal !important;
        max-width: 100% !important;
        line-height: 1.3 !important;
        margin-bottom: 0.6rem !important;
    }

    /* Location heading (slightly smaller, it's a sub-label) */
    .location-section h3 {
        font-size: 1.2rem !important;
        max-width: 100% !important;
        margin-bottom: 0.5rem !important;
    }

    /* Subtitle */
    .subtitle {
        font-size: 1.1rem !important;
        max-width: 100% !important;
        white-space: normal !important;
        margin-bottom: 1rem !important;
    }

    /* Body copy */
    p,
    .intro-text,
    .location-details,
    .footer-note,
    .tracker-intro {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }

    .location-date {
        font-size: 1rem !important;
        max-width: 100% !important;
        margin-bottom: 1rem !important;
    }

    /* Consistent spacing between the main sections */
    .location-section {
        margin-bottom: 1.2rem !important;
    }

    .register-card {
        margin-top: 0.5rem !important;
        padding-top: 0.5rem !important;
    }

    .event-details,
    .rsvp-section {
        margin-bottom: 1.2rem !important;
    }
}

.location-date {
    font-weight: bold;
    font-size: 1rem;
    margin: 0 0 0.2rem 0; /* Reduced from 1.2rem */
    color: #5a554e;
}
@media (max-width: 768px) {
    /* ... other mobile rules ... */

    .location-date {
        font-size: 1rem !important;
        max-width: 100% !important;
        margin-bottom: 0.2rem !important; /* Reduced from 1rem */
    }
    
    /* ... remaining mobile rules ... */
}
@media (max-width: 768px) {
    h2.subtitle {
        font-size: 15pt !important; 
        white-space: normal !important; /* Keeps it wrapping nicely if it gets too long */
        line-height: 1.2 !important; /* Ensures the lines don't crash into each other */
    }
     h3.subtitle {
        font-size: 17pt !important; 
        white-space: normal !important; /* Keeps it wrapping nicely if it gets too long */
        line-height: 1.2 !important; /* Ensures the lines don't crash into each other */
    }
}

/* Increase H1 on Desktop (Default was 3.5rem) */
.hero-card h1 {
    font-size: 64pt !important; 
}
h3.subtitle {
        font-size: 26pt !important; 
        white-space: normal !important; /* Keeps it wrapping nicely if it gets too long */
        line-height: 1.2 !important; /* Ensures the lines don't crash into each other */
    }

/* Increase H1 on Mobile (Default was 2.4rem) */
@media (max-width: 768px) {
    .hero-card h1 {
        font-size: 3.3rem !important; 
    }
     h3.subtitle {
        font-size: 17pt !important; 
        white-space: normal !important; /* Keeps it wrapping nicely if it gets too long */
        line-height: 1.2 !important; /* Ensures the lines don't crash into each other */
    }
    
    .location-date {
          font-size: 15pt !important; 
        max-width: 100% !important;
        margin-bottom: 0.2rem !important; /* Reduced from 1rem */
    }
}
.countdown-label {
    margin-top: 6px !important; /* Increase or decrease this value to get the perfect spacing */
}

/* Squeeze the h3 and location details paragraph together */
.location-section h3 {
    margin-bottom: 0 !important; 
}

.location-details {
    margin-top: 4px !important; /* Adjust this value (e.g., 0px, 8px) to get the exact spacing you want */
}
/* Reduce space below the H1 */
.hero-card h1 {
    margin-top: -28px !important; /* Use a negative number to pull the subtitle up into the invisible font padding */
    line-height: 1 !important;
}

/* Ensure no extra space above the subtitle */

/* Reduce the space below the subtitle */
.hero-card h3.subtitle {
    margin-bottom: 15px !important; /* Change to 0px if you want it even tighter */
}

/* Remove the space at the top of the location section */
.location-section {
    margin-top: 0 !important;
    padding-top: 0 !important; 
}
.hero-card h3.subtitle {
    margin-top: 15px !important;
    
}

/* =========================================
   ADMIN PANEL MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    /* 1. Switch from side-by-side to stacked layout */
    .admin-layout {
        flex-direction: column;
    }

    /* 2. Convert fixed sidebar into a top navigation bar */
    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
    }

    .sidebar-header {
        padding: 1.5rem 1rem 0.5rem 1rem;
    }

    /* 3. Make navigation links a swipeable horizontal row of pills */
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0.5rem 1rem 1rem 1rem;
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        scrollbar-width: none; /* Hide scrollbar Firefox */
    }
    
    .sidebar-nav::-webkit-scrollbar {
        display: none; /* Hide scrollbar Safari/Chrome */
    }

    .nav-link {
        margin: 0;
        padding: 0.6rem 1rem;
        white-space: nowrap;
        font-size: 0.9rem;
    }

    .sidebar-footer {
        display: none; /* Hide footer link on mobile to save vertical space, or adjust as needed */
    }

    /* 4. Adjust main content padding and remove the left margin */
    .admin-main {
        margin-left: 0 !important;
        padding: 1.5rem 1rem;
    }

    /* 5. Reduce heading sizes for mobile */
    .admin-header h1 {
        font-size: 1.5rem !important;
    }

    .admin-header {
        margin-bottom: 1.5rem;
    }

    /* 6. Stack stat and action cards */
    .stat-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .action-grid {
        grid-template-columns: 1fr;
        margin-top: 1rem;
    }

    .admin-card {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
        border-radius: 16px;
    }

    /* 7. Enable horizontal scrolling for tables so they don't break the layout */
    .admin-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* 8. Make form fields and buttons tap-friendly */
    form label,
    form input,
    form select,
    form textarea {
        font-size: 0.95rem;
    }

    /* Make action buttons full-width for easier tapping on mobile */
    .btn-primary, 
    .btn-delete {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        margin-top: 0.8rem;
    }
}
/* =========================================
   CALENDAR BUTTONS - IDENTICAL SIZE FIX
   ========================================= */

/* Force both buttons to be the exact same size on Desktop */
.location-actions .calendar-btn {
    width: 240px !important; /* Matches the natural width of the Google button */
    min-width: 240px !important;
    max-width: 240px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    justify-content: center !important;
}

/* Force both buttons to be the exact same size on Mobile */
@media (max-width: 768px) {
    .location-actions .calendar-btn {
        width: 250px !important; /* Slightly wider on mobile for a better tap target */
        min-width: 250px !important;
        max-width: 250px !important;
    }
    
    /* Forces the buttons to stack neatly on smaller mobile screens */
    .location-actions {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }
}
#seal-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 50;
    transition: opacity 0.6s ease;
    cursor: pointer; /* Indicates the full screen is clickable */
    pointer-events: auto;
}

#seal-screen.hidden {
    opacity: 0;
    pointer-events: none; /* Disables clicks after opening */
}