/* Noir Theme - Dark, professional, distinct layout */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg-primary: #0b0f14;
    --bg-secondary: #111723;
    --bg-tertiary: #172131;
    --text-primary: #e6edf5;
    --text-secondary: #93a4b5;
    --accent-primary: #22c55e;
    --accent-secondary: #16a34a;
    --accent-hover: #4ade80;
    --success: #22c55e;
    --danger: #f43f5e;
    --warning: #f59e0b;
    --border: rgba(148, 163, 184, 0.18);
    --shadow: rgba(3, 7, 18, 0.7);
}

body.theme-noir {
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    background: radial-gradient(1200px 600px at 10% -10%, rgba(56, 189, 248, 0.12), transparent 60%),
        radial-gradient(900px 500px at 90% 0%, rgba(34, 197, 94, 0.1), transparent 55%),
        #0b0f14;
    color: var(--text-primary);
    overflow-x: hidden;
}

body.theme-noir h1,
body.theme-noir h2,
body.theme-noir h3,
body.theme-noir .section-title,
body.theme-noir .brand-text {
    font-family: 'Sora', 'IBM Plex Sans', sans-serif;
    letter-spacing: -0.02em;
}

/* Navbar */
body.theme-noir .navbar {
    background: rgba(11, 15, 20, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

body.theme-noir .navbar::before {
    display: none;
}

body.theme-noir .brand-text {
    background: none;
    -webkit-text-fill-color: unset;
    color: var(--text-primary);
}

body.theme-noir .nav-menu a {
    color: var(--text-primary);
    border-radius: 10px;
    border: 1px solid transparent;
}

body.theme-noir .nav-menu a::before,
body.theme-noir .nav-menu a::after {
    display: none;
}

body.theme-noir .nav-menu a:hover {
    color: var(--accent-primary);
    background: rgba(125, 211, 252, 0.08);
    border-color: rgba(125, 211, 252, 0.25);
}

body.theme-noir .nav-menu {
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

body.theme-noir .nav-menu a {
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
}

body.theme-noir .nav-item.primary a {
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

body.theme-noir .nav-item.primary a:hover {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
}

body.theme-noir .nav-item.action a {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

body.theme-noir .nav-item.action a:hover {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
}

body.theme-noir .nav-spacer {
    flex: 1 1 auto;
}

body.theme-noir .nav-search-item {
    flex: 0 1 280px;
    min-width: 220px;
}

body.theme-noir .nav-search-item form {
    display: flex;
    gap: 0.4rem;
}

body.theme-noir .nav-search-item .form-control {
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
}

body.theme-noir .nav-search-item .btn {
    padding: 0.5rem 0.8rem;
}

body.theme-noir .nav-icon-only a {
    padding: 0.45rem 0.6rem;
    min-width: 36px;
    justify-content: center;
    position: static;
    display: inline-flex;
    align-items: center;
}

body.theme-noir .nav-icon-only {
    position: relative;
}

body.theme-noir .nav-icon-only a i {
    font-size: 1rem;
}

body.theme-noir .nav-icon-only .nav-badge {
    position: absolute !important;
    top: -6px !important;
    right: -6px !important;
    transform: none !important;
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(11, 15, 20, 0.9);
    z-index: 2;
}

body.theme-noir .nav-icon-only .nav-badge-inline {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    margin-left: 0.35rem;
    box-shadow: none;
    background: rgba(34, 197, 94, 0.2);
    color: #bbf7d0;
}

body.theme-noir .nav-cart a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #c7f9d4;
    font-weight: 600;
}

body.theme-noir .nav-cart a i {
    color: var(--accent-primary);
}

body.theme-noir .nav-balance {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
    font-size: 0.9rem;
    font-weight: 600;
}

body.theme-noir .nav-balance strong {
    color: #bbf7d0;
}

body.theme-noir .nav-balance i {
    color: var(--accent-primary);
}

/* Buttons */
body.theme-noir .btn {
    border-radius: 12px;
    font-weight: 600;
}

body.theme-noir .btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.25);
}

body.theme-noir .btn-primary:hover {
    background: linear-gradient(135deg, #38bdf8, #34d399);
}

body.theme-noir .btn-secondary {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* Forms */
body.theme-noir .form-control {
    background: rgba(17, 23, 35, 0.9);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
}

body.theme-noir .form-control:focus {
    border-color: rgba(125, 211, 252, 0.6);
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.12);
}

/* Hero */
body.theme-noir .hero-section-modern,
body.theme-noir .hero-section {
    background: radial-gradient(1200px 600px at 20% -10%, rgba(34, 197, 94, 0.12), transparent 55%),
        radial-gradient(900px 500px at 80% 0%, rgba(14, 165, 233, 0.14), transparent 60%),
        transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    overflow: visible;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

body.theme-noir .hero-text-modern h1,
body.theme-noir .hero-section h1 {
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: unset;
}

body.theme-noir .hero-text-modern p,
body.theme-noir .hero-section p {
    color: var(--text-secondary);
}

body.theme-noir .hero-section-modern::before,
body.theme-noir .hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(transparent 31px, rgba(148, 163, 184, 0.08) 32px),
        linear-gradient(90deg, transparent 31px, rgba(148, 163, 184, 0.08) 32px);
    background-size: 32px 32px;
    opacity: 0.18;
    pointer-events: none;
}

body.theme-noir .hero-content-modern {
    position: relative;
    z-index: 1;
}

body.theme-noir .hero-text-modern h1 {
    font-size: 3.6rem;
    line-height: 1.05;
}

body.theme-noir .hero-text-modern .gradient-text {
    background: linear-gradient(135deg, #22c55e, #86efac);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.theme-noir .hero-buttons-modern .btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.25);
}

body.theme-noir .hero-buttons-modern .btn-secondary {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

body.theme-noir .hero-image-modern img,
body.theme-noir .hero-image-modern>div {
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    transform: rotate(0deg);
}

/* Advanced hero layout (modern+) */
body.theme-noir .hero-section-modern {
    padding-top: 5.5rem;
    padding-bottom: 2.5rem;
    min-height: 68vh;
    margin-top: -1.5rem;
}

body.theme-noir .hero-content-modern {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
    align-items: center;
}

body.theme-noir .hero-text-modern .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    font-size: 0.85rem;
    font-weight: 600;
}

body.theme-noir .hero-text-modern p {
    font-size: 1.05rem;
    max-width: 620px;
}

body.theme-noir .hero-buttons-modern {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

body.theme-noir .hero-meta {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

body.theme-noir .hero-meta .hero-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

body.theme-noir .hero-image-modern {
    position: relative;
    display: grid;
    gap: 1rem;
}

body.theme-noir .hero-image-modern::after {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(300px 200px at 70% 30%, rgba(34, 197, 94, 0.25), transparent 60%);
    z-index: 0;
    pointer-events: none;
}

body.theme-noir .hero-image-modern>div,
body.theme-noir .hero-image-modern img {
    position: relative;
    z-index: 1;
}

body.theme-noir .hero-image-modern img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
}

@media (max-width: 992px) {
    body.theme-noir .hero-section-modern {
        padding-top: 3rem;
        padding-bottom: 2rem;
        min-height: auto;
    }

    body.theme-noir .hero-content-modern {
        display: flex;
        flex-direction: column-reverse;
        gap: 2.5rem !important;
        text-align: center;
        grid-template-columns: 1fr;
    }

    body.theme-noir .hero-text-modern {
        text-align: center;
        max-width: 100%;
    }

    body.theme-noir .hero-text-modern h1 {
        font-size: 2.8rem;
    }

    body.theme-noir .hero-text-modern p {
        margin-left: auto;
        margin-right: auto;
        font-size: 1rem;
    }

    body.theme-noir .hero-buttons-modern {
        justify-content: center;
        gap: 1rem;
    }

    body.theme-noir .hero-meta {
        justify-content: center;
    }

    body.theme-noir .hero-image-modern {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    body.theme-noir .hero-text-modern h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    body.theme-noir .hero-buttons-modern {
        flex-direction: column;
        width: 100%;
    }

    body.theme-noir .hero-buttons-modern .btn {
        width: 100%;
        justify-content: center;
    }

    body.theme-noir .stats-modern {
        margin-top: 0;
        padding-top: 1rem;
    }
}

/* Stats bar under hero */
body.theme-noir .stats-modern {
    background: transparent;
    border: none;
    padding-top: 2.5rem;
    padding-bottom: 0.5rem;
    margin-top: -1rem;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}

/* Custom scrollbar (theme-noir) */
body.theme-noir::-webkit-scrollbar {
    width: 10px;
}

body.theme-noir::-webkit-scrollbar-track {
    background: #0b0f14;
}

body.theme-noir::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #22c55e, #16a34a);
    border-radius: 999px;
    border: 2px solid #0b0f14;
}

body.theme-noir::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4ade80, #22c55e);
}

body.theme-noir {
    scrollbar-color: #22c55e #0b0f14;
    scrollbar-width: thin;
}

body.theme-noir .stats-grid-modern {
    gap: 1.25rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

body.theme-noir .stat-item-modern {
    background: linear-gradient(135deg, rgba(17, 23, 35, 0.95), rgba(12, 16, 24, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    padding: 1.35rem 1.6rem;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

body.theme-noir .stat-item-modern h3 {
    color: var(--text-primary);
    -webkit-text-fill-color: unset;
    font-size: 1.9rem;
}

body.theme-noir .stat-item-modern::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(240px 120px at 15% 20%, rgba(34, 197, 94, 0.2), transparent 60%);
    opacity: 0.7;
    pointer-events: none;
}

body.theme-noir .stat-item-modern::after {
    content: '';
    position: absolute;
    left: 16px;
    top: 16px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.35);
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.2);
}

body.theme-noir .stat-item-modern p {
    position: relative;
    z-index: 1;
}

body.theme-noir .stat-item-modern h3 {
    position: relative;
    z-index: 1;
}

/* Section headers */
body.theme-noir .section-header {
    border-bottom: 1px solid var(--border);
}

body.theme-noir .section-title {
    background: none;
    -webkit-text-fill-color: unset;
    color: var(--text-primary);
}

body.theme-noir .section-title i {
    color: var(--accent-primary);
    -webkit-text-fill-color: var(--accent-primary);
}

/* Cards */
body.theme-noir .card,
body.theme-noir .category-card {
    background: rgba(17, 23, 35, 0.9);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

body.theme-noir .category-card::before,
body.theme-noir .category-card::after,
body.theme-noir .product-card::before {
    display: none;
}

body.theme-noir .category-card:hover {
    border-color: rgba(125, 211, 252, 0.35);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.4);
}

body.theme-noir .category-icon {
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.25);
}

body.theme-noir .categories-grid {
    gap: 2.5rem;
}

/* Product cards - modern layout like modern theme */
body.theme-noir .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 1.5rem;
}

body.theme-noir .product-card {
    height: 320px;
    display: block;
    padding: 0;
    background: rgba(17, 23, 35, 0.85);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

body.theme-noir .product-image {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, #0f172a, #111827);
}

body.theme-noir .product-image::after {
    display: block;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 60%, transparent 100%);
}

body.theme-noir .product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 80px;
}

body.theme-noir .product-badges-right {
    position: absolute;
    top: 15px;
    right: 15px;
}

body.theme-noir .product-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem;
}

body.theme-noir .product-title,
body.theme-noir .product-game-name,
body.theme-noir .product-price,
body.theme-noir .product-price-original {
    text-shadow: none;
}

body.theme-noir .product-title {
    color: var(--text-primary);
}

body.theme-noir .product-game-name {
    color: var(--text-secondary);
}

body.theme-noir .product-price {
    color: var(--accent-primary);
}

body.theme-noir .product-game-logo {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(125, 211, 252, 0.25);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

body.theme-noir .product-badge-featured,
body.theme-noir .product-badge-new,
body.theme-noir .product-badge-custom,
body.theme-noir .product-badge-discount,
body.theme-noir .product-badge-status {
    backdrop-filter: none;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

body.theme-noir .product-badge-status.current {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}

body.theme-noir .product-badge-status.maintenance {
    background: rgba(244, 63, 94, 0.2);
    color: #fda4af;
}

/* Tables & footer */
body.theme-noir .table {
    background: rgba(17, 23, 35, 0.9);
    border: 1px solid var(--border);
}

body.theme-noir .table th {
    background: rgba(15, 23, 42, 0.9);
}

body.theme-noir .footer {
    background: rgba(11, 15, 20, 0.95);
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    body.theme-noir .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    body.theme-noir .product-card {
        height: 240px;
    }
}

@media (max-width: 900px) {
    body.theme-noir .stats-grid-modern {
        grid-template-columns: 1fr;
    }
}