*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Inter', sans-serif;
    background: #07071f;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent scroll jank */
    -webkit-overflow-scrolling: touch;
}

/* ── STARS (disabled) ── */
#stars {
    display: none;
}

.s {
    display: none;
}

/* ── GLASS ── */
.glass {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-warm {
    background: rgba(251, 191, 36, 0.06);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(251, 191, 36, 0.15);
}

/* ── GRADIENTS ── */
.grad-text {
    background: linear-gradient(135deg, #fbbf24, #f97316, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.grad-btn {
    background: linear-gradient(135deg, #fbbf24, #f97316, #ec4899);
}

.grad-btn:hover {
    filter: brightness(1.1);
}

/* ── PROFILE RING ── */
.profile-ring-wrap {
    background: conic-gradient(#fbbf24, #f97316, #ec4899, #8b5cf6, #3b82f6, #10b981, #fbbf24);
    padding: 3px;
    border-radius: 50%;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.profile-ring-inner {
    background: #07071f;
    border-radius: 50%;
    padding: 4px;
}

/* ── PACKAGE CARD ── */
.pkg-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pkg-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.06);
}

.pkg-card.active {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.3), 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-4px);
}

/* ── SLOT PILL ── */
.slot-pill {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 10px 14px;
}

.slot-pill:hover:not(.taken) {
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.07);
}

.slot-pill.chosen {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
}

.slot-pill.taken {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(239, 68, 68, 0.3);
}

/* ── REVIEW CARD ── */
.review-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 18px;
}

/* ── MODAL ── */
#modal-wrap {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#modal-wrap.open {
    display: flex;
}

#modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

/* ── TOAST ── */
#toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
    transform: translateX(130%);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 300px;
    border-radius: 16px;
    padding: 14px 18px;
}

#toast.show {
    transform: translateX(0);
}

/* ── CONFETTI ── */
.cc {
    position: fixed;
    pointer-events: none;
    z-index: 500;
    border-radius: 2px;
    animation: fall linear forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-80px) rotate(0deg);
        opacity: 1
    }

    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0
    }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #07071f;
}

::-webkit-scrollbar-thumb {
    background: #fbbf24;
    border-radius: 3px;
}

/* ── INPUT ── */
.field {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.field::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.field:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

input[type="date"] {
    color-scheme: dark;
}

/* ── DURATION STEPPER ── */
.dur-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 8px 10px;
    transition: border-color 0.2s;
}

.dur-wrap:focus-within {
    border-color: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

.dur-num {
    width: 44px;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.dur-num::-webkit-inner-spin-button,
.dur-num::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dur-sep {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    font-size: 18px;
}

.dur-label {
    color: rgba(255, 255, 255, 0.35);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-top: 2px;
}

.dur-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 8px;
    width: 26px;
    height: 26px;
    color: #fbbf24;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dur-btn:hover {
    background: rgba(251, 191, 36, 0.2);
}

.dur-summary {
    transition: all 0.3s ease;
}

.slots-container {
    transition: all 0.35s ease;
}

.slot-end-time {
    font-size: 10px;
    color: rgba(251, 191, 36, 0.7);
    margin-top: 2px;
}

/* ── BADGE ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
}

/* ── STATUS DOT ── */
.dot-green {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5)
    }

    50% {
        box-shadow: 0 0 0 6px rgba(74, 222, 128, 0)
    }
}

/* ── STICKY HEADER ── */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 7, 31, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    /* GPU promote to own layer — prevents repaint jank on scroll */
    will-change: transform;
    transform: translateZ(0);
}

/* ══════════════════════
    MOBILE PERFORMANCE
══════════════════════ */
@media (max-width: 767px) {

    /* Disable costly backdrop-filter on mobile — biggest scroll glitch cause */
    .glass,
    .glass-warm {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(15, 15, 40, 0.92) !important;
    }

    /* Disable blur on sticky header too */
    header {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(7, 7, 31, 0.97) !important;
    }

    /* Disable heavy animations — reduces repaints while scrolling */
    .floating-moon {
        animation: none !important;
    }

    .animate-pulse-gold {
        animation: none !important;
    }

    /* Promote scrollable containers to GPU layer */
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* ══════════════════════
    MOBILE REDESIGN
══════════════════════ */
@media (max-width: 767px) {

    /* Floating moon — smaller on mobile */
    .floating-moon {
        font-size: 2rem;
        top: 4px;
        right: 10px;
    }

    /* Header — tighter */
    header {
        padding: 10px 14px;
    }

    /* Hero section — tighter top padding */
    .hero-section {
        padding-top: 14px !important;
        padding-bottom: 10px !important;
    }

    /* Ramadan badge — smaller */
    .ramadan-badge-wrap {
        margin-bottom: 14px !important;
    }

    .ramadan-badge-wrap .badge {
        font-size: 10px;
        padding: 4px 10px;
    }

    /* Profile card — compact */
    .profile-card {
        padding: 14px !important;
        border-radius: 20px !important;
    }

    .profile-inner {
        gap: 14px !important;
    }

    .profile-photo {
        width: 80px !important;
        height: 80px !important;
    }

    .profile-rating {
        font-size: 12px !important;
    }

    .profile-rating .stars {
        font-size: 12px !important;
    }

    /* Profile info text — smaller */
    .profile-info h1 {
        font-size: 1.7rem !important;
        margin-bottom: 2px !important;
    }

    .profile-subtitle {
        font-size: 13px !important;
        margin-bottom: 8px !important;
    }

    .profile-bio {
        font-size: 12px !important;
        margin-bottom: 12px !important;
    }

    .profile-badges {
        gap: 5px !important;
        margin-bottom: 10px !important;
    }

    .profile-badges .badge {
        font-size: 9px !important;
        padding: 3px 8px !important;
    }

    /* Stats grid — 4 cols on mobile too */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
    }

    .stats-grid>div {
        padding: 6px 4px !important;
    }

    .stats-grid p:first-child {
        font-size: 1rem !important;
    }

    .stats-grid p:last-child {
        font-size: 9px !important;
    }

    /* Social links — mobile alignment */
    .social-links {
        margin-top: 10px !important;
        gap: 8px !important;
    }

    .social-links a {
        width: 36px !important;
        height: 36px !important;
    }

    /* Status pill — smaller */
    .status-pill {
        padding: 5px 12px !important;
        font-size: 11px !important;
    }

    /* Booking section */
    .booking-section {
        padding-bottom: 14px !important;
    }

    /* Stepper — tighter */
    .stepper-wrap {
        margin-bottom: 14px !important;
    }

    /* Booking card — very compact */
    .booking-card {
        padding: 14px !important;
        border-radius: 20px !important;
        min-height: auto !important;
    }

    /* Step headings — smaller */
    .step-heading {
        font-size: 1.3rem !important;
    }

    .step-subtext {
        font-size: 11px !important;
    }

    /* Topic grid — 2 cols, compact pills */
    .topic-grid-wrap {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    .slot-pill {
        padding: 8px 10px !important;
        font-size: 11px !important;
        border-radius: 10px !important;
    }

    /* Special request textarea — smaller */
    .special-req-wrap textarea {
        font-size: 12px !important;
        padding: 10px 12px !important;
    }

    /* Time slots — 2 cols on small, 3 on wider mobile */
    #slots-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        max-height: 280px !important;
    }

    #slots-list>div {
        padding: 10px 6px !important;
        border-radius: 10px !important;
    }

    #slots-list>div span:first-child {
        font-size: 11px !important;
    }

    #slots-list>div span:last-child {
        font-size: 9px !important;
    }

    /* Nav buttons — full row, smaller */
    .nav-controls {
        margin-top: 16px !important;
        padding-top: 14px !important;
    }

    #btn-next,
    #btn-submit {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }

    #btn-back {
        font-size: 13px !important;
        padding: 10px 12px !important;
    }

    /* Step 3 — contact fields smaller */
    .contact-field {
        height: 42px !important;
        font-size: 11px !important;
    }

    /* Booking summary box — smaller */
    .booking-summary-box {
        padding: 12px !important;
        margin-bottom: 14px !important;
    }

    /* How it works — 2x2 grid on mobile */
    .how-works-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .how-works-grid>div {
        padding: 14px 10px !important;
        border-radius: 14px !important;
    }

    .how-works-grid>div .text-3xl {
        font-size: 1.5rem !important;
        margin-bottom: 6px !important;
    }

    .how-works-grid>div p:first-of-type {
        font-size: 11px !important;
    }

    .how-works-grid>div p:last-of-type {
        font-size: 10px !important;
    }

    /* Reviews — single column */
    .reviews-grid {
        grid-template-columns: 1fr !important;
    }

    .review-card {
        padding: 12px !important;
    }

    /* Hall of lonely bookings */
    .bookings-list .glass {
        padding: 10px 12px !important;
    }

    /* Footer — smaller */
    footer {
        padding-bottom: 20px !important;
        font-size: 10px !important;
    }
}

/* Slightly wider phones — 3 col slots */
@media (min-width: 400px) and (max-width: 767px) {
    #slots-list {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}