/* ═══════════════════════════════════════════════
   EarnHub Pro — Main Stylesheet
   Exact design from original RewixoEarn Elite Pro
═══════════════════════════════════════════════ */

body {
    background: #f1f5f9;
    color: #1e293b;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 0;
    padding: 0;
}

a { text-decoration: none; }
button:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── Layout ── */
.page-wrap {
    position: fixed;
    top: 65px;
    bottom: 75px;
    left: 0; right: 0;
    overflow-y: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.page-wrap::-webkit-scrollbar { display: none; }

/* ── Loader ── */
.loader-wrap {
    position: fixed; inset: 0;
    background: #f1f5f9;
    z-index: 9999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.loader-logo {
    width: 65px; height: 65px;
    background: #2563eb;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff;
    box-shadow: 0 0 30px rgba(37,99,235,0.3);
    animation: pulse-glow 1.5s infinite;
}
@keyframes pulse-glow {
    0%   { box-shadow: 0 0 0 0 rgba(37,99,235,0.4); }
    70%  { box-shadow: 0 0 0 15px rgba(37,99,235,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

/* ── News Ticker ── */
.ticker-wrap {
    background: #1e40af;
    height: 28px;
    display: flex; align-items: center; overflow: hidden;
    border-bottom: 2px solid #1d4ed8;
}
.ticker-text {
    white-space: nowrap;
    font-size: 9px; font-weight: 800;
    text-transform: uppercase; color: #fff;
    animation: ticker-move 25s linear infinite;
}
@keyframes ticker-move {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ── Info Bar ── */
.dynamic-info-bar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 15px;
    display: flex; justify-content: space-between; align-items: center;
}
.clock-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; font-weight: 800; color: #2563eb;
}

/* ── Section Header ── */
.section-header {
    font-size: 9px; font-weight: 900;
    color: #64748b; text-transform: uppercase;
    letter-spacing: 2px;
    margin: 18px 0 10px 8px;
    display: flex; align-items: center; gap: 8px;
}

/* ── Game Cards (Home Grid) ── */
.h-card {
    background: #fff;
    border-radius: 18px;
    padding: 14px 12px;
    border: 1px solid #e2e8f0;
    border-bottom: 3px solid transparent;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: 0.2s;
    cursor: pointer;
}
.h-card:active { transform: scale(0.96); background: #f8fafc; }
.grid-cols-3 .h-card {
    flex-direction: column !important;
    text-align: center !important;
    padding: 10px 2px !important;
    gap: 5px !important;
    min-height: 95px !important;
    justify-content: center !important;
}
.grid-cols-3 .icon-circle { width: 30px !important; height: 30px !important; font-size: 12px !important; }

.icon-circle {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 14px;
}

/* ── Wallet Card ── */
.premium-wallet-card {
    background: #fff;
    border-radius: 28px;
    padding: 22px;
    border: 1px solid #e2e8f0;
    position: relative; overflow: hidden;
    margin: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
}
.premium-wallet-card::before {
    content: '';
    position: absolute; top: -30px; right: -30px;
    width: 100px; height: 100px;
    background: #2563eb;
    filter: blur(70px); opacity: 0.08;
}

/* ── Refer Hero ── */
.refer-hero {
    background: #fff;
    border-radius: 28px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    position: relative;
    margin: 10px 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.03);
}
.refer-rules-card {
    background: #f8fafc;
    border-radius: 24px;
    padding: 16px;
    margin: 16px 12px;
    border: 1px solid #e2e8f0;
}
.refer-rules-card h4 { font-size: 12px; font-weight: 800; color: #2563eb; margin-bottom: 10px; }
.refer-rules-card ul {
    padding-left: 20px;
    font-size: 10px; font-weight: 600; color: #475569;
    display: flex; flex-direction: column; gap: 6px;
}

/* ── Toast Notification ── */
#custom-notify-container {
    position: fixed; top: 75px; left: 50%; transform: translateX(-50%);
    z-index: 10000; pointer-events: none;
    width: 100%; display: flex; flex-direction: column; align-items: center;
}
.elite-toast {
    background: #fff; border: 1px solid #2563eb; border-radius: 50px;
    padding: 5px 14px; margin-bottom: 6px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    animation: slideDownIn 0.3s cubic-bezier(0.18,0.89,0.32,1.28) forwards;
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: bold;
}
.toast-success { color: #2563eb; border-color: #2563eb; background: #eff6ff; }
.toast-error   { background: #fef2f2; border-color: #ef4444; color: #ef4444; }
@keyframes slideDownIn {
    from { transform: translateY(-40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.elite-toast.hide { animation: slideUpOut 0.3s forwards; }
@keyframes slideUpOut {
    from { transform: translateY(0); opacity: 1; }
    to   { transform: translateY(-40px); opacity: 0; }
}

/* ── Reward Modal ── */
.luxury-card-elite {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 40px !important;
    padding: 35px 25px !important;
    box-shadow: 0 40px 100px rgba(0,0,0,0.1) !important;
}
.reward-amt-text {
    font-size: 55px; font-weight: 950;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(180deg,#1e293b 30%,#2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1; margin: 10px 0;
}
.claim-button-premium {
    background: linear-gradient(135deg,#2563eb 0%,#1d4ed8 100%) !important;
    color: #fff !important; font-weight: 950 !important; font-size: 13px !important;
    padding: 18px !important; border-radius: 22px !important;
    width: 100% !important; margin-top: 25px !important; border: none !important;
    text-transform: uppercase !important; letter-spacing: 1.5px !important;
    box-shadow: 0 12px 30px rgba(37,99,235,0.3) !important; cursor: pointer;
}
.win-icon-wrapper {
    width: 70px; height: 70px;
    background: #eff6ff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 15px;
    border: 2px solid #2563eb;
    box-shadow: 0 0 20px rgba(37,99,235,0.2);
    animation: pulse-border 2s infinite;
}
@keyframes pulse-border {
    0%   { box-shadow: 0 0 0 0 rgba(37,99,235,0.4); }
    70%  { box-shadow: 0 0 0 15px rgba(37,99,235,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.4); }
}

/* ── Game Overlays ── */
.game-modal {
    position: fixed; inset: 0;
    background: rgba(241,245,249,0.96);
    backdrop-filter: blur(12px);
    z-index: 4000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.game-container {
    width: 100%; max-width: 400px;
    background: #fff;
    border-radius: 48px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
}
.game-node {
    aspect-ratio: 1/1;
    border-radius: 16px;
    transition: all 0.1s cubic-bezier(0.4,0,0.2,1);
    cursor: pointer;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    display: flex; align-items: center; justify-content: center;
}
.game-node:active { transform: scale(0.88); transition: 0.05s; }

/* Spin overlay */
.game-overlay {
    position: fixed; inset: 0;
    background: #f1f5f9;
    z-index: 2000;
    display: flex; flex-direction: column;
    padding: 20px; overflow: hidden;
}
.btn-close-game {
    position: absolute; top: 20px; right: 20px;
    width: 40px; height: 40px;
    background: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    z-index: 2100; color: #ef4444;
    border: 1px solid #e2e8f0; cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.wheel-box {
    position: relative; width: 280px; height: 280px;
    margin: 30px auto;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.neon-border {
    position: absolute; inset: 0;
    border: 8px solid #e2e8f0; border-radius: 50%;
    box-shadow: 0 0 20px rgba(37,99,235,0.2);
    z-index: 5; background: transparent !important; pointer-events: none;
}
.led-layer {
    position: absolute; inset: -2px;
    border-radius: 50%; border: 4px dotted #2563eb;
    opacity: 0.2; z-index: 6;
}
.led-active { animation: rotate-dots 2s linear infinite; opacity: 1 !important; filter: drop-shadow(0 0 8px #2563eb); }
@keyframes rotate-dots { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin-wheel-hd {
    width: 96% !important; height: 96% !important;
    border-radius: 50% !important;
    position: relative !important; z-index: 2 !important;
    background: conic-gradient(
        #FF5733 0deg 30deg,#33FF57 30deg 60deg,#3357FF 60deg 90deg,
        #F333FF 90deg 120deg,#FF33A1 120deg 150deg,#33FFF5 150deg 180deg,
        #F5FF33 180deg 210deg,#FF8333 210deg 240deg,#8333FF 240deg 270deg,
        #33FF83 270deg 300deg,#FF5733 300deg 330deg,#3357FF 330deg 360deg
    ) !important;
    border: 4px solid #fff !important;
    transition: transform 5s cubic-bezier(0.15, 0, 0.1, 1) !important;
}
.reward-item {
    position: absolute; top: 0; left: 50%;
    height: 50%; width: 40px; margin-left: -20px;
    transform-origin: bottom center;
    display: flex; justify-content: center; align-items: flex-start; z-index: 10;
}
.reward-item span { color: #fff; font-weight: 900; font-size: 14px; padding-top: 15px; text-shadow: 1px 1px 2px #000; }
.center-hub {
    position: absolute; width: 60px; height: 60px;
    background: #fff; border: 5px solid #e2e8f0;
    border-radius: 50%; z-index: 50;
    display: flex; align-items: center; justify-content: center;
    color: #000; font-weight: 900; font-size: 10px;
}
.center-hub::before {
    content: "";
    position: absolute; top: -18px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 22px solid #fff;
}
.btn-spin {
    width: 100%;
    background: linear-gradient(180deg,#2563eb 0%,#1d4ed8 100%);
    color: #fff; font-weight: 900;
    padding: 16px; border-radius: 20px;
    text-transform: uppercase; border: none;
    box-shadow: 0 8px 20px rgba(37,99,235,0.3);
}

/* ── TicTacToe ── */
.ttt-cell {
    aspect-ratio: 1/1;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    cursor: pointer;
    border: 2px solid #e2e8f0;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 900;
}
.x-mark { color: #2563eb; animation: zoomIn 0.3s ease-out; }
.o-mark { color: #f43f5e; animation: zoomIn 0.3s ease-out; }
.stat-badge {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 12px; border-radius: 16px;
    text-align: center; min-width: 70px;
}
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Color Tap / Icon Finder ── */
.target-scanner-game {
    width: 75px; height: 75px;
    border-radius: 24px;
    border: 4px solid #2563eb;
    box-shadow: 0 0 25px rgba(37,99,235,0.4);
    margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    animation: target-pulse 1.5s infinite; background: white;
}
@keyframes target-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37,99,235,0.4); border-color: #2563eb; }
    50%  { box-shadow: 0 0 0 10px rgba(37,99,235,0.2); border-color: #3b82f6; }
    100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.4); border-color: #2563eb; }
}
.timer-progress { height: 6px; background: #e2e8f0; border-radius: 10px; overflow: hidden; }
.timer-fill { height: 100%; background: linear-gradient(90deg,#2563eb,#3b82f6); transition: width 1s linear; }

/* ── Math Wizard ── */
.math-node {
    aspect-ratio: 2/1; border-radius: 18px;
    transition: all 0.2s ease; cursor: pointer;
    position: relative; border: 2px solid #e2e8f0;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; font-weight: 800; color: #1e293b;
}
.node-correct { background: #dcfce7 !important; border-color: #22c55e !important; transform: scale(0.95); }
.node-wrong   { background: #fee2e2 !important; border-color: #ef4444 !important; transform: scale(0.95); }
.question-box { padding: 25px; border-radius: 28px; background: #f8fafc; border: 2px solid #2563eb; text-align: center; }

/* ── Withdraw / History / Profile page styles ── */
.page-content { padding: 16px; padding-bottom: 90px; }
.page-title {
    font-size: 18px; font-weight: 900; font-style: italic;
    text-transform: uppercase; letter-spacing: -0.5px;
    color: #1e293b; margin-bottom: 16px;
}

/* History items */
.history-item {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #2563eb;
    padding: 12px 14px;
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.history-icon {
    width: 38px; height: 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px; flex-shrink: 0;
}
.history-info { flex: 1; }
.history-info h4 { font-size: 11px; font-weight: 800; color: #1e293b; margin: 0 0 2px; }
.history-info p  { font-size: 9px; font-weight: 600; color: #64748b; margin: 0; }
.history-info small { font-size: 8px; color: #94a3b8; }
.history-amount { font-size: 13px; font-weight: 900; color: #16a34a; font-family: 'JetBrains Mono', monospace; flex-shrink: 0; }
.withdraw-amount { color: #ef4444 !important; }

/* Status badge */
.status-badge {
    display: inline-block; font-size: 8px; font-weight: 900;
    text-transform: uppercase; padding: 2px 8px; border-radius: 20px;
}
.status-pending   { background: #fef3c7; color: #d97706; }
.status-completed { background: #dcfce7; color: #16a34a; }
.status-rejected  { background: #fee2e2; color: #ef4444; }
.status-active    { background: #dbeafe; color: #2563eb; }

/* Section card */
.section-card {
    background: #fff; border-radius: 24px;
    border: 1px solid #e2e8f0;
    padding: 16px; margin-bottom: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.03);
}
.section-card-title {
    font-size: 9px; font-weight: 900; color: #64748b;
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px;
}

/* Form styles */
.input-field {
    background: #f8fafc; border: 1px solid #e2e8f0;
    padding: 14px 16px; border-radius: 16px;
    width: 100%; font-size: 12px; color: #1e293b;
    outline: none; box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: border-color 0.2s;
}
.input-field:focus { border-color: #2563eb; background: #fff; }
.select-field {
    background: #f8fafc; border: 1px solid #e2e8f0;
    padding: 14px 16px; border-radius: 16px;
    width: 100%; font-size: 12px; color: #1e293b;
    outline: none; box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    appearance: none;
}
.btn-primary {
    background: linear-gradient(135deg,#2563eb,#1d4ed8);
    color: #fff; font-weight: 900; font-size: 11px;
    padding: 16px; border-radius: 18px;
    width: 100%; border: none; cursor: pointer;
    text-transform: uppercase; letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(37,99,235,0.3);
    transition: 0.2s;
}
.btn-primary:active { transform: scale(0.97); }

/* Profile avatar */
.profile-avatar-wrap {
    width: 70px; height: 70px;
    border-radius: 50%; border: 3px solid #2563eb;
    overflow: hidden; box-shadow: 0 4px 14px rgba(37,99,235,0.25);
}

/* Leaderboard gradient card */
.leaderboard-card {
    background: linear-gradient(135deg,#2563eb,#4f46e5);
    border-radius: 28px; padding: 16px;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; transition: 0.2s;
    box-shadow: 0 8px 20px rgba(37,99,235,0.3);
}
.leaderboard-card:active { transform: scale(0.97); }

/* Empty state */
.empty-state {
    text-align: center; padding: 40px 20px;
    color: #94a3b8;
}
.empty-state i { font-size: 40px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 12px; font-weight: 600; }

/* ═══════════════════════════════════
   EarnHub Pro — v2.0 Update Styles
═══════════════════════════════════ */

/* Full-width info bar — no side gaps */
.dynamic-info-bar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* Partnership referral card hover */
#partnershipCard > div {
    transition: transform 0.2s, box-shadow 0.2s;
}
#partnershipCard:active > div {
    transform: scale(0.98);
    box-shadow: 0 4px 14px rgba(37,99,235,0.2) !important;
}

/* Task overlay flex center */
#visitTaskOverlay, #oneTimeTaskOverlay {
    display: none;
    align-items: flex-end;
}

/* Global loader coding terminal */
#codeTerminal div {
    transition: opacity 0.3s;
}

/* Prevent page-wrap from having its own loader */
.page-wrap {
    display: block !important;
}

/* Ad network badges */
.ad-badge {
    font-size: 8px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 50px;
}
