* { box-sizing: border-box; }

:root {
    --brand-blue: #0c2d78;
    --brand-blue-light: #163e9e;
    --brand-red: #d6293a;
    --brand-red-dark: #a11c2a;
    --festive-gold: #f2b90f;
    --festive-gold-soft: #ffd75e;
    --ink: #f4f2ff;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 0%, rgba(214,41,58,0.18) 0%, transparent 45%),
        radial-gradient(circle at 50% 100%, rgba(242,185,15,0.10) 0%, transparent 55%),
        linear-gradient(180deg, #050b1e 0%, #071033 45%, #050a1d 100%);
    color: var(--ink);
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* ---------- Festive rangoli pattern overlay (subtle, tasteful, low opacity) ---------- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.16;
    background-image:
        radial-gradient(circle, var(--festive-gold) 1.5px, transparent 1.6px),
        radial-gradient(circle, var(--brand-red) 1.5px, transparent 1.6px);
    background-size: 46px 46px, 46px 46px;
    background-position: 0 0, 23px 23px;
}

/* soft corner mandala glows, top and bottom, purely decorative */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 8% 6%, rgba(242,185,15,0.16) 0%, transparent 22%),
        radial-gradient(circle at 92% 8%, rgba(214,41,58,0.14) 0%, transparent 22%),
        radial-gradient(circle at 12% 96%, rgba(214,41,58,0.12) 0%, transparent 20%),
        radial-gradient(circle at 90% 94%, rgba(242,185,15,0.14) 0%, transparent 20%);
}

.hidden { display: none !important; }

/* ---------- Marigold garland strip (scalloped, festive gold/orange) ---------- */
.garland-strip {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 16px;
    z-index: 2;
    pointer-events: none;
    background-image: radial-gradient(circle at 50% 0%, #ff9f1c 0 6px, transparent 7px);
    background-size: 26px 16px;
    background-repeat: repeat-x;
    background-position: 0 -6px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4));
}

/* ---------- Festive string lights strip ---------- */
.lights-strip {
    position: fixed;
    top: 14px; left: 0; right: 0;
    height: 22px;
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
    padding-top: 4px;
    z-index: 1;
    pointer-events: none;
}
.lights-strip span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    box-shadow: 0 0 8px 3px currentColor;
    animation: twinkle 1.8s ease-in-out infinite;
}
.lights-strip span:nth-child(3n+1) { color: var(--festive-gold); background: var(--festive-gold); animation-delay: 0s; }
.lights-strip span:nth-child(3n+2) { color: var(--brand-red); background: var(--brand-red); animation-delay: 0.4s; }
.lights-strip span:nth-child(3n)   { color: #4fc3f7; background: #4fc3f7; animation-delay: 0.8s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.45; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* ---------- Diya (lamp) decorative accents ---------- */
.diya {
    display: inline-block;
    width: 22px;
    height: 16px;
    position: relative;
    vertical-align: middle;
}
.diya::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 12px;
    background: linear-gradient(160deg, var(--festive-gold-soft), var(--festive-gold));
    border-radius: 0 0 50% 50% / 0 0 70% 70%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.diya::after {
    content: '';
    position: absolute;
    top: -6px; left: 50%;
    transform: translateX(-50%);
    width: 5px; height: 9px;
    background: radial-gradient(circle, #fff6d8 0%, #ffb347 55%, transparent 80%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 1.4s ease-in-out infinite;
}
@keyframes flicker {
    0%, 100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

.app {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 430px;
    padding: 40px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---------- Header ---------- */
.app-header { text-align: center; margin-bottom: 20px; }

.brand-logo {
    width: clamp(56px, 20vw, 84px);
    height: clamp(56px, 20vw, 84px);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 3px var(--festive-gold), 0 8px 24px rgba(0,0,0,0.5);
    margin-bottom: 14px;
}

.hero-line {
    font-size: clamp(1.15rem, 5.5vw, 1.5rem);
    line-height: 1.3;
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
    background: linear-gradient(90deg, var(--festive-gold-soft), var(--festive-gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.support-line {
    font-size: 0.85rem;
    color: #c7c9e8;
    line-height: 1.5;
    margin: 0;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Step cards (Instagram follow) ---------- */
.step-card {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: linear-gradient(160deg, var(--brand-blue) 0%, #081d54 100%);
    border: 1.5px solid rgba(242,185,15,0.35);
    border-radius: 20px;
    padding: 26px 22px;
    text-align: center;
    box-shadow: 0 14px 34px rgba(0,0,0,0.45);
    margin-top: 6px;
}

/* subtle gold "modak" motif in the corner — a simple rounded-dome sweet shape, not a deity depiction */
.modak {
    position: absolute;
    top: -14px;
    right: 16px;
    width: 34px;
    height: 30px;
    background: linear-gradient(160deg, var(--festive-gold-soft), var(--festive-gold));
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}
.modak::after {
    content: '';
    position: absolute;
    top: -6px; left: 50%;
    transform: translateX(-50%);
    width: 6px; height: 10px;
    background: #6b8e23;
    border-radius: 3px;
}

.step-icon {
    font-size: 2.1rem;
    color: #e1306c;
    margin-bottom: 10px;
}

.step-card h2 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #fff;
}

.step-sub {
    font-size: 0.82rem;
    color: #c7c9e8;
    margin: 0 0 20px;
}

.ig-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.3px;
    padding: 14px 12px;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(221, 42, 123, 0.4);
    margin-bottom: 14px;
}

.continue-btn {
    width: 100%;
    background: transparent;
    border: 1.5px solid var(--festive-gold);
    color: var(--festive-gold-soft);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}
.continue-btn:not(:disabled):hover { background: rgba(242,185,15,0.1); }
.continue-btn:disabled { opacity: 0.4; cursor: not-allowed; border-color: #4a4468; color: #7a7398; }

/* ---------- Form ---------- */
.entry-form {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 6px auto 26px;
}

.field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #a9a3c9;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.field input {
    width: 100%;
    background: #101a3d;
    border: 1.5px solid #26346e;
    color: #fff;
    font-size: 1rem;
    padding: 13px 16px;
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder { color: #6b74a3; }

.field input:focus {
    border-color: var(--festive-gold);
    box-shadow: 0 0 0 3px rgba(242, 185, 15, 0.2);
}

.field input.invalid { border-color: var(--brand-red); }
.field input:disabled { opacity: 0.55; }

/* ---------- Terms & Conditions checkbox ---------- */
.tnc-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #101a3d;
    border: 1.5px solid #26346e;
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
}

.tnc-row input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--festive-gold);
    cursor: pointer;
}

.tnc-row span {
    font-size: 0.76rem;
    line-height: 1.4;
    color: #b8b2d6;
}

.tnc-row input:disabled { opacity: 0.5; cursor: not-allowed; }

.form-error {
    font-size: 0.8rem;
    color: #ff8fa3;
    text-align: center;
}

/* ---------- Wheel ---------- */
.wheel-stage {
    position: relative;
    width: 320px;
    max-width: 88vw;
    aspect-ratio: 1 / 1;
    margin: 6px auto 10px;
}

.wheel-pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 27px solid var(--festive-gold);
    z-index: 5;
    filter: drop-shadow(0 3px 8px rgba(242, 185, 15, 0.6));
}

.wheel-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 11px;
    background: conic-gradient(from 0deg, var(--festive-gold), var(--brand-red), var(--brand-blue-light), var(--festive-gold));
    box-shadow: 0 0 0 6px #081025, 0 24px 50px rgba(0,0,0,0.6), 0 0 45px rgba(242,185,15,0.2);
}

#wheel-svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    background: #0a1230;
    transform: rotate(0deg);
    transition: none;
}

.wheel-seg-text {
    fill: #fff;
    font-weight: 700;
    font-size: 13px;
    text-anchor: middle;
    dominant-baseline: middle;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.hub-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid #081025;
    background: linear-gradient(145deg, var(--brand-red), var(--brand-red-dark));
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(214, 41, 58, 0.55), inset 0 1px 0 rgba(255,255,255,0.25);
    z-index: 4;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.hub-btn:not(:disabled):active { transform: translate(-50%, -50%) scale(0.94); }

.hub-btn:disabled {
    background: linear-gradient(145deg, #2c2f43, #191b2b);
    color: #6b74a3;
    box-shadow: none;
    cursor: not-allowed;
}

.hub-btn.ready {
    animation: hub-pulse 1.6s ease-in-out infinite;
}

@keyframes hub-pulse {
    0%, 100% { box-shadow: 0 8px 20px rgba(214, 41, 58, 0.55), 0 0 0 0 rgba(242,185,15,0.5); }
    50% { box-shadow: 0 8px 24px rgba(214, 41, 58, 0.7), 0 0 0 12px rgba(242,185,15,0); }
}

.fine-print {
    font-size: 0.78rem;
    color: var(--festive-gold-soft);
    font-weight: 700;
    text-align: center;
    margin-top: 12px;
    max-width: 300px;
    line-height: 1.5;
}
.fine-print-sub {
    display: block;
    font-size: 0.68rem;
    color: #7a7398;
    font-weight: 400;
    margin-top: 3px;
}

/* ---------- Result ---------- */
.result-panel {
    width: 100%;
    max-width: 340px;
    text-align: center;
    margin-top: 18px;
    animation: pop-in 0.35s ease;
}

@keyframes pop-in {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* This card (only) is what gets captured as the shareable screenshot */
.result-card {
    background: linear-gradient(160deg, var(--brand-blue) 0%, #081d54 100%);
    border: 1.5px solid var(--festive-gold);
    border-radius: 18px;
    padding: 22px 20px;
}

.result-card-brand {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--festive-gold-soft);
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.result-emoji { font-size: 2.4rem; margin-bottom: 4px; color: var(--festive-gold); }
.result-heading { font-size: 0.8rem; color: #c7c9e8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.result-title { font-size: 1.3rem; font-weight: 800; margin: 6px 0 14px; color: var(--festive-gold-soft); }
.result-code-label { font-size: 0.68rem; color: #9aa0d0; letter-spacing: 1px; margin-bottom: 6px; }
.result-code {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: #060d24;
    border: 1.5px dashed var(--festive-gold);
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
}
.result-note { font-size: 0.75rem; color: #9aa0d0; margin-top: 14px; }

/* ---------- Share on WhatsApp ---------- */
.share-actions { margin-top: 16px; }

.share-btn {
    width: 100%;
    background: #25d366;
    color: #06280f;
    border: none;
    border-radius: 14px;
    padding: 13px 16px;
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(37, 211, 102, 0.35);
    transition: transform 0.15s ease;
}
.share-btn:active { transform: scale(0.97); }
.share-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.share-hint {
    font-size: 0.68rem;
    color: #9aa0d0;
    margin-top: 8px;
    line-height: 1.4;
}

/* ---------- Footer / Location ---------- */
.app-footer { margin-top: 30px; text-align: center; }

.app-footer a {
    color: #c7c9e8;
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px dashed var(--festive-gold);
    padding-bottom: 2px;
}
.app-footer a:hover { color: var(--festive-gold-soft); }
