/* -------------------------------------------------------------
   ZEPETO REWARDS PLATFORM - MOBILE-FIRST METAVERSE THEME
   + INTEGRATED ORGANIZED OWNER ADMIN PANEL
-------------------------------------------------------------- */

:root {
    --bg-main: #0c0e17;
    --bg-card: rgba(20, 24, 42, 0.88);
    --bg-card-hover: rgba(28, 34, 60, 0.96);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(168, 85, 247, 0.35);

    --primary: #a855f7;
    --primary-glow: rgba(168, 85, 247, 0.5);
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.4);
    --accent-pink: #ec4899;
    --accent-gold: #f59e0b;
    --accent-green: #10b981;
    --accent-red: #ef4444;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --bottom-nav-height: 65px;
    --shadow-card: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
}

button, .btn, .chip, .mini-cta, .credit-pill, .task-card, .filter-pill, .lang-item, .nav-item {
    touch-action: manipulation;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-bottom: calc(var(--bottom-nav-height) + 1.5rem);
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(168, 85, 247, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 90% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
}

/* RTL Layout support */
body.rtl-layout {
    direction: rtl;
    text-align: right;
}

body.rtl-layout .brand,
body.rtl-layout .custom-gift-flex,
body.rtl-layout .task-card-top,
body.rtl-layout .admin-header-flex {
    flex-direction: row-reverse;
}

/* Lock top banner + bottom nav order in RTL: same visual order as English */
body.rtl-layout .header-inner,
body.rtl-layout .header-right,
body.rtl-layout .mobile-bottom-nav {
    direction: ltr;
}

body.rtl-layout .card-ribbon {
    right: auto;
    left: 12px;
}

/* Language menu is viewport-centered: no anchor edits needed per direction */

body.rtl-layout .btn-close-modal {
    right: auto;
    left: 1.2rem;
}

/* APP HEADER */
.app-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background:
        repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 9px),
        linear-gradient(180deg, rgba(28, 20, 52, 0.98) 0%, rgba(12, 14, 23, 0.96) 100%);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.35);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5), 0 1px 12px rgba(168, 85, 247, 0.25);
}

/* Gamer neon underglow line */
.app-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--accent-pink), var(--secondary));
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6), 0 0 18px rgba(168, 85, 247, 0.4);
    pointer-events: none;
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(6, 182, 212, 0.10));
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: 0.32rem 0.75rem 0.32rem 0.4rem;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.28), inset 0 0 12px rgba(168, 85, 247, 0.08);
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.35rem;
    box-shadow: 0 0 14px var(--primary-glow);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.brand-title span {
    background: linear-gradient(135deg, var(--primary), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--secondary);
    text-transform: uppercase;
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Language selector */
.lang-selector-wrap {
    position: relative;
}

.btn-lang {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.lang-dropdown {
    display: none;
    position: fixed;
    top: 66px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    max-width: calc(100vw - 2rem);
    max-height: 320px;
    max-height: 52vh;
    overflow-y: auto;
    background: #141727;
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: 0.4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
    z-index: 500;
}

.lang-dropdown.show {
    display: block;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.7rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.lang-item:hover, .lang-item.active {
    background: rgba(168, 85, 247, 0.2);
    color: white;
}

/* Credit Pill */
.credit-pill {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(236, 72, 153, 0.18));
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 0.85rem;
}

.credit-val {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: #ffd166;
}

.credit-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Ticker Bar */
.ticker-bar {
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding: 0.25rem 1rem;
    font-size: 0.75rem;
    overflow: hidden;
}

.ticker-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse 1.6s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.4); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.ticker-content {
    color: var(--text-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* News marquee always flows left-to-right (even in RTL languages) */
.ticker-viewport,
.ticker-track {
    direction: ltr;
}
.ticker-bar {
    overflow: hidden;
    min-height: 28px;
}

.ticker-viewport {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.ticker-track {
    display: inline-flex;
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.66rem;
    animation: ticker-scroll 70s linear infinite;
    will-change: transform;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Calm single-item mode for reduced-motion users (driven by JS) */
.ticker-track.ticker-static {
    animation: none;
    transition: opacity 0.35s ease;
}

/* ---- COMPETITIONS ---- */
/* Password field with show/hide eye */
.pw-wrap {
    position: relative;
}

.pw-wrap input {
    width: 100%;
    padding-inline-end: 2.4rem;
}

.pw-eye {
    position: absolute;
    inset-inline-end: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.05rem;
    cursor: pointer;
    padding: 0.25rem;
}

#tabCompete .view-header { border: 2px solid rgba(168, 85, 247, 0.6); background: linear-gradient(135deg, rgba(168, 85, 247, 0.14), rgba(14, 20, 40, 0.96)); }
#tabCompete .view-header h2 { color: #c084fc; font-size: 1.45rem; }
#tabCompete .view-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: #a855f7;
}
#tabCompete .view-header h2::before {
    content: "";
    display: inline-block;
    width: 11px;
    height: 11px;
    transform: rotate(45deg);
    margin-inline-end: 0.55rem;
    vertical-align: 1px;
    background: #a855f7;
}
#tabCompete .view-header h2::before {
    content: "";
    display: inline-block;
    width: 11px;
    height: 11px;
    transform: rotate(45deg);
    margin-inline-end: 0.55rem;
    vertical-align: 1px;
    background: #a855f7;
}

.compete-lock {
    text-align: center;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(6, 182, 212, 0.06));
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 2rem 1.25rem;
}

.compete-lock .lock-icon { font-size: 2.6rem; }
.compete-lock h3 { font-family: var(--font-heading); font-size: 1.2rem; margin: 0.4rem 0; }
.compete-lock p { color: var(--text-muted); font-size: 0.85rem; }
.lock-lvl { margin-top: 0.6rem; font-size: 0.9rem; }
.lock-lvl strong { color: var(--accent-gold); font-size: 1.1rem; }

.compete-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.compete-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; }
.compete-head h3 { font-family: var(--font-heading); font-size: 1.05rem; }
.compete-type {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--secondary);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: var(--radius-full);
    padding: 0.1rem 0.55rem;
    margin-top: 0.25rem;
}
.compete-prize { font-size: 0.8rem; font-weight: 800; color: var(--accent-gold); white-space: nowrap; }
.compete-ends { font-size: 0.72rem; color: var(--text-dim); margin: 0.35rem 0 0.6rem; }
.compete-status {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.8rem;
    margin-top: 0.4rem;
}
.board-list { display: flex; flex-direction: column; gap: 0.35rem; }
.board-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.65rem;
    font-size: 0.83rem;
}
.board-row.rank-1 { border-color: rgba(255, 209, 102, 0.6); background: rgba(255, 209, 102, 0.07); }
.board-row.rank-2 { border-color: rgba(203, 213, 225, 0.5); background: rgba(203, 213, 225, 0.06); }
.board-row.rank-3 { border-color: rgba(249, 168, 100, 0.5); background: rgba(249, 168, 100, 0.06); }
.board-rank { font-weight: 900; min-width: 28px; text-align: center; }
.board-name { flex: 1; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-pts { color: var(--accent-gold); }
.board-mine {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--secondary);
    background: rgba(6, 182, 212, 0.08);
    border: 1px dashed rgba(6, 182, 212, 0.4);
    border-radius: var(--radius-sm);
    padding: 0.35rem;
    margin-bottom: 0.5rem;
}

/* ---- FIRST-TIME TOUR ---- */
.tour-veil {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(4, 6, 12, 0.72);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.tour-card {
    background: #151829;
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-arrow { font-size: 1.8rem; animation: how-bounce 1.2s ease-in-out infinite; }
.tour-count { font-size: 0.7rem; color: var(--text-dim); font-weight: 800; letter-spacing: 1px; }
.tour-card h3 { font-family: var(--font-heading); font-size: 1.1rem; margin: 0.3rem 0; }
.tour-card p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.55; }
.tour-actions { display: flex; gap: 0.6rem; margin-top: 1rem; }
.tour-actions .btn { flex: 1; }

.tour-glow {
    outline: 2px solid var(--secondary) !important;
    outline-offset: 3px;
    border-radius: var(--radius-md);
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.55) !important;
}

/* Six tabs fit phones: squeeze the bottom bar */
@media (max-width: 480px) {
    .nav-item { font-size: 0.62rem; padding: 0.35rem 0.4rem; gap: 0.1rem; }
    .nav-item i { font-size: 1.1rem; }
}

/* Sandbox QR button in header (temporary, removed when hosted online) */
.qr-header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-main);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Language code chip inside dropdown rows */
.lang-code {    font-family: ui-monospace, monospace;
    font-size: 0.68rem;
    font-weight: 800;
    background: rgba(6, 182, 212, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 6px;
    padding: 0.1rem 0.4rem;
    min-width: 34px;
    text-align: center;
}

/* Short auth label (Join) — hidden on desktop, shown on phones */
.auth-btn-short {
    display: none;
}

/* Logged-in username never breaks the banner */
.auth-username {
    display: inline-block;
    max-width: 76px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

/* Stylish logout confirm */
.logout-sheet {
    text-align: center;
}

.logout-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

/* ---- USER SETTINGS DRAWER ---- */
.drawer-veil {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1900;
    display: none;
}

.user-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: min(320px, 85vw);
    background: #141727;
    border-left: 1px solid var(--border-glow);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.6);
    z-index: 2000;
    transform: translateX(105%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1.25rem 1.1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
}

.user-drawer.open {
    transform: translateX(0);
}

.drawer-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 900;
    color: #fff;
    margin: 0.4rem 0 0.6rem;
    box-shadow: 0 0 16px var(--primary-glow);
}

.user-drawer h3 { font-family: var(--font-heading); font-size: 1.1rem; }
.drawer-email { color: var(--text-dim); font-size: 0.78rem; margin: 0.15rem 0 0.9rem; word-break: break-all; }
.drawer-id-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; color: var(--text-muted); background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 0.4rem 0.6rem; margin-bottom: 0.4rem; }
.drawer-id-row strong { color: var(--text); letter-spacing: 0.04em; }
.btn-mini-copy { border: 1px solid rgba(255,255,255,0.14); background: rgba(124,58,237,0.25); color: #fff; border-radius: 8px; padding: 0.25rem 0.5rem; cursor: pointer; font-size: 0.75rem; }
.btn-mini-copy:active { transform: scale(0.94); }
.drawer-level-row { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); }
.drawer-level-row strong { color: var(--accent-gold); font-size: 1rem; }
.lvl-bar { height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: var(--radius-full); margin: 0.4rem 0 0.25rem; overflow: hidden; }
.lvl-bar div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-gold), var(--accent-pink)); border-radius: var(--radius-full); transition: width 0.4s; }
#drawerLvlNext { color: var(--text-dim); font-size: 0.72rem; }
.drawer-credits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.9rem;
    padding: 0.6rem;
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.10);
    border-radius: var(--radius-md);
    color: var(--accent-gold);
    font-size: 1rem;
}

/* Daily-task gate on the wheel */
.spin-req-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #a5f3fc;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.35);
    border-radius: var(--radius-md);
    padding: 0.55rem 0.8rem;
    margin-bottom: 0.7rem;
}

/* Locked wheel: lights off until daily tasks are done */
.wheel-container.locked .wheel-disc {
    filter: grayscale(1) brightness(0.55);
}

.wheel-container.locked #btnSpinWheel {
    opacity: 0.45;
}

/* Phone Wi-Fi Notice Bar */
.phone-link-bar {
    background: rgba(6, 182, 212, 0.12);
    border-bottom: 1px solid rgba(6, 182, 212, 0.25);
    padding: 0.3rem 1rem;
    font-size: 0.75rem;
    color: #38bdf8;
    text-align: center;
}

.phone-link-bar code {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    color: #ffd166;
    font-weight: 700;
}

/* Guest notice bar */
.guest-bar {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.2), rgba(6, 182, 212, 0.15));
    border-bottom: 1px solid rgba(168, 85, 247, 0.25);
    padding: 0.35rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #cbd5e1;
}

.btn-link-action {
    background: var(--primary);
    border: none;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-full);
    cursor: pointer;
}

/* MAIN CONTENT */
.app-main-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem 1rem;
    width: 100%;
}

.mobile-hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 1.4rem 1.1rem 1.3rem 1.1rem;
    margin: 3rem 0 3rem 0;
    background:
        radial-gradient(40% 35% at 85% 8%, rgba(6, 182, 212, 0.28), transparent 70%),
        radial-gradient(45% 42% at 8% 92%, rgba(236, 72, 153, 0.24), transparent 70%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 26px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 26px),
        radial-gradient(120% 140% at 50% -20%, rgba(168, 85, 247, 0.30), transparent 60%),
        linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(6, 182, 212, 0.08));
    border: 1.5px solid rgba(236, 72, 153, 0.55);
    outline: 1px solid rgba(236, 72, 153, 0.40);
    outline-offset: 3px;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 36px rgba(236, 72, 153, 0.50), 0 0 58px rgba(168, 85, 247, 0.30), inset 0 0 28px rgba(168, 85, 247, 0.12);
}

/* Pink-violet neon frame (static gradient ring: zero per-frame cost) */
.mobile-hero::after {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: inherit;
    padding: 2.5px;
    background: conic-gradient(from 20deg, #ec4899, #a855f7, #f472b6, #8b5cf6, #ec4899);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.55);
    pointer-events: none;
    z-index: 3;
}

/* Neon power button (top corner of the hero box) */
.neon-power-btn {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    z-index: 6;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glow);
    color: var(--gold);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 209, 102, 0.25);
}

.neon-power-btn.off {
    opacity: 0.4;
    box-shadow: none;
}

/* Neon OFF state: only the neon frame goes plain, everything else keeps playing */
.mobile-hero.neon-off {
    border-color: var(--border-color);
    outline: none;
    box-shadow: none;
}

.mobile-hero.neon-off::after {
    display: none;
}

/* Traveling comet orbiting the hero frame (JS-driven random drift; transform = GPU cheap) */
.hero-orbit {
    position: absolute;
    inset: -7px;
    z-index: 4;
    pointer-events: none;
}

.hero-comet {
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 12px 4px rgba(236, 72, 153, 0.9), 0 0 26px 10px rgba(168, 85, 247, 0.45);
}

/* Light sweep across the hero box (transform-only: GPU cheap) */
.mobile-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.09), transparent);
    transform: translateX(-130%);
    animation: hero-shine 4.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hero-shine {
    0% { transform: translateX(-130%); }
    55%, 100% { transform: translateX(330%); }
}

/* Floating decorations inside the hero box */
.hero-deco {
    position: absolute;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(255, 209, 102, 0.5));
    animation: hero-float 3.6s ease-in-out infinite;
    z-index: 1;
}

.hero-deco.hd1 { top: 10%; left: 5%; font-size: 1.6rem; }
.hero-deco.hd2 { top: 14%; right: 6%; font-size: 1.2rem; animation-delay: 1.2s; }
.hero-deco.hd3 { bottom: 8%; right: 10%; font-size: 1.4rem; animation-delay: 2.1s; }
.hero-deco.hd4 { bottom: 10%; left: 5%; font-size: 1.5rem; animation-delay: 0.6s; animation-duration: 4.2s; }
.hero-deco.hd5 { top: 44%; right: 2%; font-size: 1.3rem; animation-delay: 1.7s; animation-duration: 3.1s; }
.hero-deco.hd6 { top: 46%; left: 2%; font-size: 1.3rem; animation-delay: 2.6s; animation-duration: 4.6s; }

@keyframes hero-float {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-9px) rotate(6deg); }
}

/* Respect users who prefer less motion (also helps weak phones) */
@media (prefers-reduced-motion: reduce) {
    .mobile-hero::after,
    .mobile-hero::before,
    .hero-deco,
    .hero-title,
    .hero-title .gradient-text,
    .how-btn i,
    .tour-arrow,
    .reward-graphic,
    .ticker-track {
        animation: none;
    }
}

.mobile-hero .hero-eyebrow,
.mobile-hero .hero-title,
.mobile-hero .hero-desc {
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    display: inline-block;
    font-family: ui-monospace, monospace;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--secondary);
    background: rgba(6, 182, 212, 0.10);
    border: 1px solid rgba(6, 182, 212, 0.45);
    border-radius: 999px;
    padding: 0.32rem 0.9rem;
    margin-bottom: 0.7rem;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.15rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.05;
    margin-bottom: 0.55rem;
    text-wrap: balance;
    animation: hero-pulse 2.6s ease-in-out infinite;
}

@keyframes hero-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.035); }
}

/* Shimmer sweep across the hero title + neon glow (cheap: no filter pass) */
.hero-title .gradient-text {
    background-size: 200% auto;
    animation: title-shimmer 8s linear infinite;
    text-shadow: 0 0 18px rgba(192, 132, 252, 0.35);
}

/* Hero brand slogan + How-it-works button */
.hero-slogan {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #e9e4ff;
    letter-spacing: 0.3px;
    margin-bottom: 0.9rem;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}

.how-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(6, 182, 212, 0.10);
    border: 1px solid rgba(6, 182, 212, 0.55);
    color: #a5f3fc;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.25);
}

.how-btn i {
    display: inline-block;
    animation: how-bounce 1.6s ease-in-out infinite;
}

@keyframes how-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.15); }
}

.how-btn-wrap {
    text-align: center;
    margin: 0 0 1rem 0;
}

.how-steps {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 1.1rem 0 0.4rem;
    text-align: left;
}

.how-step {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.8rem 0.9rem;
}

.how-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent-pink));
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.how-step strong { color: #fff; font-size: 0.9rem; display: block; margin-bottom: 0.15rem; }
.how-step p { color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; }

/* Distinct decorative colors per section header */
#tabTasks .view-header { border: 2px solid rgba(34, 211, 238, 0.6); background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(14, 20, 40, 0.96)); }
#tabTasks .view-header h2 { color: #67e8f9; font-size: 1.45rem; }
#tabShop .view-header { border: 2px solid rgba(255, 209, 102, 0.6); background: linear-gradient(135deg, rgba(255, 209, 102, 0.12), rgba(14, 20, 40, 0.96)); }
#tabShop .view-header h2 { color: #ffd166; font-size: 1.45rem; }
#tabDaily .view-header { border: 2px solid rgba(244, 114, 182, 0.6); background: linear-gradient(135deg, rgba(244, 114, 182, 0.12), rgba(14, 20, 40, 0.96)); }
#tabDaily .view-header h2 { color: #f9a8d4; font-size: 1.45rem; }
#tabOrders .view-header { border: 2px solid rgba(52, 211, 153, 0.6); background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(14, 20, 40, 0.96)); }
#tabOrders .view-header h2 { color: #6ee7b7; font-size: 1.45rem; }

/* Matte KPI-style side bars + drawn diamond bullets (no glow, no emoji) */
.view-header {
    position: relative;
    overflow: hidden;
}

#tabTasks .view-header::before, #tabShop .view-header::before,
#tabDaily .view-header::before, #tabOrders .view-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}

#tabTasks .view-header::before { background: #22d3ee; }
#tabShop .view-header::before { background: #ffd166; }
#tabDaily .view-header::before { background: #f472b6; }
#tabOrders .view-header::before { background: #34d399; }

.view-header h2::before {
    content: "";
    display: inline-block;
    width: 11px;
    height: 11px;
    transform: rotate(45deg);
    margin-inline-end: 0.55rem;
    vertical-align: 1px;
}

#tabTasks .view-header h2::before { background: #22d3ee; }
#tabShop .view-header h2::before { background: #ffd166; }
#tabDaily .view-header h2::before { background: #f472b6; }
#tabOrders .view-header h2::before { background: #34d399; }
#tabDaily .view-header { border-color: rgba(244, 114, 182, 0.55); box-shadow: 0 0 14px rgba(244, 114, 182, 0.22), inset 0 0 16px rgba(244, 114, 182, 0.06); }
#tabDaily .view-header h2 { color: #f9a8d4; }
#tabOrders .view-header { border-color: rgba(52, 211, 153, 0.55); box-shadow: 0 0 14px rgba(52, 211, 153, 0.22), inset 0 0 16px rgba(52, 211, 153, 0.06); }
#tabOrders .view-header h2 { color: #6ee7b7; }

@keyframes title-shimmer {
    to { background-position: 200% center; }
}

.gradient-text {
    background: linear-gradient(135deg, #c084fc, #38bdf8, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: #d9d2f2;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1.55;
    max-width: 46ch;
    margin: 0 auto;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.hero-desc::before {
    content: "✦";
    display: block;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 209, 102, 0.9);
    font-size: 0.8rem;
    margin-bottom: 0.45rem;
}

/* TAB VIEWS */
.mobile-tab-view {
    display: none;
    scroll-margin-top: 150px;
}

.mobile-tab-view.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

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

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(6, 182, 212, 0.06));
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.15), inset 0 0 16px rgba(168, 85, 247, 0.05);
}

.view-header h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
}

.view-header .subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.balance-badge {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #ffd166;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
}

.task-filter-chips {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
}

.chip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.chip.active, .chip:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: var(--primary);
    color: white;
}

/* REFERRAL MINI-BANNER */
.referral-mini-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(6, 182, 212, 0.14));
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.ref-mini-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ref-mini-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.referral-mini-card h4 {
    font-size: 0.92rem;
    color: white;
}

.referral-mini-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ★ #1 CUSTOM ITEM HERO CARD ★ */
.custom-gift-hero-card {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(168, 85, 247, 0.18));
    border: 2px solid rgba(236, 72, 153, 0.4);
    border-radius: var(--radius-lg);
    padding: 2rem 1.25rem 1.25rem 1.25rem;
    position: relative;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 25px rgba(236, 72, 153, 0.2);
}

/* Amber mismatch warning inside the gift modal */
.gift-warn {
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fcd34d;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    margin: 0.9rem 0 1.2rem 0;
}

.custom-gift-hero-card:active {
    transform: scale(0.98);
}

.card-ribbon {
    position: absolute;
    top: 10px;
    right: 12px;
    background: linear-gradient(135deg, var(--accent-pink), #f43f5e);
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.5);
    letter-spacing: 0.5px;
}

.custom-gift-flex {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.custom-gift-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-pink), var(--primary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.5);
}

.custom-gift-details h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: white;
    margin-bottom: 0.2rem;
}

.custom-gift-details p {
    color: #e2e8f0;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.custom-gift-perks {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 0.7rem;
    color: var(--secondary);
    font-weight: 700;
}

.custom-gift-perks span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.catalog-section-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* OFFERWALL BANNER */
.offerwall-banner-card {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(6, 182, 212, 0.35);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    margin-bottom: 1.25rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.offerwall-banner-card:active {
    transform: scale(0.99);
}

.offerwall-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--accent-gold);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.4rem;
}

.offerwall-banner-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: white;
    margin-bottom: 0.25rem;
}

.offerwall-banner-card p {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

/* TASK GRID & CARDS */
.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.85rem;
}

.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.8rem;
    transition: all 0.2s;
}

.task-card-top {
    display: flex;
    gap: 0.8rem;
}

.task-icon {
    width: 40px;
    height: 40px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.task-cat {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--secondary);
    font-weight: 800;
    display: block;
}

.task-card h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: white;
    line-height: 1.3;
}

.task-card p {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.4;
    margin-top: 0.2rem;
}

.task-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.65rem;
}

.reward-pts {
    color: var(--accent-gold);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* REWARD GRID */
.reward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.85rem;
}

/* Two compact packs per row on phones */
@media (max-width: 640px) {
    .reward-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    .reward-item-card {
        padding: 0.8rem 0.55rem;
    }
    .reward-graphic {
        font-size: 1.6rem;
        margin: 0.35rem 0;
    }
    .reward-item-card h4 {
        font-size: 0.8rem;
    }
    .reward-amount {
        font-size: 1.05rem;
    }
    .reward-badge-tag {
        font-size: 0.52rem;
        padding: 0.1rem 0.4rem;
        top: 6px;
        right: 6px;
    }
}

/* Floating gems + rotating decorative borders per card */
.reward-graphic {
    animation: gem-float 3.4s ease-in-out infinite;
}

.reward-item-card:nth-child(2n) .reward-graphic { animation-delay: 0.9s; }
.reward-item-card:nth-child(3n) .reward-graphic { animation-delay: 1.7s; }

@keyframes gem-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

.reward-item-card:nth-child(3n+1) { border-color: rgba(34, 211, 238, 0.5); box-shadow: 0 0 14px rgba(34, 211, 238, 0.18); }
.reward-item-card:nth-child(3n+2) { border-color: rgba(255, 209, 102, 0.5); box-shadow: 0 0 14px rgba(255, 209, 102, 0.18); }
.reward-item-card:nth-child(3n) { border-color: rgba(244, 114, 182, 0.5); box-shadow: 0 0 14px rgba(244, 114, 182, 0.18); }

.reward-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s;
}

.reward-item-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.reward-badge-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid var(--primary);
    color: #c084fc;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
}

.reward-graphic {
    font-size: 2.2rem;
    margin: 0.5rem 0;
}

.gem-cyan { color: #38bdf8; text-shadow: 0 0 12px #38bdf8; }
.gem-purple { color: #c084fc; text-shadow: 0 0 12px #c084fc; }
.gem-gold { color: #fbbf24; text-shadow: 0 0 12px #fbbf24; }
.gem-pink { color: #f472b6; text-shadow: 0 0 12px #f472b6; }
.gift-pink { color: #f472b6; }
.gift-purple { color: #c084fc; }
.gift-gold { color: #fbbf24; }
.gift-blue { color: #38bdf8; }

.reward-item-card h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.reward-amount {
    font-size: 1.4rem;
    font-weight: 900;
    color: #38bdf8;
    margin-bottom: 0.4rem;
}

.reward-cost {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.reward-cost strong {
    color: var(--accent-gold);
}

/* LUCKY WHEEL */
.wheel-container {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.wheel-box {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 1.5rem auto;
}

.wheel-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.2rem;
    color: var(--accent-gold);
    z-index: 10;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.8));
}

.wheel-disc {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid #2d3748;
    position: relative;
    overflow: hidden;
    transition: transform 4s cubic-bezier(0.15, 0.9, 0.2, 1);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.35);
    background: conic-gradient(
        #7c3aed 0deg 45deg,
        #2563eb 45deg 90deg,
        #db2777 90deg 135deg,
        #059669 135deg 180deg,
        #d97706 180deg 225deg,
        #7c3aed 225deg 270deg,
        #2563eb 270deg 315deg,
        #db2777 315deg 360deg
    );
}

.wheel-slice {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: bottom right;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.82rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.slice-1 { transform: rotate(22.5deg); }
.slice-2 { transform: rotate(67.5deg); }
.slice-3 { transform: rotate(112.5deg); }
.slice-4 { transform: rotate(157.5deg); }
.slice-5 { transform: rotate(202.5deg); }
.slice-6 { transform: rotate(247.5deg); }
.slice-7 { transform: rotate(292.5deg); }
.slice-8 { transform: rotate(337.5deg); }

.btn-spin {
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    padding: 0.85rem;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.wheel-msg {
    margin-top: 0.75rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent-gold);
    min-height: 25px;
}

.spin-locked-card {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

.spin-locked-card .lock-icon {
    font-size: 1.5rem;
    color: var(--accent-red);
}

.spin-locked-card h4 {
    margin-top: 0.3rem;
    color: white;
    font-size: 0.95rem;
}

.spin-locked-card p {
    color: #e2e8f0;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

/* ORDERS LIST */
.orders-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-row-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.order-row-card h4 {
    font-size: 0.95rem;
    color: white;
}

.order-status-badge {
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-pending { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.4); }
.status-completed { background: rgba(16, 185, 129, 0.2); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.4); }
.status-processing { background: rgba(59, 130, 246, 0.2); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.4); }
.status-rejected { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.4); }

/* =============================================================
   INTEGRATED OWNER ADMIN PANEL STYLES (CLEAN, TIDY, NO MESS)
============================================================== */
.admin-clean-header {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.admin-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.admin-header-flex h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: white;
}

.admin-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stat-pill {
    background: #0d0f1b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.6rem;
    text-align: center;
}

.stat-pill-lbl {
    display: block;
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 700;
}

.stat-pill-val {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
}

.admin-segmenter {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    background: #0b0d18;
    padding: 0.3rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.seg-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.seg-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.adm-sub-view {
    display: none;
}

.adm-sub-view.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.section-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-sub-header h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: white;
}

.sub-hint {
    font-size: 0.72rem;
    color: var(--text-dim);
    display: block;
}

/* CLEAN ORDER CARDS */
.adm-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.adm-order-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.2s;
}

.adm-order-card:hover {
    border-color: var(--primary);
}

.adm-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.adm-order-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: white;
}

.adm-recipient-id {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    display: block;
    margin-top: 0.15rem;
}

.adm-card-details {
    font-size: 0.8rem;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.1);
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.65rem;
    word-break: break-all;
}

.adm-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.65rem;
    gap: 0.5rem;
}

.adm-price-tag {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.adm-settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.egypt-guide-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.egypt-guide-box h3 {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 1rem;
}

.roadmap-item {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 1.1rem;
    align-items: flex-start;
}

.rm-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--secondary), #0284c7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.roadmap-item strong {
    font-size: 0.88rem;
    color: white;
    display: block;
    margin-bottom: 0.2rem;
}

.roadmap-item p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* MOBILE BOTTOM NAV */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: var(--bottom-nav-height);
    background: rgba(13, 16, 28, 0.97);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 300;
    padding: 0.2rem 0.5rem;
}

/* Decorative gamer top edge on the bottom bar */
.mobile-bottom-nav::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-pink), var(--primary), var(--secondary), var(--accent-pink));
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.55), 0 0 22px rgba(6, 182, 212, 0.30);
    pointer-events: none;
}

.nav-item.active {
    color: var(--primary);
    background: rgba(168, 85, 247, 0.10);
    border-radius: var(--radius-md);
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.4rem 0.7rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.nav-item:active {
    transform: scale(0.9);
}

.nav-item i {
    font-size: 1.25rem;
    transition: transform 0.2s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px var(--primary));
}

.nav-admin-btn {
    color: var(--secondary);
}

.nav-admin-btn.active {
    color: var(--secondary);
}

.nav-admin-btn.active i {
    filter: drop-shadow(0 0 8px var(--secondary));
}

.mini-badge {
    position: absolute;
    top: 2px;
    right: 6px;
    background: var(--accent-pink);
    color: white;
    font-size: 0.6rem;
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-full);
}

/* BUTTONS */
.btn {
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
}

.btn-glow {
    background: linear-gradient(135deg, var(--primary), #9333ea);
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-glow:active {
    transform: scale(0.97);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

.btn-block {
    width: 100%;
}

/* MODALS - MOBILE SHEET STYLE */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
}

.modal-backdrop.show {
    display: flex;
    animation: fadeIn 0.2s ease forwards;
}

.modal-sheet {
    background: #141727;
    border-top: 1px solid var(--border-glow);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1.5rem 1.25rem 2.5rem 1.25rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    max-height: 88dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.btn-close-modal {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
}

.auth-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.2rem;
    width: fit-content;
}

.auth-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.auth-tab-btn.active {
    background: var(--primary);
    color: white;
}

.modal-header-desc h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.modal-header-desc p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 1.2rem;
}

.modal-icon-header {
    font-size: 2.2rem;
    color: var(--accent-pink);
    margin-bottom: 0.4rem;
}

.modal-icon-header.gem {
    color: #38bdf8;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 1.2rem;
}

.form-group {
    margin-bottom: 0.85rem;
}

.form-group label {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background: #0a0c16;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    color: white;
    font-size: 0.88rem;
    outline: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.helper-text {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
    display: block;
}

.cost-callout {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.cost-callout strong {
    color: var(--accent-gold);
    font-size: 1.05rem;
}

/* AD MODAL & OFFERWALL */
.mock-video-area {
    background: #090a12;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: center;
    margin: 1rem 0;
}

.ad-pulse-icon {
    font-size: 2.5rem;
    color: var(--primary);
    animation: pulse 1.5s infinite;
}

.ad-progress-bar {
    height: 6px;
    background: #1c2236;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 0.8rem;
}

.ad-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.1s linear;
}

.task-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timer-badge {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.offerwall-iframe-wrap {
    min-height: 250px;
    background: #0a0c16;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* TOAST */
.toast-popup {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 1rem);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e243d;
    border: 1px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    white-space: nowrap;
    max-width: 90vw;
    pointer-events: none;
}

.toast-popup.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #2b3147; transition: .3s;
    border-radius: 34px;
}
.slider:before {
    position: absolute; content: "";
    height: 16px; width: 16px; left: 4px; bottom: 4px;
    background-color: white; transition: .3s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--accent-green); }
input:checked + .slider:before { transform: translateX(20px); }

.copy-input-group { display: flex; }
.copy-input-group input {
    flex: 1; background: #0b0d17; border: 1px solid var(--border-color);
    border-right: none; border-radius: var(--radius-md) 0 0 var(--radius-md);
    padding: 0.65rem 0.85rem; color: white; font-size: 0.85rem; outline: none;
}
.btn-copy {
    background: var(--primary); color: white; border: none;
    padding: 0 1rem; border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-weight: 700; cursor: pointer;
}
.share-buttons { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; }
.btn-share {
    border: none; padding: 0.6rem; border-radius: var(--radius-sm);
    color: white; font-size: 0.75rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.3rem;
}
.share-wa { background: #25d366; }
.share-tt { background: #010101; border: 1px solid #333; }
.share-dc { background: #5865f2; }

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.text-gold { color: var(--accent-gold); }
.text-blue { color: var(--secondary); }
.text-pink { color: var(--accent-pink); }
.text-cyan { color: #38bdf8; }

/* =================================================== */
/* PHONE CONNECT NOTICE & MODAL                        */
/* =================================================== */
.phone-link-bar {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.12), rgba(168, 85, 247, 0.12));
    border-bottom: 1px solid rgba(6, 182, 212, 0.25);
    padding: 0.45rem 1rem;
}
.phone-link-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    max-width: 960px;
    margin: 0 auto;
    font-size: 0.78rem;
    flex-wrap: wrap;
}
.phone-link-inner code {
    background: #000;
    color: #38bdf8;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}
.btn-phone-connect {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 0.25rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.qr-box-card {
    background: #0a0d18;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    margin: 1rem 0;
}
.phone-qr-img {
    width: 170px;
    height: 170px;
    margin: 0 auto;
    border-radius: var(--radius-sm);
    background: white;
    padding: 8px;
    display: block;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
.qr-url-box {
    margin-top: 0.75rem;
}
.url-lbl {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: block;
}
.url-text {
    font-size: 1.05rem;
    color: #38bdf8;
    font-family: monospace;
    display: block;
    margin: 0.2rem 0;
}

.phone-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    text-align: left;
    margin-top: 0.75rem;
}
.step-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
}
.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.step-item strong {
    font-size: 0.82rem;
    color: white;
    display: block;
}
.step-item p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    line-height: 1.35;
}

/* =================================================== */
/* INTEGRATED ADMIN PANEL (UNDER THE WEBSITE!)         */
/* =================================================== */
.admin-under-dock {
    margin-top: 2.5rem;
    margin-bottom: 2rem;
    background: #0d101d;
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 15px rgba(168, 85, 247, 0.1);
    overflow: hidden;
}

.admin-dock-header {
    background: linear-gradient(90deg, #161b2e 0%, #1e1533 100%);
    border-bottom: 1px solid rgba(168, 85, 247, 0.25);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-dock-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-crown-badge {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.admin-dock-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.admin-dock-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0.15rem 0 0 0;
}

.admin-dock-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.btn-xs {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.admin-dock-body {
    padding: 1.25rem;
}

/* 4 HIGH-IMPACT KPI METRIC CARDS */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .admin-kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.kpi-card {
    background: #121626;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.kpi-card .kpi-icon {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
}

.kpi-gold .kpi-icon { color: var(--accent-gold); }
.kpi-gold { border-left: 3px solid var(--accent-gold); }

.kpi-blue .kpi-icon { color: var(--secondary); }
.kpi-blue { border-left: 3px solid var(--secondary); }

.kpi-pink .kpi-icon { color: var(--accent-pink); }
.kpi-pink { border-left: 3px solid var(--accent-pink); }

.kpi-cyan .kpi-icon { color: #38bdf8; }
.kpi-cyan { border-left: 3px solid #38bdf8; }

.kpi-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.03em;
    display: block;
}

.kpi-val {
    font-size: 1.3rem;
    font-weight: 900;
    color: white;
    display: block;
    line-height: 1.2;
    margin: 0.2rem 0;
}

.kpi-gold .kpi-val { color: var(--accent-gold); }
.kpi-blue .kpi-val { color: var(--secondary); }
.kpi-pink .kpi-val { color: var(--accent-pink); }
.kpi-cyan .kpi-val { color: #38bdf8; }

.kpi-tag {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
}

/* CLEAN ADMIN NAVIGATION TABS */
.admin-clean-nav {
    display: flex;
    gap: 0.4rem;
    background: #080a12;
    padding: 0.35rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

.adm-nav-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.15s;
}

.adm-nav-btn:hover {
    color: white;
}

.adm-nav-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.35);
}

.seg-counter {
    background: var(--accent-gold);
    color: #000;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-full);
}

.adm-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.adm-sub-header h4 {
    font-size: 1rem;
    color: white;
    margin: 0;
    font-family: var(--font-heading);
}

.adm-order-filters {
    display: flex;
    gap: 0.35rem;
}

.filter-pill {
    background: #161b2e;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.15s;
}

.filter-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* CLEAN ORDER CARDS */
.adm-order-card {
    background: #121627;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    padding: 0.95rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.adm-order-card:hover {
    border-color: var(--primary);
}

.adm-order-card.status-pending {
    border-left: 4px solid var(--accent-gold);
}

.adm-order-card.status-completed {
    border-left: 4px solid var(--accent-green);
}

.adm-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.adm-order-badge {
    background: #1f253d;
    color: #c084fc;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

.adm-zepeto-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.35);
    color: #38bdf8;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 800;
}

.btn-copy-id {
    background: transparent;
    border: none;
    color: #38bdf8;
    cursor: pointer;
    padding: 0 0.2rem;
    font-size: 0.8rem;
}

.btn-copy-id:hover {
    color: white;
}

.adm-order-details {
    margin: 0.5rem 0;
}

.adm-order-item-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: white;
}

.adm-order-item-desc {
    font-size: 0.78rem;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.08);
    border-left: 2px solid var(--accent-gold);
    padding: 0.35rem 0.6rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 0.35rem;
    word-break: break-all;
}

.adm-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.65rem;
    margin-top: 0.65rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.adm-order-cost {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.adm-order-cost strong {
    color: var(--accent-gold);
}

.btn-deliver-order {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.38rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-deliver-order:hover {
    background: #059669;
}

/* SETTINGS GRID */
.adm-settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

@media (min-width: 640px) {
    .adm-settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* =================================================== */
/* OWNER-ONLY INTEGRATED ADMIN (hidden from users)     */
/* Revealed ONLY when the page is opened via the admin link */
/* =================================================== */
#integratedAdminHub,
.nav-admin-btn {
    display: none !important;
}

html.admin-view #integratedAdminHub {
    display: block !important;
}

html.admin-view .nav-admin-btn {
    display: flex !important;
}

/* =================================================== */
/* PHONE HEADER COMPACT (most visitors are on phones)  */
/* Shrinks the top bar so logo + language + credits +  */
/* sign-up ALL fit on a 360-390px phone screen         */
/* =================================================== */
@media (max-width: 480px) {
    .header-inner {
        padding: 0.55rem 0.6rem;
        gap: 0.35rem;
    }
    .brand {
        gap: 0.45rem;
        flex-shrink: 0;
        padding: 0.25rem 0.55rem 0.25rem 0.3rem;
    }
    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1.05rem;
    }
    .brand-title {
        font-size: 0.95rem;
    }
    .brand-subtitle {
        font-size: 0.52rem;
        letter-spacing: 0.8px;
    }
    .header-right {
        gap: 0.4rem;
    }
    .btn-lang {
        padding: 0.3rem 0.5rem;
        font-size: 0.72rem;
    }
    .btn-lang i {
        display: none;
    }
    .credit-pill {
        padding: 0.3rem 0.55rem;
        font-size: 0.8rem;
    }
    .credit-lbl {
        display: none;
    }
    #authBox .btn {
        padding: 0.35rem 0.55rem;
        max-width: 110px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .auth-btn-txt {
        display: none;
    }
    .auth-btn-short {
        display: inline;
    }
}

/* Very narrow phones (≤380px): squeeze the header so nothing clips */
@media (max-width: 380px) {
    .header-inner {
        padding: 0.5rem;
        gap: 0.25rem;
    }
    .header-right {
        gap: 0.25rem;
    }
    .brand {
        padding: 0.22rem 0.45rem 0.22rem 0.28rem;
        gap: 0.35rem;
    }
    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 0.95rem;
    }
    .brand-title {
        font-size: 0.88rem;
    }
    .brand-subtitle {
        display: none;
    }
    .btn-lang {
        padding: 0.28rem 0.42rem;
        font-size: 0.68rem;
    }
    .qr-header-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    .credit-pill {
        padding: 0.28rem 0.45rem;
        font-size: 0.75rem;
    }
    .credit-pill i {
        display: none;
    }
    #authBox .btn {
        padding: 0.3rem 0.45rem;
        font-size: 0.7rem;
    }
    .auth-username {
        max-width: 44px;
    }
    .btn-link-action {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Compact hero on phones: half height, tighter padding (kept last so it wins) */
@media (max-width: 480px) {
    .mobile-hero {
        padding: 1.1rem 1rem;
        min-height: 230px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .hero-title {
        font-size: 2.4rem;
    }
    .hero-slogan {
        font-size: 1.0rem;
    }
    .how-btn-wrap {
        margin: 0.5rem 0 0.6rem 0;
    }
}

/* Owner broadcast banner */
.cast-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.20), rgba(236, 72, 153, 0.15));
    border-bottom: 1px solid rgba(245, 158, 11, 0.4);
    padding: 0.4rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffe9b8;
}

.cast-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Floating support chat button */
#chatFab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 1rem);
    right: 1rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 1px solid var(--border-glow);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 500;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 16px var(--primary-glow);
}

#chatFab .mini-badge {
    position: absolute;
    top: -2px;
    right: -2px;
}

/* Chat panel + message bubbles */
.chat-sheet { max-width: 500px; }
.chat-thread-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.8rem;
    min-height: 180px;
    max-height: 40vh;
    max-height: 40dvh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.chat-msg {
    max-width: 82%;
    padding: 0.45rem 0.7rem;
    border-radius: 12px;
    font-size: 0.83rem;
    line-height: 1.45;
    word-break: break-word;
}

.chat-msg.me {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), #9333ea);
    color: #fff;
}

.chat-msg.them {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

/* Drawer notification inbox */
.drawer-section { margin-top: 1.1rem; }
.drawer-sec-title { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 800; color: var(--text-muted); margin-bottom: 0.5rem; }
.drawer-notif-list { display: flex; flex-direction: column; gap: 0.45rem; max-height: 30vh; overflow-y: auto; }
.notif-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.65rem;
    cursor: pointer;
}
.notif-row.unseen { border-color: var(--border-glow); background: rgba(168, 85, 247, 0.08); }
.notif-row strong { font-size: 0.8rem; display: block; }
.notif-row p { font-size: 0.74rem; color: var(--text-muted); }

/* Tutorial video + poll cards */
.video-card, .poll-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

.video-card { display: flex; align-items: center; gap: 0.9rem; }
.video-thumb { font-size: 2.4rem; color: var(--accent-red); flex-shrink: 0; }
.video-card h4 { font-size: 0.95rem; }
.poll-card h4 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.poll-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; margin-top: 0.4rem; }
.poll-row span { flex-shrink: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-bar { flex: 1; height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: var(--radius-full); overflow: hidden; }
.poll-bar div { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); }
.poll-row strong { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

/* Owner hub lock: content hidden until password verified */
#adminPanelBody.locked > :not(#adminLock) { display: none !important; }
.admin-lock-card { max-width: 420px; margin: 1rem auto; }
.admin-lock-err { color: #f87171; }

/* Spotlight tour: bright ring on target (never dimmed), small tip nearby */
#tourSpot { position: fixed; z-index: 2000; pointer-events: none; display: none; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(3, 1, 12, 0.72), 0 0 0 2px var(--accent-gold, #f5b942), 0 0 22px rgba(245, 185, 66, 0.55); }
#tourTip { position: fixed; z-index: 2001; display: none; background: #171233; border: 1px solid rgba(124, 58, 237, 0.65); border-radius: 14px; padding: 0.8rem 0.9rem; color: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55); }
#tourTip.show { display: block; }
#tourTip h4 { margin: 0 0 0.25rem; font-size: 0.95rem; }
#tourTip p { margin: 0 0 0.6rem; font-size: 0.8rem; opacity: 0.8; }
#tourTip::before { content: ""; position: absolute; left: 50%; width: 12px; height: 12px; background: #171233; border: 1px solid rgba(124, 58, 237, 0.65); transform: translateX(-50%) rotate(45deg); }
#tourTip[data-arrow="up"]::before { top: -7px; border-right: 0; border-bottom: 0; }
#tourTip[data-arrow="down"]::before { bottom: -7px; border-left: 0; border-top: 0; }
.tour-tip-center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(300px, calc(100vw - 48px)) !important; text-align: center; }
.tour-tip-center::before { display: none; }
.tour-count { font-size: 0.7rem; opacity: 0.6; margin-bottom: 0.2rem; }
.tour-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.tour-tip-center .tour-actions { justify-content: center; }
.tour-finger { font-size: 1.6rem; text-align: center; animation: tourFinger 0.9s ease-in-out infinite; }
@keyframes tourFinger { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.tour-fly-chip { position: fixed; z-index: 2002; transform: translate(-50%, -50%); background: linear-gradient(90deg, var(--accent-gold, #f5b942), var(--accent-pink, #ec4899)); color: #1a0b2e; font-weight: 800; font-size: 0.9rem; border-radius: 999px; padding: 0.3rem 0.7rem; pointer-events: none; transition: transform 0.9s cubic-bezier(0.3, 0.7, 0.3, 1), opacity 0.9s; box-shadow: 0 4px 18px rgba(245, 185, 66, 0.6); }
.wallet-pulse { animation: walletPulse 0.65s ease; }
@keyframes walletPulse { 0% { transform: scale(1); } 35% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* Royal competition board */
.royal-board { border: 1px solid rgba(245, 185, 66, 0.55); background: linear-gradient(160deg, rgba(124, 58, 237, 0.16), rgba(11, 6, 32, 0.4) 45%, rgba(245, 185, 66, 0.10)); box-shadow: 0 0 26px rgba(245, 185, 66, 0.16), inset 0 0 30px rgba(124, 58, 237, 0.10); }
.royal-crown { text-align: center; font-weight: 800; letter-spacing: 0.06em; font-size: 0.95rem; color: #ffe9b8; text-shadow: 0 0 12px rgba(245, 185, 66, 0.7); margin-bottom: 0.5rem; }
.prize-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.prize-pill { font-size: 0.75rem; font-weight: 700; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; padding: 0.25rem 0.6rem; }
.prize-pill.p1 { border-color: #f5b942; color: #ffe9b8; background: rgba(245, 185, 66, 0.14); }
.prize-pill.p2 { border-color: #c0c8d8; color: #e8edf5; background: rgba(192, 200, 216, 0.12); }
.prize-pill.p3 { border-color: #d08a4e; color: #f4c99b; background: rgba(208, 138, 78, 0.12); }
.board-win { display: block; font-size: 0.7rem; color: var(--accent-gold, #f5b942); font-weight: 600; }
.board-row.rank-1 { background: rgba(245, 185, 66, 0.10); border: 1px solid rgba(245, 185, 66, 0.35); border-radius: 10px; }
.board-row.rank-2 { background: rgba(192, 200, 216, 0.08); border: 1px solid rgba(192, 200, 216, 0.25); border-radius: 10px; }
.board-row.rank-3 { background: rgba(208, 138, 78, 0.08); border: 1px solid rgba(208, 138, 78, 0.25); border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { .tour-finger { animation: none; } }
