:root {
    --card-bg: rgba(255, 250, 252, 0.96);
    --accent: #e11d48;
    --accent-dark: #9f1239;
    --text-main: #241920;
    --text-muted: #6b5662;
}

* {
    box-sizing: border-box;
}

html[dir="rtl"] body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #120f17;
    color: var(--text-main);
    overflow-x: hidden;
}

/* Top Controls Bar */
.top-bar {
    position: fixed;
    top: 14px;
    inset-inline-end: 16px;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mute-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(18, 15, 23, 0.82);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 0.95rem;
    padding: 7px 11px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mute-btn:hover {
    transform: scale(1.06);
}

.mute-btn.muted {
    opacity: 0.65;
}

.lang-switcher {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(18, 15, 23, 0.82);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.lang-btn {
    border: none;
    background: transparent;
    color: #e5deee;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-btn.active {
    background: #fb7185;
    color: #180910;
}

/* Stage 1: Curiosity Intro */
.intro-screen {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at top, #321b4f 0%, #110d18 72%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    overflow-y: auto;
}

.intro-screen.hidden {
    opacity: 0;
    transform: scale(1.03);
    pointer-events: none;
}

.intro-card {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 36px 24px 40px 26px;
    padding: 38px 26px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.5);
    margin: auto;
}

.shape-sticker {
    position: absolute;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1rem;
    font-weight: 800;
    animation: wobble 3.6s ease-in-out infinite;
}

.sticker-top {
    top: -14px;
    inset-inline-start: 22px;
    background: #fde047;
    color: #3b0764;
    transform: rotate(-10deg);
}

.sticker-bottom {
    bottom: -14px;
    inset-inline-end: 24px;
    background: #fb7185;
    color: #ffffff;
    transform: rotate(12deg);
}

@keyframes wobble {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-5px) rotate(8deg); }
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(251, 113, 133, 0.2);
    border: 1px solid rgba(251, 113, 133, 0.45);
    color: #fda4af;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.intro-card h1 {
    font-size: 1.65rem;
    line-height: 1.3;
    margin: 0 0 12px;
}

.intro-card p {
    color: #d8d0e8;
    font-size: 0.98rem;
    line-height: 1.5;
    margin: 0 0 24px;
}

.intro-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-curious {
    background: linear-gradient(135deg, #f43f5e, #fb7185);
    color: #ffffff;
    border: none;
    padding: 14px 22px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(244, 63, 94, 0.38);
    transition: transform 0.2s ease;
}

.btn-curious:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn-not-curious {
    background: transparent;
    color: #b7aed0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 11px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
}

.intro-tease {
    min-height: 22px;
    margin: 14px 0 0 !important;
    font-size: 0.9rem !important;
    color: #fda4af !important;
    font-weight: 600;
}

/* Custom Link Maker */
.btn-maker-toggle,
.btn-maker-secondary {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #fde047;
    border: 1.5px dashed rgba(253, 224, 71, 0.55);
    padding: 9px 18px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-maker-toggle:hover,
.btn-maker-secondary:hover {
    background: rgba(253, 224, 71, 0.18);
    transform: translateY(-1px);
}

.btn-maker-secondary {
    background: #fff1f2;
    color: var(--accent-dark);
    border-color: #fb7185;
    width: 100%;
}

.link-maker-panel {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(15, 11, 22, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    text-align: start;
}

.link-maker-panel.open {
    display: flex;
}

.maker-heading {
    margin: 0 0 2px !important;
    font-size: 0.95rem !important;
    font-weight: 700;
    color: #ffffff !important;
    text-align: center;
}

.maker-sounds-note {
    margin: 6px 0 0 !important;
    font-size: 0.82rem !important;
    color: #fde047 !important;
    font-weight: 600;
    line-height: 1.35;
}

.link-maker-panel label {
    color: #e9d5ff;
    font-size: 0.8rem;
}

.link-maker-panel input {
    padding: 9px 12px;
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.96);
    color: #1f141c;
    font-size: 0.9rem;
}

.btn-generate {
    margin-top: 6px;
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #1e1306;
    border: none;
    padding: 11px 16px;
    font-size: 0.92rem;
    font-weight: 800;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn-generate:hover {
    transform: scale(1.02);
}

.maker-feedback {
    min-height: 20px;
    margin: 4px 0 0 !important;
    font-size: 0.84rem !important;
    font-weight: 700;
    color: #86efac !important;
    text-align: center;
    word-break: break-all;
}

/* Stage 2 Split Background */
.split-stage {
    position: fixed;
    inset: 0;
    display: flex;
    z-index: 1;
    transition: all 0.5s ease;
}

.side-yes {
    flex: 1 1 50%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg, #fb7185 0%, #fda4af 52%, #ffe4e6 100%);
    transition: flex 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.side-no {
    flex: 1 1 50%;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 65% 25%, #3b0b16 0%, #17121c 58%, #0a080d 100%);
    transition: flex 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.blob {
    position: absolute;
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    pointer-events: none;
    animation: morphBlob 8s ease-in-out infinite alternate;
}

.blob-yes-1 {
    width: 240px;
    height: 240px;
    top: 12%;
    left: -60px;
    background: rgba(255, 255, 255, 0.28);
}

.blob-yes-2 {
    width: 170px;
    height: 170px;
    bottom: 18%;
    right: 8%;
    background: rgba(254, 240, 138, 0.32);
    animation-delay: -3s;
}

.blob-no-1 {
    width: 220px;
    height: 220px;
    top: 16%;
    right: -50px;
    background: rgba(244, 63, 94, 0.14);
}

.blob-no-2 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 10%;
    background: rgba(0, 0, 0, 0.32);
    animation-delay: -4s;
}

@keyframes morphBlob {
    0% {
        border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
        transform: translate(0, 0) scale(1);
    }
    100% {
        border-radius: 38% 62% 41% 59% / 46% 62% 38% 54%;
        transform: translate(12px, -14px) scale(1.08);
    }
}

.split-stage.no-active .side-no {
    flex: 1.15 1 57.5%;
    box-shadow: inset 0 0 85px rgba(244, 63, 94, 0.25);
}

.split-stage.no-active .side-yes {
    flex: 0.85 1 42.5%;
}

.split-stage.celebrate .side-no {
    flex: 0 0 0%;
    opacity: 0;
}

.split-stage.celebrate .side-yes {
    flex: 1 1 100%;
    background: linear-gradient(135deg, #f43f5e, #fb7185, #fecdd3);
}

.side-label {
    position: absolute;
    top: 64px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
}

.yes-label {
    inset-inline-start: 16px;
    background: rgba(255, 255, 255, 0.84);
    color: #9f1239;
}

.no-label {
    inset-inline-end: 16px;
    background: rgba(244, 63, 94, 0.16);
    border: 1px solid rgba(251, 113, 133, 0.45);
    color: #fda4af;
}

.side-banner {
    position: absolute;
    bottom: 20px;
    max-width: 260px;
    padding: 10px 14px;
    border-radius: 18px 10px 18px 10px;
    font-size: 0.82rem;
    line-height: 1.35;
    z-index: 2;
}

.yes-banner {
    inset-inline-start: 16px;
    background: rgba(255, 255, 255, 0.86);
    color: #881337;
    font-weight: 600;
}

.no-banner {
    inset-inline-end: 16px;
    background: rgba(14, 10, 16, 0.88);
    border: 1px solid rgba(251, 113, 133, 0.45);
    color: #fecdd3;
}

.floating-item {
    position: absolute;
    bottom: -36px;
    pointer-events: none;
    user-select: none;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.9);
        opacity: 0;
    }
    15% {
        opacity: 0.9;
    }
    85% {
        opacity: 0.85;
    }
    100% {
        transform: translateY(-110vh) rotate(22deg) scale(1.15);
        opacity: 0;
    }
}

/* Foreground Card */
.foreground-wrap {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 84px 16px 84px;
    pointer-events: none;
}

.card {
    position: relative;
    pointer-events: auto;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    padding: 36px 26px;
    border-radius: 36px 24px 38px 26px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
    max-width: 440px;
    width: 100%;
    text-align: center;
    border: 2.5px solid #ffffff;
}

.card-doodle {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    font-weight: 800;
    pointer-events: none;
}

.doodle-left {
    top: -13px;
    inset-inline-start: 22px;
    background: #fef08a;
    color: #9f1239;
    transform: rotate(-12deg);
}

.doodle-right {
    top: -13px;
    inset-inline-end: 22px;
    background: #fbcfe8;
    color: #881337;
    transform: rotate(14deg);
}

#questionTitle {
    color: var(--accent-dark);
    font-size: 1.95rem;
    line-height: 1.22;
    margin: 0 0 10px;
}

.question-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 20px;
}

.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 56px;
    margin-top: 8px;
}

#yesBtn,
.btn-submit {
    background: linear-gradient(135deg, #f43f5e, #be123c);
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 999px 22px 999px 22px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(190, 18, 60, 0.3);
    transition: transform 0.2s ease, border-radius 0.25s ease;
}

#yesBtn:hover,
.btn-submit:hover {
    transform: scale(1.05);
    border-radius: 22px 999px 22px 999px;
}

.attempt-pill {
    display: inline-block;
    margin-top: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #ffe4e6;
    border: 1.5px dashed #fb7185;
    color: var(--accent-dark);
    font-size: 0.82rem;
    font-weight: 700;
}

/* Separate Warning Box About Sender Notification */
.snitch-box {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 20px 12px 20px 12px;
    background: #fef9c3;
    border: 1.5px solid #facc15;
    color: #713f12;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.38;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: start;
}

.snitch-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Runaway No Button */
#noBtn {
    position: fixed;
    z-index: 20;
    pointer-events: auto;
    background: #191420;
    color: #fda4af;
    border: 1.5px solid #fb7185;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 20px 999px 20px 999px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* Form & Confirmation */
#dateForm {
    display: none;
    flex-direction: column;
    gap: 11px;
    margin-top: 12px;
    text-align: start;
}

.form-heading {
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 1.08rem;
    text-align: center;
    margin: 0 0 4px;
}

label {
    color: #483540;
    font-size: 0.88rem;
    font-weight: 700;
}

input[type="date"],
input[type="time"],
input[type="email"],
input[type="text"],
input[type="url"],
select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #fecdd3;
    border-radius: 18px;
    font-size: 0.98rem;
    background: #ffffff;
    outline: none;
}

input:focus,
select:focus {
    border-color: #f43f5e;
}

.custom-activity-wrap {
    display: none;
    flex-direction: column;
    gap: 6px;
}

.custom-activity-wrap.visible {
    display: flex;
}

.btn-submit {
    margin-top: 8px;
    width: 100%;
}

#confirmationMessage {
    display: none;
    color: var(--accent-dark);
    line-height: 1.55;
}

#confirmationMessage h2 {
    margin: 0 0 6px;
    color: #e11d48;
}

.confession-banner {
    margin-top: 10px;
    padding: 11px 14px;
    border-radius: 22px 12px 22px 12px;
    background: #ffe4e6;
    border: 1.5px solid #fb7185;
    color: #881337;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.4;
}

.summary-box {
    background: #fff1f2;
    border: 1.5px dashed #fda4af;
    border-radius: 22px;
    padding: 15px;
    margin-top: 12px;
    text-align: start;
    color: #36222c;
    font-size: 0.95rem;
}

.share-btn-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.whatsapp-btn,
.email-share-btn {
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 999px;
    display: inline-block;
    transition: transform 0.2s ease;
}

.whatsapp-btn {
    background: #22c55e;
}

.whatsapp-btn:hover {
    background: #16a34a;
    transform: scale(1.02);
}

.email-share-btn {
    background: #2563eb;
}

.email-share-btn:hover {
    background: #1d4ed8;
    transform: scale(1.02);
}

.notify-hint {
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .split-stage {
        flex-direction: column;
    }

    .side-yes,
    .side-no {
        flex: 1 1 50%;
    }

    .side-label {
        top: 58px;
        font-size: 0.7rem;
    }

    .side-banner {
        max-width: 185px;
        font-size: 0.75rem;
        bottom: 12px;
    }

    #questionTitle {
        font-size: 1.6rem;
    }
}