* { box-sizing: border-box; }

:root {
    --festive-saffron: #ff6a00;
    --festive-marigold: #ff9900;
    --festive-deep-red: #8e0e00;
    --festive-gold: #f59e0b;
    --festive-gold-light: #fef3c7;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --ig-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 10%, #fff7ed 0%, #fed7aa 100%);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: flex;
    justify-content: center;
    padding: 10px 14px 40px;
}

.hidden { display: none !important; }

/* ---------- Festive garland + lights strip ---------- */
.garland-strip {
    position: fixed;
    top: 0; left: 0; right: 0;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 6px;
    padding-top: 4px;
    z-index: 2;
    pointer-events: none;
    user-select: none;
}

.lights-strip {
    position: fixed;
    top: 26px; 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: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 7px 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(--festive-deep-red); background: var(--festive-deep-red); animation-delay: 0.4s; }
.lights-strip span:nth-child(3n)   { color: var(--festive-saffron); background: var(--festive-saffron); animation-delay: 0.8s; }

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

.app {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 440px;
    padding-top: 46px;
    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 20px rgba(142, 14, 0, 0.25);
    margin-bottom: 14px;
}

.hero-line {
    font-size: clamp(1.15rem, 5.5vw, 1.35rem);
    line-height: 1.35;
    font-weight: 800;
    color: var(--festive-deep-red);
    margin: 6px 0 10px;
}

.hero-line .diya { display: inline-block; }
.hero-line .diya::after { content: "🪔"; font-size: 1.1rem; }

.support-line {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 320px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ---------- Step card (Instagram follow gate) ---------- */
.step-card {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: var(--card-bg);
    border-radius: 18px;
    padding: 24px 20px;
    text-align: center;
    border: 1.5px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 8px 24px rgba(142, 14, 0, 0.08);
    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: 32px;
    height: 28px;
    background: linear-gradient(160deg, var(--festive-gold-light), var(--festive-gold));
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
    box-shadow: 0 4px 10px rgba(142, 14, 0, 0.25);
}
.modak::after {
    content: '';
    position: absolute;
    top: -6px; left: 50%;
    transform: translateX(-50%);
    width: 6px; height: 9px;
    background: #6b8e23;
    border-radius: 3px;
}

.step-icon {
    width: 58px;
    height: 58px;
    background: var(--ig-gradient);
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    box-shadow: 0 6px 16px rgba(220, 39, 67, 0.35);
}

.step-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 6px;
}

.step-sub {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin: 0 0 20px;
}

/* ---------- Buttons ---------- */
.ig-btn, .continue-btn, .skip-btn, .share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    padding: 13px 18px;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    outline: none;
    line-height: 1.3;
    text-align: center;
    transition: all 0.2s ease;
}

.ig-btn {
    background: var(--ig-gradient);
    color: #fff;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(220, 39, 67, 0.28);
}
.ig-btn:active { transform: scale(0.98); }

.continue-btn {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    margin-bottom: 10px;
}
.continue-btn.active,
.continue-btn:not(:disabled) {
    background: linear-gradient(135deg, var(--festive-saffron), var(--festive-marigold));
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.35);
    animation: festiveGlow 1.6s infinite ease-in-out;
}
.continue-btn.active:active { transform: scale(0.98); }

@keyframes festiveGlow {
    0% { box-shadow: 0 0 0 0 rgba(255, 106, 0, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(255, 106, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 106, 0, 0); }
}

.skip-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid #d1d5db;
    cursor: pointer;
    min-height: 44px;
    font-weight: 600;
}
.skip-btn:hover { background: #f3f4f6; color: #374151; }
.skip-btn:active { transform: scale(0.98); }

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

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

.field input {
    width: 100%;
    background: #fff;
    border: 1.5px solid #f3d9b0;
    color: var(--text-main);
    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: #b3a798; }
.field input:focus {
    border-color: var(--festive-gold);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}
.field input.invalid { border-color: var(--festive-deep-red); }
.field input:disabled { opacity: 0.55; }

/* ---------- Terms & Conditions checkbox ---------- */
.tnc-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
    border: 1.5px solid #f3d9b0;
    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-saffron);
    cursor: pointer;
}
.tnc-row span {
    font-size: 0.76rem;
    line-height: 1.4;
    color: var(--text-muted);
}
.tnc-row input:disabled { opacity: 0.5; cursor: not-allowed; }

.form-error {
    font-size: 0.8rem;
    color: var(--festive-deep-red);
    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-deep-red);
    z-index: 5;
    filter: drop-shadow(0 3px 8px rgba(142, 14, 0, 0.5));
}

.wheel-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 11px;
    background: conic-gradient(from 0deg, var(--festive-gold), var(--festive-deep-red), var(--festive-saffron), var(--festive-gold));
    box-shadow: 0 0 0 6px #fff, 0 20px 45px rgba(142, 14, 0, 0.25), 0 0 40px rgba(245,158,11,0.25);
}

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

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

.hub-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: linear-gradient(145deg, var(--festive-deep-red), #6b0a00);
    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(142, 14, 0, 0.4), 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, #d1d5db, #9ca3af);
    color: #f3f4f6;
    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(142, 14, 0, 0.4), 0 0 0 0 rgba(245,158,11,0.5); }
    50% { box-shadow: 0 8px 24px rgba(142, 14, 0, 0.5), 0 0 0 12px rgba(245,158,11,0); }
}

.fine-print {
    font-size: 0.78rem;
    color: var(--festive-deep-red);
    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: var(--text-muted);
    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: #fff;
    border: 2px dashed var(--festive-gold);
    border-radius: 16px;
    padding: 22px 18px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(142, 14, 0, 0.1);
}

.result-card-brand {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--festive-deep-red);
    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: var(--text-muted); 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-saffron); }
.result-code-label { font-size: 0.68rem; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 6px; }
.result-code {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: #fff7ed;
    border: 1.5px dashed var(--festive-deep-red);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 12px;
}
.result-note { font-size: 0.75rem; color: var(--text-muted); margin-top: 14px; }

/* ---------- Festive thank-you card ---------- */
.thankyou-card {
    margin-top: 16px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #fffbeb 0%, #fed7aa 100%);
    border: 1.5px solid var(--festive-gold);
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.18);
}
.thankyou-badge {
    display: inline-block;
    background: var(--festive-deep-red);
    color: #fff9e6;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 8px;
}
.thankyou-card h3 {
    color: var(--festive-deep-red);
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 6px;
}
.thankyou-card p {
    color: #4b2a1a;
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0;
}

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

.share-btn {
    background: #25d366;
    color: #06280f;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
    margin-top: 14px;
    cursor: pointer;
}
.share-btn:active { transform: scale(0.97); }
.share-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.share-hint {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
}

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

.app-footer a {
    color: var(--festive-deep-red);
    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-saffron); }
