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

html {
    direction: rtl;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Cairo", sans-serif;
    color: #2d070d;
    background: #190308;
    overflow-x: hidden;
}

.invite-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background:
        radial-gradient(circle at 50% 5%, rgba(255, 222, 174, 0.24), transparent 28%),
        radial-gradient(circle at 50% 92%, rgba(116, 10, 35, 0.48), transparent 36%),
        linear-gradient(180deg, #5b0a1e 0%, #2b050d 42%, #120105 100%);
}

.invitation-card {
    width: min(100%, 760px);
    min-height: 94vh;
    position: relative;
    overflow: hidden;
    text-align: center;
    border-radius: 26px;
    border: 1px solid rgba(235, 185, 135, 0.46);
    padding: 145px 34px 155px;
    background:
        linear-gradient(90deg, rgba(75, 7, 23, 0.46), transparent 12%, transparent 88%, rgba(75, 7, 23, 0.46)),
        radial-gradient(circle at 50% 32%, rgba(255, 245, 226, 0.9), rgba(237, 201, 183, 0.76) 37%, rgba(184, 124, 104, 0.82) 74%, rgba(94, 20, 29, 0.9) 100%);
    box-shadow:
        0 34px 95px rgba(0, 0, 0, 0.58),
        inset 0 0 70px rgba(95, 20, 24, 0.28),
        inset 0 0 0 9px rgba(255, 238, 215, 0.08);
    animation: cardFadeIn 1.35s ease both;
}

.invitation-card::before {
    content: "";
    position: absolute;
    inset: 14px;
    z-index: 1;
    border: 1px solid rgba(112, 20, 34, 0.22);
    border-radius: 20px;
    background:
        radial-gradient(circle at center, rgba(255, 249, 239, 0.24), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 50%, rgba(88, 6, 21, 0.12));
    pointer-events: none;
}

.invitation-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: 0.42;
    pointer-events: none;
}

.ambient-glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 223, 168, 0.32), transparent 34%),
        radial-gradient(circle at 18% 82%, rgba(255, 188, 146, 0.18), transparent 25%),
        radial-gradient(circle at 82% 78%, rgba(255, 188, 146, 0.16), transparent 25%);
    animation: glowPulse 5.5s ease-in-out infinite;
    pointer-events: none;
}

.decor {
    position: absolute;
    display: block;
    pointer-events: none;
    user-select: none;
}

.decor-curtains {
    top: -16px;
    left: 50%;
    z-index: 5;
    width: 112%;
    max-width: none;
    transform: translateX(-50%);
    transform-origin: top center;
    filter: drop-shadow(0 18px 18px rgba(34, 0, 8, 0.42));
    animation: curtainSway 6.5s ease-in-out infinite;
}

.decor-chandelier {
    top: 18px;
    left: 50%;
    z-index: 6;
    width: min(210px, 38vw);
    transform: translateX(-50%);
    filter:
        drop-shadow(0 0 12px rgba(255, 220, 158, 0.88))
        drop-shadow(0 0 32px rgba(255, 191, 112, 0.62));
    animation: chandelierFloat 4.2s ease-in-out infinite;
}

.decor-flowers {
    right: 50%;
    bottom: -22px;
    z-index: 4;
    width: 112%;
    max-width: none;
    transform: translateX(50%);
    filter: drop-shadow(0 -16px 22px rgba(73, 7, 20, 0.22));
    animation: flowersDrift 7.5s ease-in-out infinite;
}

.decor-candles {
    bottom: 42px;
    z-index: 5;
    width: min(142px, 24vw);
    opacity: 0.92;
    filter:
        drop-shadow(0 0 9px rgba(255, 207, 134, 0.55))
        drop-shadow(0 12px 16px rgba(56, 5, 15, 0.25));
    animation: candleFlicker 2.8s ease-in-out infinite;
}

.decor-candles-left {
    left: 24px;
}

.decor-candles-right {
    right: 24px;
    transform: scaleX(-1);
    animation-delay: 0.55s;
}

.content {
    position: relative;
    z-index: 8;
    width: 100%;
    max-width: 590px;
    margin: 0 auto;
}

.bismillah {
    margin-bottom: 18px;
    font-size: clamp(1.08rem, 2.4vw, 1.42rem);
    font-weight: 800;
    color: #4f0b1b;
}

.verse {
    margin: 0 auto 24px;
    max-width: 560px;
    font-size: clamp(0.82rem, 1.8vw, 0.98rem);
    line-height: 2.05;
    color: #3e1118;
}

.praise {
    margin-bottom: 12px;
    font-size: clamp(0.95rem, 2vw, 1.08rem);
    line-height: 1.9;
    color: #4a1a22;
}

.wedding-title {
    margin-bottom: 18px;
    font-size: clamp(1.55rem, 4.5vw, 2.45rem);
    font-weight: 800;
    line-height: 1.45;
    color: #4d0818;
    text-shadow:
        0 1px 0 rgba(255, 247, 236, 0.65),
        0 10px 24px rgba(83, 8, 23, 0.16);
}

.logo-frame {
    width: min(330px, 76vw);
    margin: 0 auto 24px;
    animation: logoFloat 4.8s ease-in-out infinite;
}

.logo-frame img {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.96;
    filter:
        sepia(0.1)
        drop-shadow(0 14px 22px rgba(70, 14, 16, 0.28));
}

.details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    max-width: 610px;
    margin: 20px auto 22px;
    border-top: 1px solid rgba(92, 14, 25, 0.28);
    border-bottom: 1px solid rgba(92, 14, 25, 0.28);
    background: rgba(255, 239, 222, 0.22);
}

.detail-item {
    padding: 13px 10px;
    border-inline-start: 1px solid rgba(92, 14, 25, 0.25);
}

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

.detail-item span {
    display: block;
    margin-bottom: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #6a2634;
}

.detail-item strong {
    display: block;
    font-size: clamp(0.9rem, 1.8vw, 1.02rem);
    color: #2d070d;
}

.note {
    max-width: 545px;
    margin: 0 auto 20px;
    padding: 0 6px;
}

.note p:first-child {
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 800;
    color: #4f0b1b;
}

.note p:last-child {
    font-size: clamp(0.8rem, 1.7vw, 0.9rem);
    line-height: 1.95;
    color: #5b3540;
}

.rsvp-form {
    max-width: 470px;
    margin: 24px auto 20px;
    padding: 17px 16px 15px;
    border: 1px solid rgba(126, 49, 60, 0.2);
    border-radius: 16px;
    background: rgba(255, 244, 232, 0.22);
    box-shadow:
        inset 0 0 22px rgba(255, 250, 241, 0.18),
        0 0 24px rgba(255, 220, 176, 0.08);
    backdrop-filter: blur(2px);
}

.rsvp-heading {
    margin-bottom: 13px;
}

.rsvp-heading h2 {
    font-size: clamp(1rem, 2.2vw, 1.18rem);
    font-weight: 800;
    color: #4f0b1b;
}

.rsvp-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 330px;
    margin: 0 auto;
}

.rsvp-fields label {
    display: block;
}

.rsvp-fields input {
    width: 100%;
    border: 1px solid rgba(111, 48, 54, 0.24);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.91rem;
    color: #2d070d;
    text-align: center;
    background: rgba(255, 250, 244, 0.48);
    outline: none;
    transition:
        border-color 0.24s ease,
        box-shadow 0.24s ease,
        background 0.24s ease;
}

.rsvp-fields input::placeholder {
    color: rgba(88, 35, 42, 0.7);
}

.rsvp-fields input:focus {
    border-color: rgba(126, 27, 48, 0.48);
    background: rgba(255, 252, 248, 0.68);
    box-shadow: 0 0 0 3px rgba(141, 23, 52, 0.08);
}

.attendance-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 14px auto 13px;
}

.attendance-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid rgba(107, 55, 50, 0.16);
    border-radius: 12px;
    color: #4a1720;
    background: rgba(255, 247, 237, 0.2);
    cursor: pointer;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.attendance-option::before {
    content: "";
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin-left: 9px;
    border: 1.5px solid rgba(96, 44, 46, 0.38);
    border-radius: 50%;
    background: rgba(255, 252, 247, 0.5);
    box-shadow: inset 0 0 0 4px rgba(255, 252, 247, 0.65);
    transition: 0.25s ease;
}

.attendance-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.attendance-option span {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.6;
}

.attendance-option:has(input:checked) {
    border-color: rgba(116, 19, 43, 0.42);
    background: rgba(255, 232, 225, 0.34);
    box-shadow:
        inset 0 0 0 1px rgba(255, 246, 235, 0.18),
        0 0 16px rgba(116, 19, 43, 0.08);
}

.attendance-option:has(input:checked)::before {
    border-color: rgba(116, 19, 43, 0.62);
    background: #74132b;
    box-shadow: inset 0 0 0 4px rgba(255, 239, 229, 0.92);
}

.rsvp-submit {
    border: 1px solid rgba(235, 196, 139, 0.42);
    border-radius: 999px;
    padding: 9px 24px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff8ee;
    background: #5f0b21;
    box-shadow: 0 9px 18px rgba(65, 3, 18, 0.18);
    cursor: pointer;
    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        background 0.28s ease,
        opacity 0.28s ease;
}

.rsvp-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(245, 213, 166, 0.62);
    background: #701129;
    box-shadow: 0 11px 22px rgba(65, 3, 18, 0.24);
}

.rsvp-submit:disabled {
    cursor: wait;
    opacity: 0.72;
}

.rsvp-message {
    min-height: 26px;
    margin-top: 10px;
    font-size: 0.86rem;
    font-weight: 700;
    color: #4f0b1b;
}

.rsvp-message.error {
    color: #8d1734;
}

.rsvp-message.success {
    animation: rsvpSuccess 0.7s ease both;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.main-btn,
.music-btn {
    min-width: 148px;
    border-radius: 999px;
    padding: 12px 28px;
    font-family: inherit;
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        background 0.28s ease;
}

.main-btn {
    border: none;
    color: #fff8ee;
    background: linear-gradient(135deg, #4b0717, #8d1734);
    box-shadow: 0 12px 26px rgba(65, 3, 18, 0.36);
}

.music-btn {
    color: #fff8ee;
    border: 1px solid rgba(245, 210, 175, 0.5);
    background: rgba(75, 7, 23, 0.86);
    box-shadow: 0 10px 22px rgba(65, 3, 18, 0.24);
}

.main-btn:hover,
.music-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(65, 3, 18, 0.48);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.72;
    }
    50% {
        opacity: 1;
    }
}

@keyframes chandelierFloat {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}

@keyframes curtainSway {
    0%, 100% {
        transform: translateX(-50%) rotate(0deg);
    }
    50% {
        transform: translateX(-50%) rotate(0.7deg);
    }
}

@keyframes candleFlicker {
    0%, 100% {
        opacity: 0.86;
        filter:
            drop-shadow(0 0 8px rgba(255, 207, 134, 0.5))
            drop-shadow(0 12px 16px rgba(56, 5, 15, 0.25));
    }
    40% {
        opacity: 1;
        filter:
            drop-shadow(0 0 15px rgba(255, 219, 153, 0.78))
            drop-shadow(0 0 28px rgba(255, 180, 94, 0.28))
            drop-shadow(0 12px 16px rgba(56, 5, 15, 0.25));
    }
    68% {
        opacity: 0.9;
    }
}

@keyframes flowersDrift {
    0%, 100% {
        transform: translateX(50%) translateY(0);
    }
    50% {
        transform: translateX(50%) translateY(-7px);
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}

@keyframes rsvpSuccess {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    55% {
        opacity: 1;
        transform: translateY(-2px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 700px) {
    .invite-page {
        padding: 8px;
    }

    .invitation-card {
        min-height: 96vh;
        border-radius: 18px;
        padding: 118px 18px 132px;
    }

    .invitation-card::before {
        inset: 9px;
        border-radius: 14px;
    }

    .decor-curtains {
        top: -8px;
        width: 138%;
    }

    .decor-chandelier {
        top: 16px;
        width: min(165px, 44vw);
    }

    .decor-flowers {
        bottom: -14px;
        width: 150%;
    }

    .decor-candles {
        bottom: 34px;
        width: min(104px, 27vw);
    }

    .decor-candles-left {
        left: 8px;
    }

    .decor-candles-right {
        right: 8px;
    }

    .verse {
        line-height: 1.9;
    }

    .details {
        grid-template-columns: 1fr;
        max-width: 360px;
    }

    .rsvp-form {
        max-width: 420px;
        padding: 16px 13px 14px;
        border-radius: 15px;
    }

    .rsvp-fields,
    .attendance-options {
        grid-template-columns: 1fr;
    }

    .attendance-option {
        border-radius: 12px;
    }

    .detail-item {
        border-inline-start: none;
        border-bottom: 1px solid rgba(92, 14, 25, 0.2);
    }

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

    .actions {
        gap: 8px;
    }

    .main-btn,
    .music-btn {
        min-width: 138px;
        padding: 11px 22px;
        font-size: 0.9rem;
    }
}

@media (max-width: 410px) {
    .invitation-card {
        padding-inline: 13px;
    }

    .decor-candles {
        opacity: 0.74;
    }

    .main-btn,
    .music-btn {
        width: 100%;
        max-width: 240px;
    }
}
