/* ═══════════════════════════════════════════════
   UP XP — Homepage
   Gaming Marketplace / Dark Neon Theme
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&display=swap');

:root {
    --h-primary: #3cc30e;
    --h-primary-glow: rgba(60, 195, 14, 0.4);
    --h-purple: #c700ff;
    --h-purple-glow: rgba(199, 0, 255, 0.35);
    --h-bg: #000000;
    --h-surface: #0d0d0d;
    --h-surface-2: #161616;
    --h-surface-3: #1f1f1f;
    --h-border: #2a2a2a;
    --h-text: #f0f0f0;
    --h-text-muted: #777;
    --h-gold: #fbbf24;
    --h-success: #10b981;
    --h-font-display: 'Chakra Petch', 'Inter', sans-serif;
    --h-font-body: 'Inter', sans-serif;
    --h-radius: 10px;
}

.home-page {
    background: var(--h-bg);
    color: var(--h-text);
    font-family: var(--h-font-body);
    overflow-x: hidden;
}

/* ─── HERO ─────────────────────────────────── */
.hero {
    position: relative;
    padding: 4.5rem 1.5rem 3.5rem;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(60, 195, 14, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 20%, rgba(199, 0, 255, 0.06) 0%, transparent 60%),
        var(--h-bg);
}

.hero::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--h-primary) 50%, transparent 100%);
    opacity: 0.5;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    background: rgba(60, 195, 14, 0.08);
    border: 1px solid rgba(60, 195, 14, 0.25);
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--h-primary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease both;
}

.hero-badge i {
    font-size: 0.6rem;
}

.hero h1 {
    font-family: var(--h-font-display);
    font-size: clamp(2rem, 6vw, 3.8rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 1rem;
    animation: fadeInUp 0.7s ease both 0.1s;
}

.hero h1 .text-glow {
    color: var(--h-primary);
    text-shadow: 0 0 30px var(--h-primary-glow), 0 0 60px rgba(60, 195, 14, 0.15);
}

.hero-sub {
    font-size: 1rem;
    color: var(--h-text-muted);
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    animation: fadeInUp 0.7s ease both 0.2s;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.7s ease both 0.3s;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    background: var(--h-primary);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: var(--h-font-display);
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px var(--h-primary-glow), 0 4px 15px rgba(0,0,0,0.4);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px var(--h-primary-glow), 0 8px 25px rgba(0,0,0,0.5);
    background: #44d910;
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    background: transparent;
    color: var(--h-text);
    border: 1px solid var(--h-border);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--h-font-display);
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-hero-secondary:hover {
    border-color: var(--h-primary);
    color: var(--h-primary);
    transform: translateY(-2px);
}

/* ─── STATS BAR ────────────────────────────── */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 800px;
    margin: -1.5rem auto 0;
    position: relative;
    z-index: 2;
    background: var(--h-surface);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius);
    overflow: hidden;
}

.stat-item {
    padding: 1.2rem 0.5rem;
    text-align: center;
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: var(--h-border);
}

.stat-number {
    display: block;
    font-family: var(--h-font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--h-text);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.68rem;
    color: var(--h-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}

/* ─── SECTIONS ─────────────────────────────── */
.home-section {
    padding: 3.5rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--h-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.section-label i {
    font-size: 0.55rem;
}

.section-title {
    font-family: var(--h-font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--h-text);
    margin-bottom: 0.4rem;
}

.section-desc {
    font-size: 0.88rem;
    color: var(--h-text-muted);
    margin-bottom: 2rem;
}

/* ─── CATEGORIES GRID ──────────────────────── */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8rem;
}

.cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1.2rem 0.8rem;
    background: var(--h-surface);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius);
    text-decoration: none;
    color: var(--h-text);
    transition: all 0.3s ease;
    overflow: hidden;
}

.cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(60, 195, 14, 0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cat-card:hover {
    border-color: rgba(60, 195, 14, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4), 0 0 20px rgba(60, 195, 14, 0.08);
}

.cat-card:hover::before {
    opacity: 1;
}

.cat-card-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.cat-card-name {
    font-family: var(--h-font-display);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    z-index: 1;
    line-height: 1.2;
}

/* ─── OFFERS GRID ──────────────────────────── */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.offer-card {
    background: var(--h-surface);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius);
    text-decoration: none;
    color: var(--h-text);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.offer-card:hover {
    border-color: rgba(60, 195, 14, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5), 0 0 15px rgba(60, 195, 14, 0.06);
}

.offer-card-top {
    display: flex;
    gap: 0.8rem;
    padding: 1rem 1rem 0.7rem;
    align-items: flex-start;
}

.offer-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--h-border);
}

.offer-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.offer-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--h-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.offer-server {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--h-primary);
    background: rgba(60, 195, 14, 0.08);
    border: 1px solid rgba(60, 195, 14, 0.2);
    padding: 0.2rem 0.55rem;
    border-radius: 5px;
    width: fit-content;
}

.offer-server i {
    font-size: 0.55rem;
    opacity: 0.7;
}

.offer-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: var(--h-surface-2);
    border-top: 1px solid var(--h-border);
    margin-top: auto;
}

.offer-seller {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.offer-seller-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--h-border);
}

.offer-seller-avatar-fallback {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--h-surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--h-text-muted);
    font-size: 0.6rem;
}

.offer-seller-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.offer-seller-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--h-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.offer-seller-sales {
    font-size: 0.65rem;
    color: var(--h-text-muted);
}

.offer-price-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.offer-price-label {
    font-size: 0.6rem;
    color: var(--h-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.offer-price {
    font-family: var(--h-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--h-primary);
    white-space: nowrap;
}

/* ─── REVIEWS ──────────────────────────────── */
.reviews-wrapper {
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.reviews-scroll {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: reviewsMarquee 30s linear infinite;
}

.reviews-wrapper:hover .reviews-scroll {
    animation-play-state: paused;
}

@keyframes reviewsMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.review-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: var(--h-surface);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius);
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.review-stars {
    display: flex;
    gap: 0.15rem;
}

.review-stars i {
    color: var(--h-gold);
    font-size: 0.7rem;
}

.review-text {
    font-size: 0.85rem;
    color: var(--h-text);
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-footer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--h-border);
}

.review-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--h-surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--h-text-muted);
    font-size: 0.65rem;
    flex-shrink: 0;
}

.review-author {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--h-text);
}

.review-verified {
    font-size: 0.65rem;
    color: var(--h-success);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.review-verified i {
    font-size: 0.55rem;
}

/* ─── CTA BOTTOM ───────────────────────────── */
.cta-bottom {
    padding: 3rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 60% at 50% 100%, rgba(199, 0, 255, 0.06) 0%, transparent 70%),
        var(--h-bg);
}

.cta-bottom::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--h-purple) 50%, transparent 100%);
    opacity: 0.3;
}

.cta-inner {
    max-width: 550px;
    margin: 0 auto;
}

.cta-bottom h2 {
    font-family: var(--h-font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.cta-bottom p {
    font-size: 0.9rem;
    color: var(--h-text-muted);
    margin-bottom: 1.5rem;
}

.btn-cta-purple {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--h-purple) 0%, #e040fb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: var(--h-font-display);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px var(--h-purple-glow), 0 4px 15px rgba(0,0,0,0.4);
}

.btn-cta-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px var(--h-purple-glow), 0 8px 25px rgba(0,0,0,0.5);
}

/* ─── SECTION DIVIDER ──────────────────────── */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--h-border) 30%, var(--h-border) 70%, transparent 100%);
    max-width: 1100px;
    margin: 0 auto;
}

/* ─── VIEW ALL LINK ────────────────────────── */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-head-text {
    flex: 1;
}

.section-head-text .section-title {
    margin-bottom: 0.2rem;
}

.section-head-text .section-desc {
    margin-bottom: 0;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--h-primary);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    padding: 0.4rem 0;
}

.view-all:hover {
    color: #44d910;
    gap: 0.55rem;
}

.view-all i {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.view-all:hover i {
    transform: translateX(2px);
}

/* ─── ANIMATIONS ───────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── RESPONSIVE ───────────────────────────── */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem 2.5rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-sub {
        font-size: 0.88rem;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        margin: -1rem 1rem 0;
    }

    .stat-item:nth-child(2)::after {
        display: none;
    }

    .stat-item:nth-child(1),
    .stat-item:nth-child(2) {
        border-bottom: 1px solid var(--h-border);
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .home-section {
        padding: 2.5rem 1rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }

    .cat-card {
        padding: 0.9rem 0.5rem;
    }

    .cat-card-img {
        width: 44px;
        height: 44px;
    }

    .cat-card-name {
        font-size: 0.7rem;
    }

    .offers-grid {
        grid-template-columns: 1fr;
    }

    .cta-bottom h2 {
        font-size: 1.4rem;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2.5rem 0.75rem 2rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn-hero-primary, .btn-hero-secondary {
        width: 100%;
        max-width: 260px;
        justify-content: center;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .review-card {
        flex: 0 0 250px;
    }

    .stats-bar {
        margin: -1rem 0.5rem 0;
    }
}
