:root {
    /* Colors */
    --color-bg: #0f0f0f;
    --color-surface: rgba(255, 255, 255, 0.03);
    --color-surface-hover: rgba(255, 255, 255, 0.08);
    --color-primary: #f59e0b;
    /* Amber 500 */
    --color-primary-hover: #d97706;
    /* Amber 600 */
    --color-primary-glow: rgba(245, 158, 11, 0.3);
    --color-text: #ffffff;
    --color-text-muted: #a1a1aa;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-success: #10b981;
    --color-danger: #ef4444;

    /* Spacing & Radius */
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --container-width: 1200px;

    /* Effects */
    --glass-bg: rgba(20, 20, 20, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --backdrop-blur: blur(24px);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px var(--color-primary-glow);
}

body {
    margin: 0;
    font-family: 'Fira Sans', sans-serif;
    background-color: var(--color-bg);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 25%);
    background-attachment: fixed;
    color: var(--color-text);
    min-height: 100vh;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Glassmorphism Components */
.card,
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), var(--shadow-glow);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 0;
    letter-spacing: -0.5px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: var(--color-primary);
}

/* Inputs */
.input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    color: white;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-family: 'Fira Sans', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-size: 0.95rem;
}

.input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
    background: rgba(0, 0, 0, 0.4);
}

select.input option {
    background: #1a1a1a;
    color: #fff;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    font-size: 1rem;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: #000;
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--color-primary-glow);
    filter: brightness(1.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Navbar */
.navbar {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cormorant', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    text-shadow: 0 0 10px var(--color-primary-glow);
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-links a:hover {
    background: var(--color-surface);
    color: var(--color-primary);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

th {
    text-align: left;
    padding: 16px;
    color: var(--color-text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--color-border);
}

td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--color-text);
}

tr:hover td {
    background: var(--color-surface);
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* --- PRODUCT DETAIL FORM --- */
.qty-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 5px;
    height: 60px;
}

.qty-btn {
    width: 50px;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

/* Premium Text Styles */
.text-premium {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    text-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
    display: inline-block;
}

.text-premium-soft {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
    font-weight: 600;
}

.glass-card h3 {
    border-bottom: 2px solid rgba(245, 158, 11, 0.2);
    padding-bottom: 10px;
    display: inline-block;
    margin-bottom: 20px;
}

.qty-input {
    width: 60px;
    height: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-large-cart {
    width: 100%;
    height: 60px;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tabs */
.tab-btn {
    background: transparent;
    border: none;
    font-size: 1rem;
    color: var(--color-text-muted);
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
    font-weight: 500;
}

.tab-btn:hover {
    color: white;
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- PREMIUM PRODUCT RIBBONS --- */
.product-card-wrapper {
    position: relative;
    overflow: hidden !important;
    /* Forces clip for ribbons */
}

.gamer-ribbon {
    position: absolute;
    top: 15px;
    left: -35px;
    width: 140px;
    padding: 6px 0;
    background: var(--color-primary);
    color: #000;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    transform: rotate(-45deg);
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    letter-spacing: 1px;
}

.gamer-ribbon.discount {
    background: #ef4444;
    /* Red for discount */
    color: #fff;
}

.gamer-ribbon.bestseller {
    background: #f59e0b;
    /* Gold/Amber */
    color: #000;
}

.gamer-ribbon.low-stock {
    background: #7c3aed;
    /* Purple for urgency */
    color: #fff;
}

.ribbon-4d-reflect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    animation: ribbonEffect 2s infinite linear;
}

@keyframes ribbonEffect {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Preloader Styles */
#gamer-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.preloader-logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    text-align: center;
}

.preloader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.preloader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: var(--color-primary);
    box-shadow: 0 0 15px var(--color-primary-glow);
    animation: preloaderBar 2.5s infinite ease-in-out;
}

@keyframes preloaderBar {
    0% {
        width: 0;
        left: 0;
    }

    50% {
        width: 100%;
        left: 0;
    }

    100% {
        width: 0;
        left: 100%;
    }
}

/* --- BENTO GRID SYSTEM 4D --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(130px, auto);
    gap: 20px;
    margin-bottom: 30px;
}

.bento-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.bento-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px var(--color-primary-glow);
}

.bento-item h4 {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    margin-top: 0;
}

/* 4D Badges & Stats */
.badge-4d {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-rank {
    background: linear-gradient(135deg, var(--color-primary), #d97706);
    color: #000;
    box-shadow: 0 0 15px var(--color-primary-glow);
}

.stat-value-4d {
    font-size: 2.2rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    display: block;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* XP Progress Bar */
.xp-progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0 10px;
}

.xp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #fbbf24);
    box-shadow: 0 0 10px var(--color-primary-glow);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-item {
        grid-column: span 1 / auto !important;
    }

    .bento-item[style*="span 2"] {
        grid-column: span 2 / auto !important;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-item {
        grid-column: auto !important;
    }
}

/* --- ORDER JOURNEY (PROGRESS STEPS) --- */
.order-journey {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 50px;
    padding: 0 10px;
}

.order-journey::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.journey-step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 20%;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: #1a1a1a;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: var(--color-text-muted);
    transition: all 0.5s ease;
    background: var(--color-bg);
}

.step-label {
    font-size: 0.75rem;
    font-family: 'Fira Sans', sans-serif;
    color: var(--color-text-muted);
    font-weight: 500;
}

.journey-step.active .step-icon {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 20px var(--color-primary-glow);
    background: rgba(245, 158, 11, 0.05);
}

.journey-step.active .step-label {
    color: var(--color-primary);
    font-weight: 700;
}

.journey-step.completed .step-icon {
    background: var(--color-success);
    border-color: var(--color-success);
    color: #000;
}

.journey-step.completed .step-label {
    color: var(--color-success);
}