* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
}

/* Navigation */
.nav {
    background: #111;
    border-bottom: 2px solid #00E5A0;
    padding: 0 20px;
}
.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.nav-logo {
    color: #FF7A1A;
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.hero-logo {
    display: block;
    height: 340px;
    margin: 0 auto 16px;
}
.hero-logo-sm {
    display: block;
    height: 80px;
    margin: 0 auto 8px;
}
/* Nav search */
.nav-search {
    display: flex;
    flex: 1;
    max-width: 420px;
    margin: 0 20px;
}
.nav-search input {
    flex: 1;
    background: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #2a2a2a;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 7px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.nav-search input:focus { border-color: #00E5A0; }
.nav-search button {
    background: #00E5A0;
    color: #000;
    border: none;
    padding: 7px 16px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.nav-search button:hover { background: #00CC8E; }

.nav-links { display: flex; gap: 4px; }
.nav-link {
    color: #aaa;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: #1a1a1a; color: #fff; }
.nav-btn-new {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: #ccc;
}
.nav-btn-new:hover { background: #282828; color: #fff; }

/* Hero */
.hero {
    position: relative;
    padding: 40px 20px;
    text-align: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/static/img/hero-bg.webp') center/cover no-repeat;
    filter: brightness(0.5) saturate(0.6) sepia(0.2) hue-rotate(100deg);
    opacity: 0.6;
    z-index: 0;
}
.hero.hero-bg-mining::before { background-image: url('/static/img/hero-mining-rig.jpg'); background-position: left 70%; transform: scale(1.15); }
.hero.hero-bg-rtx::before { background-image: url('/static/img/hero-rtx-stack.webp'); }
.hero.hero-bg-mobos::before { background-image: url('/static/img/hero-mobos.png'); }
.hero.hero-bg-hdd::before { background-image: url('/static/img/hero-hdd-pile.jpg'); }
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,10,0.1) 0%, rgba(10,10,10,0.85) 100%);
    z-index: 0;
}
.hero > * {
    position: relative;
    z-index: 1;
}
.hero h1 {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.hero-tagline {
    font-size: 22px;
    font-weight: 700;
    color: #00E5A0;
    margin: 0 auto 8px;
    letter-spacing: 0.5px;
}
.hero p {
    color: #888;
    font-size: 15px;
    max-width: 600px;
    margin: 0 auto;
}
.hero-stats {
    margin-top: 16px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-stats .stat {
    font-size: 13px;
    color: #888;
}
.hero-stats .stat strong {
    color: #00E5A0;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Filters */
.filters {
    padding: 16px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid #1a1a1a;
}
.filters select,
.filters input[type="number"] {
    background: #181818;
    color: #e0e0e0;
    border: 1px solid #2a2a2a;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.filters select:focus,
.filters input[type="number"]:focus {
    border-color: #00E5A0;
}
.filters input[type="number"] { width: 110px; }
.btn-search {
    background: #00E5A0;
    color: #000;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: background 0.15s;
}
.btn-search:hover { background: #00CC8E; }

/* Category buttons */
.category-buttons {
    display: flex;
    gap: 8px;
    padding: 16px 0 8px;
}
.category-btn {
    display: inline-block;
    padding: 8px 24px;
    border: 2px solid #7B2FBE;
    border-radius: 6px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s;
    background: #7B2FBE;
}
.category-btn:hover {
    background: #9040DD;
    border-color: #9040DD;
    color: #fff;
}
.category-btn.active {
    background: transparent;
    border-color: #7B2FBE;
    color: #7B2FBE;
}

/* Auction toggle */
.mode-toggle {
    padding: 8px 32px;
    border: 2px solid #FF7A1A;
    border-radius: 6px;
    background: #FF7A1A;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    margin-left: auto;
}
.mode-toggle:hover {
    background: #E86A0A;
    border-color: #E86A0A;
}
.mode-toggle.active {
    background: transparent;
    border-color: #FF7A1A;
    color: #FF7A1A;
}

/* Auction listing info */
.listing-auction {
    text-align: right;
}
.auction-time {
    font-size: 14px;
    font-weight: 700;
    color: #ff9800;
}
.auction-bids {
    font-size: 12px;
    color: #888;
}

/* Filter checkbox */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #aaa;
    cursor: pointer;
    white-space: nowrap;
}
.filter-checkbox input[type="checkbox"] {
    accent-color: #00E5A0;
}

/* Multi-listing badge */
.badge-multi {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    background: #2a2a1a;
    color: #ffaa00;
    text-transform: uppercase;
}

/* Results bar */
.results-bar {
    padding: 10px 0;
    font-size: 13px;
    color: #888;
}
.results-bar strong { color: #00E5A0; }

/* Listings */
.listings { min-height: 200px; }
.listing-row {
    display: grid;
    grid-template-columns: 1fr 140px 110px 120px;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #141414;
    align-items: center;
    transition: background 0.1s;
}
.listing-row:hover { background: #111; margin: 0 -8px; padding: 12px 8px; border-radius: 6px; }

.listing-title a {
    color: #6cb4ff;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    display: block;
}
.listing-title a:hover { text-decoration: underline; }
.listing-meta {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}
.listing-meta .platform {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.listing-meta .platform.ebay { background: #1a2a1a; color: #4caf50; }
.listing-meta .platform.mercari { background: #2a1a1a; color: #ef5350; }
.listing-meta .platform.jawa { background: #1a1a2a; color: #5c6bc0; }
.listing-meta .platform.retail { background: #2a2a1a; color: #ff9800; }

/* Retail buy link */
.retail-buy-link {
    color: #00E5A0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}
.retail-buy-link:hover { text-decoration: underline; }
.retail-retailer { font-size: 12px; color: #888; }

.listing-specs {
    font-size: 12px;
    color: #888;
}
.listing-shipping {
    font-size: 12px;
    color: #666;
    text-align: right;
}
.listing-price {
    font-size: 20px;
    font-weight: 800;
    color: #00E5A0;
    text-align: right;
}

/* Deal rating badges */
.deal-badge {
    text-align: right;
    line-height: 1.3;
}
.deal-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.deal-diff {
    display: block;
    font-size: 11px;
    color: #888;
}
.deal-great-deal .deal-label { color: #00E5A0; }
.deal-good-deal .deal-label { color: #8bc34a; }
.deal-fair .deal-label { color: #888; }
.deal-overpriced .deal-label { color: #ef5350; }

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 14px;
}

/* Pagination */
.pagination {
    padding: 20px 0;
    display: flex;
    gap: 4px;
    justify-content: center;
}
.pagination button {
    background: #181818;
    color: #e0e0e0;
    border: 1px solid #2a2a2a;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    transition: background 0.15s;
}
.pagination button:hover { background: #222; }
.pagination button.active {
    background: #00E5A0;
    color: #000;
    border-color: #00E5A0;
    font-weight: 700;
}

/* Footer */
.footer {
    background: #0d0d0d;
    border-top: 1px solid #1a1a1a;
    padding: 24px 20px;
    margin-top: 40px;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666;
}
.footer-contact {
    color: #888;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s;
}
.footer-contact:hover { color: #00E5A0; }
.footer-attribution {
    max-width: 1400px;
    margin: 12px auto 0;
    text-align: center;
    font-size: 11px;
    color: #444;
}

/* Ad container */
.ad-footer {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Contact page */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px 0;
}
.contact-card {
    background: #141414;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 24px;
}
.contact-card h2 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 12px;
}
.contact-card p {
    font-size: 14px;
    color: #888;
    line-height: 1.6;
    margin-bottom: 12px;
}
.contact-email {
    display: inline-block;
    color: #00E5A0;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 0;
}
.contact-email:hover { text-decoration: underline; }

/* Site stats */
.site-stats-section {
    padding: 32px 0;
}
.site-stats-section h2 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 16px;
    text-align: center;
}
.site-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.stat-card {
    background: #141414;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}
.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #00E5A0;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile */
@media (max-width: 768px) {
    /* Nav */
    .nav { padding: 0 12px; }
    .nav-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 8px 0;
        gap: 6px;
    }
    .nav-logo { font-size: 16px; }
    .nav-search { order: 3; max-width: 100%; margin: 0; }
    .nav-search input { font-size: 14px; padding: 8px 10px; }
    .nav-search button { padding: 8px 14px; font-size: 13px; }
    .nav-links { gap: 2px; flex-wrap: wrap; }
    .nav-link { padding: 6px 10px; font-size: 12px; }
    .nav-btn-new { padding: 6px 10px; font-size: 12px; }

    /* Hero */
    .hero { padding: 24px 16px; }
    .hero h1 { font-size: 20px; }
    .hero p { font-size: 13px; }
    .hero-tagline { font-size: 18px; }
    .hero-logo { height: 160px; margin-bottom: 8px; }
    .hero-logo-sm { height: 60px; }
    .hero-stats { gap: 12px; }
    .hero-stats .stat { font-size: 12px; }

    /* Category buttons & auction toggle */
    .category-buttons {
        gap: 6px;
        flex-wrap: wrap;
        padding: 12px 0 6px;
    }
    .category-btn { padding: 6px 16px; font-size: 12px; }
    .mode-toggle { padding: 6px 18px; font-size: 12px; }

    /* Filters */
    .container { padding: 0 12px; }
    .filters { gap: 6px; flex-wrap: wrap; }
    .filters select,
    .filters input[type="number"] {
        font-size: 12px;
        padding: 6px 8px;
        flex: 1;
        min-width: 0;
    }
    .filters input[type="number"] { width: auto; min-width: 80px; }
    .btn-search { padding: 6px 16px; font-size: 12px; width: 100%; }

    /* Listings */
    .listing-row {
        grid-template-columns: 1fr auto;
        gap: 6px;
        padding: 10px 0;
    }
    .listing-specs,
    .listing-shipping,
    .deal-badge { display: none; }
    .listing-title a { font-size: 13px; }
    .listing-meta { font-size: 11px; }
    .listing-price { font-size: 16px; }

    /* Pagination */
    .pagination { padding: 16px 0; }
    .pagination button { padding: 5px 10px; font-size: 12px; }

    /* Contact */
    .contact-section { grid-template-columns: 1fr; }
    .contact-card { padding: 16px; }
    .contact-card h2 { font-size: 16px; }

    /* Stats */
    .site-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-number { font-size: 22px; }

    /* Footer */
    .footer { padding: 16px 12px; }
    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Small phones */
@media (max-width: 400px) {
    .nav-logo { font-size: 14px; }
    .hero-logo { height: 120px; }
    .hero h1 { font-size: 18px; }
    .category-btn { padding: 5px 12px; font-size: 11px; }
    .mode-toggle { padding: 5px 14px; font-size: 11px; }
    .listing-title a { font-size: 12px; }
    .listing-price { font-size: 15px; }
}
