:root {
    --color-bg: #FDFBFF;
    --color-bg-secondary: #F4EEF9;
    --color-primary: #7A4B9F;
    /* Elegant Purple */
    --color-primary-dark: #5A357A;
    --color-text: #212223;
    --color-text-muted: #5D5366;

    --font-heading: 'Amiri', serif;
    --font-body: 'Cairo', sans-serif;
    --font-names: 'Aref Ruqaa', cursive, serif;

    --transition-slow: 0.8s ease-in-out;
    --transition-normal: 0.3s ease;
}

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

body {
    background-color: #f5eff9;
    /* Soft matching lilac neutral backdrop */
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
}

/* Mobile Constraint */
.mobile-container {
    width: 100%;
    max-width: 480px;
    /* Phone format */
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    background-color: var(--color-bg);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    box-shadow: 0 0 45px rgba(122, 75, 159, 0.12);
    border: none;
    margin: 0 auto;
}

/* On actual phones, remove max-width and shadows */
@media (max-width: 480px) {
    .mobile-container {
        max-width: 100%;
        box-shadow: none;
        border: none;
    }
}

.mobile-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* Hidden Content Wrapper */
.hidden-wrapper {
    display: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.visible-wrapper {
    display: block;
    opacity: 1;
}

#main-content {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

#bg-music {
    display: none !important;
}

/* ---------------- PETALS CANVAS & FLASH OVERLAY ---------------- */

.petals-canvas {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100vh;
    height: 100dvh;
    pointer-events: none;
    z-index: 45;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

@media (max-width: 480px) {
    .petals-canvas {
        left: 0;
        transform: none;
        max-width: 100%;
    }
}

.petals-canvas.active {
    opacity: 1;
}

.flash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    /* Very soft, luminous pastel purple flash */
    background: radial-gradient(circle at center, #ffffff 0%, #faf5ff 32%, #f1e2fc 65%, #e9d5ff 100%);
    z-index: 120;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.flash-overlay.flash-active {
    opacity: 1;
    filter: brightness(125%) drop-shadow(0 0 35px rgba(210, 168, 255, 0.6));
}

.flash-overlay.flash-fade-out {
    opacity: 0;
    transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.video-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: filter 1.5s ease, opacity 1s ease 0.5s;
}

.intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tap-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 40%);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 15%;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.feather-out {
    filter: blur(15px) brightness(200%);
    opacity: 0;
    pointer-events: none;
}

/* Tap to open text */
.tap-text {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: #f5e6c8;
    text-shadow: 0 2px 15px rgba(212, 175, 55, 0.6), 0 0 30px rgba(212, 175, 55, 0.3);
    letter-spacing: 3px;
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}


/* ---------------- MAIN SITE ---------------- */

.mute-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 50;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--color-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition-normal);
}

.mute-btn:hover {
    background: #fff;
}

h1,
h2,
h3,
.bismillah {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 400;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    position: relative;
    color: var(--color-text);
    opacity: 0;
    transform: translateY(-15px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.show-section .section-title {
    opacity: 1;
    transform: translateY(0);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60px;
    height: 2px;
    background-color: var(--color-primary);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s;
}

.show-section .section-title::after {
    transform: translateX(-50%) scaleX(1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
}

.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem 1.5rem;
    width: 100%;
}

.hero .bismillah {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(-15px);
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.9);
    transition: opacity 0.8s ease 0.1s, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s;
}

.hero .family-intro {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s;
}

.hero .subtitle {
    font-size: 1.3rem;
    color: var(--color-primary);
    font-family: var(--font-heading);
    text-shadow: 0 2px 5px rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.5s, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s;
}

.hero.show-section .bismillah,
.hero.show-section .family-intro,
.hero.show-section .subtitle {
    opacity: 1;
    transform: translateY(0);
}

.names {
    font-family: var(--font-names);
    font-size: 3.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.25;
    color: var(--color-primary-dark);
}

.name-part {
    opacity: 0;
    transform: translateY(30px) scale(0.92);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.show-section .name-yazeed {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.7s;
}

.show-section .name-and {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.9s;
    font-size: 2.2rem;
    margin: 5px 0;
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
}

.show-section .name-ansam {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 1.1s;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: -20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease 1.3s;
}

.show-section .scroll-indicator {
    opacity: 1;
}

.scroll-indicator .arrow {
    width: 15px;
    height: 15px;
    border-right: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    transform: rotate(45deg);
    margin: 8px auto 0;
    animation: bounce 2s infinite;
}

section {
    padding: 3.5rem 1.2rem;
}

@media (max-width: 380px) {
    section {
        padding: 2.5rem 1rem;
    }
}

/* Details Section */
.details {
    padding: 2.2rem 1.2rem;
}

/* Scratch Instruction Hint */
.scratch-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-primary-dark);
    margin: -0.9rem auto 1.3rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(122, 75, 159, 0.08));
    border: 1px dashed rgba(212, 175, 55, 0.45);
    padding: 0.35rem 1.1rem;
    border-radius: 20px;
    width: fit-content;
    max-width: 90%;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
    user-select: none;
}

.details.show-section .scratch-hint {
    opacity: 1;
    transform: translateY(0);
}

.scratch-hint i {
    color: #b5882e;
    font-size: 0.9rem;
    animation: gentleTap 2.2s infinite ease-in-out;
}

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

.details-cards {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.card {
    background-color: var(--color-bg-secondary);
    padding: 1.15rem 1rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(122, 75, 159, 0.1);
    box-shadow: 0 3px 12px rgba(122, 75, 159, 0.05);
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.scratch-target {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.2rem auto 0 auto;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    background: rgba(122, 75, 159, 0.04);
    border: 1px dashed rgba(122, 75, 159, 0.25);
    min-height: 40px;
    width: 100%;
    max-width: 240px;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

.scratch-target p {
    margin: 0 !important;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.35;
    text-align: center;
}

.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    border-radius: 7px;
    touch-action: none;
    cursor: crosshair;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: opacity 0.4s ease;
}

.details.show-section .card:nth-child(1) {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.12s;
}

.details.show-section .card:nth-child(2) {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.25s;
}

.details.show-section .card:nth-child(3) {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.38s;
}

.card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 18px rgba(122, 75, 159, 0.1);
}

.card .icon-box {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(122, 75, 159, 0.12) 0%, rgba(122, 75, 159, 0.03) 100%);
    border: 1.5px solid rgba(122, 75, 159, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem auto;
    color: var(--color-primary);
    font-size: 1.35rem;
    box-shadow: 0 2px 8px rgba(122, 75, 159, 0.06), inset 0 0 8px rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card:hover .icon-box {
    transform: scale(1.08) translateY(-1px);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(122, 75, 159, 0.25);
}

.card .icon-box i {
    transition: transform 0.3s ease;
}

.card:hover .icon-box i {
    transform: scale(1.08);
}

.card h3 {
    margin-bottom: 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.card p {
    color: var(--color-text-muted);
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-normal);
}

.btn-outline {
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-bg);
    width: 100%;
    margin-top: 1rem;
}

/* Map Link - Elegant Wedding Style */
.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.48rem 1.2rem;
    border: 1px solid var(--color-primary);
    border-radius: 30px;
    color: var(--color-primary);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(122, 75, 159, 0.05), rgba(122, 75, 159, 0.1));
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 0.75rem;
}

.map-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(122, 75, 159, 0.15), transparent);
    transition: left 0.5s ease;
}

.map-link:hover::before {
    left: 100%;
}

.map-link:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(122, 75, 159, 0.3);
}

.map-link i,
.map-link svg {
    flex-shrink: 0;
    font-size: 0.95rem;
}

/* Countdown */
.countdown-section {
    background-color: var(--color-bg-secondary);
}

.countdown-container {
    display: flex;
    direction: ltr;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: nowrap;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--color-bg);
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 1rem 0.5rem;
    border-radius: 12px;
    flex: 1;
    box-shadow: 0 2px 8px rgba(122, 75, 159, 0.04);
    opacity: 0;
    transform: translateY(25px) scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.countdown-section.show-section .time-box:nth-child(1) {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.15s;
}

.countdown-section.show-section .time-box:nth-child(2) {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.25s;
}

.countdown-section.show-section .time-box:nth-child(3) {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.35s;
}

.countdown-section.show-section .time-box:nth-child(4) {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.45s;
}

.time-box .number {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-primary);
    line-height: 1;
}

.time-box .label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.3rem;
}

/* RSVP Form */
.rsvp-text {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s;
}

.rsvp.show-section .rsvp-text {
    opacity: 1;
    transform: translateY(0);
}

.rsvp-form {
    background: var(--color-bg-secondary);
    padding: 1.8rem 1.5rem;
    border-radius: 14px;
    border: 1px solid rgba(122, 75, 159, 0.08);
    box-shadow: 0 4px 18px rgba(122, 75, 159, 0.04);
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.8s ease 0.3s, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s;
}

.rsvp.show-section .rsvp-form {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background: var(--color-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    border-radius: 6px;
    font-family: var(--font-body);
}

.success-message {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid #2ecc71;
    color: #2ecc71;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

footer {
    text-align: center;
    padding: 2rem;
    background: var(--color-bg-secondary);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Animations */
.hidden-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.show-section {
    opacity: 1;
    transform: translateY(0);
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) rotate(45deg);
    }

    40% {
        transform: translateY(-8px) rotate(45deg);
    }

    60% {
        transform: translateY(-4px) rotate(45deg);
    }
}