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

:root {
    --navy-900: #0a1929;
    --navy-800: #0f2744;
    --navy-700: #14365e;
    --navy-600: #1e4976;
    --navy-500: #2563a3;

    --gold-500: #c9a96e;
    --gold-400: #d4b87f;
    --gold-300: #e2cd99;
    --gold-200: #f0e0bb;

    --cream: #f5f1e8;
    --text-light: #f5f1e8;
    --text-soft: #d4d8de;
    --text-muted: #8b9bb0;

    --card-bg: rgba(255, 255, 255, 0.04);
    --card-border: rgba(201, 169, 110, 0.18);
    --card-border-strong: rgba(201, 169, 110, 0.35);

    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.4);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);
    --shadow-gold: 0 8px 28px rgba(201, 169, 110, 0.25);
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background: var(--navy-900);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(30, 73, 118, 0.45), transparent 55%),
        radial-gradient(ellipse at 80% 80%, rgba(20, 54, 94, 0.5), transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(201, 169, 110, 0.06), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.page {
    display: none;
    min-height: 100vh;
    padding: 32px 18px;
    position: relative;
    z-index: 1;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.6s ease;
}

.page.active {
    display: flex;
}

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

.container {
    max-width: 720px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

.floating-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.25;
    animation: float 22s infinite ease-in-out;
}

.shape-1 {
    width: 320px;
    height: 320px;
    background: var(--navy-500);
    top: 8%;
    left: -12%;
}

.shape-2 {
    width: 280px;
    height: 280px;
    background: var(--gold-500);
    top: 60%;
    right: -12%;
    animation-delay: -5s;
    opacity: 0.15;
}

.shape-3 {
    width: 220px;
    height: 220px;
    background: var(--navy-600);
    bottom: 8%;
    left: 25%;
    animation-delay: -10s;
}

.shape-4 {
    width: 180px;
    height: 180px;
    background: var(--navy-700);
    top: 30%;
    right: 18%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -40px) scale(1.08); }
    66% { transform: translate(-30px, 30px) scale(0.95); }
}

.badge {
    display: inline-block;
    padding: 7px 18px;
    background: rgba(201, 169, 110, 0.12);
    border: 1px solid var(--card-border-strong);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
    color: var(--gold-300);
}

.photo-frame {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 28px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--card-border-strong);
    background: var(--navy-800);
    animation: photoFloat 5s ease-in-out infinite;
}

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

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

.photo-placeholder {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 18px;
    text-align: center;
    color: var(--text-muted);
}

.photo-frame.no-image .photo-placeholder {
    display: flex;
}

.photo-placeholder span {
    font-size: 44px;
    margin-bottom: 8px;
}

.photo-placeholder p {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 4px;
}

.photo-placeholder small {
    font-size: 10px;
    opacity: 0.7;
    word-break: break-word;
}

.slide-photo {
    width: 240px;
    height: 240px;
}

.main-title {
    margin-bottom: 10px;
    font-weight: 800;
    line-height: 1.2;
}

.main-title .line-1 {
    display: block;
    font-size: clamp(18px, 4vw, 26px);
    font-weight: 500;
    color: var(--text-soft);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.main-title .line-2 {
    display: block;
    font-size: clamp(28px, 6vw, 44px);
    color: var(--gold-300);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(20px, 3vw, 26px);
    color: var(--gold-400);
    margin-bottom: 28px;
    font-weight: 700;
}

.page-title {
    font-size: clamp(26px, 5vw, 38px);
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--gold-300);
}

.page-subtitle {
    color: var(--text-soft);
    font-size: 15px;
    margin-bottom: 28px;
}

.message-card {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 28px 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-soft);
    text-align: left;
}

.message-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 18px;
    text-align: center;
}

.message-text strong {
    color: var(--gold-300);
    font-weight: 700;
}

.message-text em {
    color: var(--gold-400);
    font-style: normal;
    font-weight: 600;
}

.message-text.small {
    font-size: 14px;
    color: var(--gold-300);
    font-weight: 600;
    margin-bottom: 0;
    margin-top: 14px;
}

.arabic-section {
    background: rgba(201, 169, 110, 0.06);
    border: 1px solid rgba(201, 169, 110, 0.22);
    border-radius: 14px;
    padding: 22px 18px;
    margin: 18px 0;
    text-align: center;
}

.arabic-text {
    font-family: 'Amiri', serif;
    font-size: clamp(20px, 4vw, 24px);
    line-height: 2;
    color: var(--gold-200);
    direction: rtl;
    margin-bottom: 12px;
    font-weight: 700;
}

.arabic-translation {
    font-size: 12.5px;
    font-style: italic;
    color: var(--text-soft);
    line-height: 1.6;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    border: none;
    border-radius: 100px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    color: var(--navy-900);
    letter-spacing: 0.3px;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: var(--navy-900);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    box-shadow: 0 12px 32px rgba(201, 169, 110, 0.4);
}

.btn-gift {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: var(--navy-900);
    box-shadow: var(--shadow-gold);
    margin-top: 16px;
}

.btn-gift:hover {
    box-shadow: 0 12px 32px rgba(201, 169, 110, 0.4);
}

.btn-yes {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: var(--navy-900);
    box-shadow: var(--shadow-gold);
    min-width: 130px;
}

.btn-yes:hover {
    box-shadow: 0 12px 32px rgba(201, 169, 110, 0.45);
    transform: translateY(-2px) scale(1.03);
}

.btn-no {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    min-width: 130px;
    backdrop-filter: blur(8px);
}

.btn-restart {
    background: transparent;
    color: var(--text-soft);
    border: 1px solid var(--card-border-strong);
    margin-top: 24px;
}

.btn-restart:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gold-300);
}

.btn-icon {
    font-size: 18px;
    display: inline-block;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: shine 3.5s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { left: -100%; }
    50%, 100% { left: 200%; }
}

.slideshow {
    position: relative;
    min-height: 460px;
    margin-bottom: 12px;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    position: relative;
}

.slide-title {
    font-size: clamp(20px, 3.5vw, 26px);
    font-weight: 700;
    margin: 14px 0 10px;
    color: var(--gold-300);
}

.slide-desc {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--text-light);
    max-width: 560px;
    margin: 0 auto;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 18px 20px;
}

.slide-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 18px 0 10px;
    flex-wrap: wrap;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border-strong);
    border-radius: 100px;
    color: var(--gold-300);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    min-width: 110px;
}

.btn-nav:hover {
    background: rgba(201, 169, 110, 0.12);
    color: var(--gold-200);
    transform: translateY(-1px);
}

.btn-nav:active {
    transform: translateY(0);
}

.btn-nav .nav-arrow {
    font-size: 18px;
    line-height: 1;
}

.slide-counter {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 600;
    min-width: 36px;
    letter-spacing: 0.5px;
}

.slide-counter span {
    color: var(--gold-300);
    font-weight: 700;
}

.slide-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 8px 0;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--gold-400);
    width: 26px;
    border-radius: 4px;
}

.progress-bar {
    width: 100%;
    max-width: 280px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    overflow: hidden;
    margin: 6px auto 20px;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-300));
    border-radius: 100px;
    transition: width 0.3s linear;
}

.gift-box-wrapper {
    margin: 20px auto 28px;
    perspective: 1000px;
}

.gift-box {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto;
    animation: giftWiggle 2.8s ease-in-out infinite;
}

@keyframes giftWiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

.gift-body {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 75%;
    background: linear-gradient(135deg, var(--navy-600), var(--navy-700));
    border-radius: 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.gift-lid {
    position: absolute;
    top: 0;
    width: 110%;
    left: -5%;
    height: 30%;
    background: linear-gradient(135deg, var(--navy-500), var(--navy-600));
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.gift-ribbon-v {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 100%;
    background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
}

.gift-ribbon-h {
    position: absolute;
    top: 30%;
    width: 100%;
    height: 12px;
    background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
}

.gift-bow {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 44px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.question-card {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 26px 22px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-soft);
}

.question-text {
    font-size: clamp(15px, 2.5vw, 18px);
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 10px;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.question-text.shake {
    animation: textShake 0.4s ease;
    color: var(--gold-300);
}

@keyframes textShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.question-sub {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

.button-group {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 60px;
}

.btn-no.escaping {
    position: fixed;
    z-index: 100;
    transition: top 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 0;
}

.celebration-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.petal, .confetti {
    position: absolute;
    pointer-events: none;
}

.petal {
    width: 16px;
    height: 16px;
    border-radius: 100% 0 100% 0;
    animation: fall linear forwards;
}

.confetti {
    width: 8px;
    height: 12px;
    animation: fallConfetti linear forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes fallConfetti {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

.container-thanks {
    position: relative;
    z-index: 2;
}

.yey-animation {
    margin-bottom: 12px;
}

.yey-text {
    display: inline-block;
    font-family: 'Dancing Script', cursive;
    font-size: clamp(44px, 9vw, 72px);
    font-weight: 700;
    color: var(--gold-300);
    animation: yeyBounce 0.8s ease;
}

@keyframes yeyBounce {
    0% { transform: scale(0) rotate(-10deg); opacity: 0; }
    60% { transform: scale(1.2) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.heart-icon {
    font-size: 56px;
    margin-bottom: 14px;
    animation: heartBeat 1.6s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25%, 75% { transform: scale(1.12); }
}

.thanks-title {
    font-size: clamp(26px, 5vw, 38px);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 22px;
    color: var(--gold-300);
}

.thanks-card {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.thanks-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 14px;
}

.signature {
    font-family: 'Dancing Script', cursive;
    font-size: 26px;
    font-weight: 700;
    color: var(--gold-300);
    margin-top: 18px;
}

@media (max-width: 768px) {
    .page {
        padding: 24px 14px;
    }

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

    .slide-photo {
        width: 220px;
        height: 220px;
    }

    .message-card,
    .question-card,
    .thanks-card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .arabic-section {
        padding: 18px 14px;
    }

    .btn {
        padding: 13px 24px;
        font-size: 14.5px;
    }

    .btn-yes,
    .btn-no {
        min-width: 120px;
    }

    .gift-box {
        width: 110px;
        height: 110px;
    }

    .slideshow {
        min-height: 500px;
    }

    .slide-desc {
        padding: 16px 16px;
        font-size: 14px;
    }

    .btn-nav {
        padding: 9px 14px;
        font-size: 13px;
        min-width: 96px;
    }
}

@media (max-width: 480px) {
    .page {
        padding: 20px 12px;
    }

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

    .slide-photo {
        width: 190px;
        height: 190px;
    }

    .message-card,
    .question-card,
    .thanks-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .badge {
        font-size: 11px;
        padding: 6px 14px;
        margin-bottom: 18px;
    }

    .main-title .line-2 {
        font-size: 26px;
    }

    .subtitle {
        font-size: 18px;
        margin-bottom: 22px;
    }

    .message-text,
    .thanks-text,
    .slide-desc {
        font-size: 14px;
    }

    .arabic-text {
        font-size: 19px;
        line-height: 1.9;
    }

    .arabic-translation {
        font-size: 11.5px;
    }

    .btn {
        padding: 12px 22px;
        font-size: 14px;
    }

    .button-group {
        gap: 12px;
    }

    .btn-yes,
    .btn-no {
        min-width: 110px;
        padding: 12px 18px;
    }

    .gift-box {
        width: 100px;
        height: 100px;
    }

    .gift-bow {
        font-size: 36px;
        top: -18px;
    }

    .slideshow {
        min-height: 480px;
    }

    .slide-title {
        font-size: 19px;
    }

    .heart-icon {
        font-size: 48px;
    }

    .yey-text {
        font-size: 42px;
    }

    .thanks-title {
        font-size: 24px;
    }

    .signature {
        font-size: 22px;
    }

    .slide-nav {
        gap: 8px;
    }

    .btn-nav {
        padding: 8px 12px;
        font-size: 12.5px;
        min-width: 86px;
    }

    .slide-counter {
        font-size: 12px;
    }
}
