/* ============================================
   RewardHive - Main Stylesheet
   Dark Crypto Earning Platform
   ============================================ */

:root {
    --rh-bg:         #080b10;
    --rh-bg-card:    #0e1420;
    --rh-bg-card2:   #131a28;
    --rh-border:     #1e2d45;
    --rh-gold:       #f5c518;
    --rh-gold-dim:   #c49b10;
    --rh-cyan:       #00d4ff;
    --rh-green:      #00e676;
    --rh-red:        #ff4757;
    --rh-purple:     #7c4dff;
    --rh-text:       #e2e8f0;
    --rh-muted:      #6b7fa3;
    --rh-font:       'Space Grotesk', sans-serif;
    --rh-mono:       'Space Mono', monospace;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--rh-bg);
    color: var(--rh-text);
    font-family: var(--rh-font);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--rh-cyan); text-decoration: none; transition: color .2s; }
a:hover { color: var(--rh-gold); }

h1,h2,h3,h4,h5,h6 { font-weight: 700; }

/* ---- Navbar ---- */
.rh-navbar {
    background: rgba(8,11,16,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rh-border);
    padding: .75rem 0;
}
.rh-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--rh-mono);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--rh-text) !important;
    text-decoration: none;
}
.brand-icon { font-size: 1.5rem; }
.brand-name { background: linear-gradient(135deg, var(--rh-gold), var(--rh-cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.navbar-toggler { border-color: var(--rh-border); }
.navbar-toggler-icon { filter: invert(1); }
.nav-link { color: var(--rh-muted) !important; transition: color .2s; font-weight: 500; }
.nav-link:hover { color: var(--rh-text) !important; }

.rh-points-badge {
    background: linear-gradient(135deg, rgba(245,197,24,.15), rgba(0,212,255,.1));
    border: 1px solid rgba(245,197,24,.3);
    color: var(--rh-gold);
    padding: .4rem .8rem;
    border-radius: 20px;
    font-family: var(--rh-mono);
    font-size: .8rem;
}

.rh-dropdown {
    background: var(--rh-bg-card);
    border: 1px solid var(--rh-border);
}
.rh-dropdown .dropdown-item { color: var(--rh-text); padding: .6rem 1rem; }
.rh-dropdown .dropdown-item:hover { background: var(--rh-bg-card2); color: var(--rh-gold); }

/* ---- Buttons ---- */
.rh-btn-primary {
    background: linear-gradient(135deg, var(--rh-gold), #e6b800);
    color: #000 !important;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: .55rem 1.4rem;
    transition: all .2s;
}
.rh-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,197,24,.35); }

.btn-rh-outline {
    border: 1px solid var(--rh-border);
    color: var(--rh-text);
    background: transparent;
    border-radius: 8px;
}
.btn-rh-outline:hover { border-color: var(--rh-gold); color: var(--rh-gold); background: rgba(245,197,24,.05); }

/* ---- Cards ---- */
.rh-card {
    background: var(--rh-bg-card);
    border: 1px solid var(--rh-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: border-color .2s, transform .2s;
}
.rh-card:hover { border-color: rgba(245,197,24,.3); }

.rh-stat-card {
    background: var(--rh-bg-card);
    border: 1px solid var(--rh-border);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.rh-stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    opacity: .08;
}
.rh-stat-card.gold::before { background: var(--rh-gold); }
.rh-stat-card.cyan::before { background: var(--rh-cyan); }
.rh-stat-card.green::before { background: var(--rh-green); }
.rh-stat-card.purple::before { background: var(--rh-purple); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.stat-icon.gold { background: rgba(245,197,24,.15); color: var(--rh-gold); }
.stat-icon.cyan { background: rgba(0,212,255,.1); color: var(--rh-cyan); }
.stat-icon.green { background: rgba(0,230,118,.1); color: var(--rh-green); }
.stat-icon.purple { background: rgba(124,77,255,.1); color: var(--rh-purple); }
.stat-icon.red { background: rgba(255,71,87,.1); color: var(--rh-red); }

.stat-value { font-family: var(--rh-mono); font-size: 1.6rem; font-weight: 700; }
.stat-label { color: var(--rh-muted); font-size: .85rem; margin: 0; }

/* ---- Hero ---- */
.rh-hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--rh-bg);
}
.rh-hero::before {
    content: '';
    position: absolute;
    top: -200px; left: 50%;
    transform: translateX(-50%);
    width: 800px; height: 800px;
    background: radial-gradient(ellipse, rgba(245,197,24,.06) 0%, transparent 70%);
    pointer-events: none;
}
.rh-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--rh-border), transparent);
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(245,197,24,.1);
    border: 1px solid rgba(245,197,24,.25);
    color: var(--rh-gold);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .35rem .9rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}
.hero-title .accent { color: var(--rh-gold); }
.hero-title .accent-2 { color: var(--rh-cyan); }
.hero-desc { font-size: 1.1rem; color: var(--rh-muted); max-width: 520px; margin-bottom: 2rem; }

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Floating hero cards */
.hero-float-card {
    background: var(--rh-bg-card);
    border: 1px solid var(--rh-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    font-size: .85rem;
    animation: floatCard 3s ease-in-out infinite;
}
.hero-float-card:nth-child(2) { animation-delay: -1.5s; }
.hero-float-card-icon { font-size: 1.5rem; }

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Animated counter */
.counter-num { font-family: var(--rh-mono); color: var(--rh-gold); }

/* ---- Section headings ---- */
.rh-section { padding: 5rem 0; }
.rh-section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    margin-bottom: .75rem;
}
.rh-section-line {
    width: 48px; height: 3px;
    background: linear-gradient(90deg, var(--rh-gold), var(--rh-cyan));
    border-radius: 2px;
    margin-bottom: 1rem;
}
.rh-section-subtitle { color: var(--rh-muted); max-width: 540px; }

/* ---- Feature cards ---- */
.rh-feature-card {
    background: var(--rh-bg-card);
    border: 1px solid var(--rh-border);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    transition: all .25s;
}
.rh-feature-card:hover {
    border-color: var(--rh-gold);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(245,197,24,.08);
}
.feature-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, rgba(245,197,24,.12), rgba(0,212,255,.06));
    border: 1px solid rgba(245,197,24,.2);
}
.rh-feature-card h5 { font-weight: 700; margin-bottom: .5rem; }
.rh-feature-card p { color: var(--rh-muted); font-size: .9rem; margin: 0; }

/* ---- Steps ---- */
.rh-step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}
.step-num {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rh-gold), var(--rh-gold-dim));
    color: #000;
    font-family: var(--rh-mono);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
}
.step-body h6 { font-weight: 700; margin-bottom: .25rem; }
.step-body p { color: var(--rh-muted); font-size: .9rem; margin: 0; }

/* ---- Stats ticker ---- */
.rh-stats-bar {
    background: var(--rh-bg-card);
    border-top: 1px solid var(--rh-border);
    border-bottom: 1px solid var(--rh-border);
    padding: 2.5rem 0;
}
.rh-stats-bar .stat-item { text-align: center; }
.rh-stats-bar .big-num {
    font-family: var(--rh-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--rh-gold);
    display: block;
}
.rh-stats-bar .label { color: var(--rh-muted); font-size: .85rem; }

/* ---- Live feed ---- */
.rh-live-feed {
    background: var(--rh-bg-card);
    border: 1px solid var(--rh-border);
    border-radius: 16px;
    overflow: hidden;
}
.live-feed-header {
    background: var(--rh-bg-card2);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--rh-border);
    display: flex; align-items: center; gap: .5rem;
    font-weight: 600;
}
.live-dot { width: 8px; height: 8px; background: var(--rh-green); border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.live-feed-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: .85rem 1.5rem;
    border-bottom: 1px solid rgba(30,45,69,.5);
    font-size: .88rem;
}
.live-feed-item:last-child { border-bottom: none; }
.feed-user { font-weight: 600; }
.feed-amount { color: var(--rh-green); font-family: var(--rh-mono); font-weight: 700; }
.feed-time { color: var(--rh-muted); font-size: .78rem; }

/* ---- Plan cards ---- */
.rh-plan-card {
    background: var(--rh-bg-card);
    border: 1px solid var(--rh-border);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    transition: all .25s;
    position: relative;
}
.rh-plan-card.featured {
    border-color: var(--rh-gold);
    background: linear-gradient(160deg, var(--rh-bg-card), rgba(245,197,24,.04));
}
.plan-badge {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--rh-gold);
    color: #000;
    font-size: .75rem;
    font-weight: 700;
    padding: .2rem .8rem;
    border-radius: 20px;
}
.plan-price { font-family: var(--rh-mono); font-size: 2.5rem; font-weight: 700; color: var(--rh-gold); }
.plan-period { color: var(--rh-muted); font-size: .9rem; }

/* ---- Forms ---- */
.rh-form-card {
    background: var(--rh-bg-card);
    border: 1px solid var(--rh-border);
    border-radius: 20px;
    padding: 2.5rem;
}
.form-label { color: var(--rh-muted); font-size: .88rem; font-weight: 500; margin-bottom: .4rem; }
.form-control, .form-select {
    background: var(--rh-bg);
    border: 1px solid var(--rh-border);
    color: var(--rh-text);
    border-radius: 10px;
    padding: .65rem 1rem;
    transition: border-color .2s;
}
.form-control:focus, .form-select:focus {
    background: var(--rh-bg);
    border-color: var(--rh-gold);
    color: var(--rh-text);
    box-shadow: 0 0 0 3px rgba(245,197,24,.1);
}
.form-control::placeholder { color: #3d4f6b; }
.form-select option { background: var(--rh-bg-card); }
.form-check-input { background-color: var(--rh-bg); border-color: var(--rh-border); }
.form-check-input:checked { background-color: var(--rh-gold); border-color: var(--rh-gold); }

/* ---- Tables ---- */
.rh-table { width: 100%; }
.rh-table th {
    background: var(--rh-bg-card2);
    color: var(--rh-muted);
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--rh-border);
}
.rh-table td {
    padding: .85rem 1rem;
    border-bottom: 1px solid rgba(30,45,69,.5);
    font-size: .9rem;
    vertical-align: middle;
}
.rh-table tr:last-child td { border-bottom: none; }
.rh-table tr:hover td { background: rgba(245,197,24,.02); }
.rh-table-wrap {
    background: var(--rh-bg-card);
    border: 1px solid var(--rh-border);
    border-radius: 16px;
    overflow: hidden;
}

/* ---- Badges ---- */
.badge-active { background: rgba(0,230,118,.15); color: var(--rh-green); border: 1px solid rgba(0,230,118,.25); }
.badge-pending { background: rgba(245,197,24,.1); color: var(--rh-gold); border: 1px solid rgba(245,197,24,.2); }
.badge-rejected { background: rgba(255,71,87,.1); color: var(--rh-red); border: 1px solid rgba(255,71,87,.2); }
.badge-approved { background: rgba(0,230,118,.15); color: var(--rh-green); border: 1px solid rgba(0,230,118,.25); }
.badge-rh { border-radius: 6px; padding: .3rem .65rem; font-size: .78rem; font-weight: 600; }

/* ---- Dashboard sidebar ---- */
.rh-sidebar {
    background: var(--rh-bg-card);
    border: 1px solid var(--rh-border);
    border-radius: 16px;
    overflow: hidden;
}
.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1.25rem;
    color: var(--rh-muted);
    border-bottom: 1px solid rgba(30,45,69,.5);
    transition: all .2s;
    text-decoration: none;
    font-weight: 500;
    font-size: .92rem;
}
.sidebar-nav-item:last-child { border-bottom: none; }
.sidebar-nav-item:hover, .sidebar-nav-item.active {
    background: rgba(245,197,24,.06);
    color: var(--rh-gold);
}
.sidebar-nav-item i { font-size: 1.1rem; }

/* ---- Admin ---- */
.rh-admin-sidebar {
    background: var(--rh-bg-card);
    border-right: 1px solid var(--rh-border);
    min-height: calc(100vh - 60px);
    width: 240px;
    flex-shrink: 0;
}
.admin-nav-section {
    padding: .5rem 1rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #3d4f6b;
    margin-top: .5rem;
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem 1.25rem;
    color: var(--rh-muted);
    border-radius: 0;
    font-size: .88rem;
    transition: all .15s;
    text-decoration: none;
}
.admin-nav-item:hover, .admin-nav-item.active {
    background: rgba(245,197,24,.08);
    color: var(--rh-gold);
}
.admin-layout { display: flex; min-height: 100vh; }
.admin-main { flex: 1; padding: 2rem; overflow-x: hidden; }
.admin-topbar {
    background: var(--rh-bg-card);
    border-bottom: 1px solid var(--rh-border);
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---- Countdown timer ---- */
.rh-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin: 1.5rem 0;
}
.countdown-circle {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--rh-gold) var(--progress, 360deg), var(--rh-border) 0deg);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.countdown-inner {
    width: 64px; height: 64px;
    background: var(--rh-bg);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--rh-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--rh-gold);
}

/* ---- Alerts ---- */
.alert-success { background: rgba(0,230,118,.1); border-color: rgba(0,230,118,.25); color: var(--rh-green); }
.alert-danger  { background: rgba(255,71,87,.1);  border-color: rgba(255,71,87,.25);  color: var(--rh-red); }
.alert-warning { background: rgba(245,197,24,.1); border-color: rgba(245,197,24,.25); color: var(--rh-gold); }
.alert-info    { background: rgba(0,212,255,.1);  border-color: rgba(0,212,255,.25);  color: var(--rh-cyan); }
.btn-close     { filter: invert(1); }

/* ---- Footer ---- */
.rh-footer {
    background: var(--rh-bg-card);
    border-top: 1px solid var(--rh-border);
}
.rh-footer-links li { margin-bottom: .4rem; }
.rh-footer-links a { color: var(--rh-muted); font-size: .9rem; transition: color .2s; }
.rh-footer-links a:hover { color: var(--rh-gold); }
.rh-social-link {
    width: 36px; height: 36px;
    border: 1px solid var(--rh-border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--rh-muted);
    transition: all .2s;
    font-size: 1rem;
}
.rh-social-link:hover { border-color: var(--rh-gold); color: var(--rh-gold); }

/* ---- Progress / Ad view ---- */
.ad-view-frame {
    width: 100%;
    min-height: 400px;
    background: var(--rh-bg);
    border: 1px solid var(--rh-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--rh-muted);
}
.progress-thin {
    height: 4px;
    background: var(--rh-bg-card2);
    border-radius: 2px;
    overflow: hidden;
}
.progress-thin-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--rh-gold), var(--rh-cyan));
    border-radius: 2px;
    transition: width .5s linear;
}

/* ---- Referral box ---- */
.referral-link-box {
    background: var(--rh-bg);
    border: 1px solid var(--rh-border);
    border-radius: 10px;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    font-family: var(--rh-mono);
    font-size: .85rem;
    color: var(--rh-text);
    overflow: hidden;
}
.referral-link-box span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Pagination ---- */
.rh-pagination .page-link {
    background: var(--rh-bg-card);
    border-color: var(--rh-border);
    color: var(--rh-muted);
}
.rh-pagination .page-link:hover { background: var(--rh-bg-card2); color: var(--rh-gold); border-color: var(--rh-gold); }
.rh-pagination .page-item.active .page-link { background: var(--rh-gold); border-color: var(--rh-gold); color: #000; }
.rh-pagination .page-item.disabled .page-link { opacity: .4; }

/* ---- Modal ---- */
.rh-modal { background: var(--rh-bg-card); border: 1px solid var(--rh-border); color: var(--rh-text); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .rh-admin-sidebar { display: none; }
    .admin-main { padding: 1rem; }
    .rh-hero { min-height: auto; padding: 5rem 0 3rem; }
    .hero-float-card { display: none; }
    .rh-section { padding: 3rem 0; }
    .rh-form-card { padding: 1.5rem; }
    .stat-value { font-size: 1.3rem; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--rh-bg); }
::-webkit-scrollbar-thumb { background: var(--rh-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--rh-muted); }

/* ---- Utility ---- */
.text-gold { color: var(--rh-gold) !important; }
.text-cyan { color: var(--rh-cyan) !important; }
.text-green { color: var(--rh-green) !important; }
.text-rh-muted { color: var(--rh-muted) !important; }
.bg-rh-card { background: var(--rh-bg-card) !important; }
.border-rh { border-color: var(--rh-border) !important; }
.font-mono { font-family: var(--rh-mono) !important; }
.rounded-rh { border-radius: 16px !important; }

/* ---- Loading spinner ---- */
.rh-spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--rh-border);
    border-top-color: var(--rh-gold);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Glow effects ---- */
.glow-gold { box-shadow: 0 0 20px rgba(245,197,24,.2); }
.glow-cyan { box-shadow: 0 0 20px rgba(0,212,255,.2); }

/* ---- Grid lines bg ---- */
.rh-grid-bg {
    background-image:
        linear-gradient(rgba(30,45,69,.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30,45,69,.3) 1px, transparent 1px);
    background-size: 48px 48px;
}
