/* AdvStock - Premium Dark Theme CSS */

/* Import Google Fonts - Premium weights */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    /* Background Colors - Dark purple tinted */
    --bg-primary: #0d0d14;
    --bg-secondary: #13131d;
    --bg-tertiary: #1a1a28;
    --bg-card: rgba(22, 22, 35, 0.8);
    --bg-card-hover: rgba(30, 30, 48, 0.9);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #9898a8;
    --text-muted: #5c5c70;

    /* Accent Colors - Purple theme */
    --accent-primary: #a855f7;
    --accent-secondary: #c084fc;
    --accent-success: #3fb950;
    --accent-warning: #d29922;
    --accent-error: #f85149;

    /* Gradients - Purple only */
    --gradient-primary: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
    --gradient-dark: linear-gradient(180deg, #0d0d14 0%, #13131d 100%);
    --gradient-card: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(192, 132, 252, 0.04) 100%);

    /* Borders - Purple tinted */
    --border-color: rgba(168, 85, 247, 0.12);
    --border-radius: 12px;
    --border-radius-lg: 16px;

    /* Shadows - Premium glow effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(168, 85, 247, 0.3);
    --shadow-glow-strong: 0 0 60px rgba(168, 85, 247, 0.5);
    --shadow-glow-subtle: 0 0 20px rgba(168, 85, 247, 0.15);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hide footer */
.footer,
footer.footer {
    display: none !important;
}

/* ==================== FIXED BACKGROUND IMAGE ==================== */
.site-fixed-bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 75vh;
    z-index: 0;
    pointer-events: none;
    background-image: url('https://img.freepik.com/free-vector/night-ocean-landscape-full-moon-stars-shine_107791-7397.jpg?semt=ais_hybrid&w=740&q=80');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0.03;
    filter: blur(8px);
    -webkit-mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.3) 20%,
            rgba(0, 0, 0, 0.1) 40%,
            transparent 60%);
    mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.3) 20%,
            rgba(0, 0, 0, 0.1) 40%,
            transparent 60%);
}

/* Mobile responsive fixed background */
@media (max-width: 768px) {
    .site-fixed-bg {
        height: 100vh;
        opacity: 0.04;
        background-position: center top;
        background-size: cover;
    }
}

/* ==================== LOADING OVERLAY ==================== */
/* Full screen loader that shows until API data loads */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0d0d14;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

/* Modern pulsing spinner */
.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(149, 128, 255, 0.2);
    border-top: 3px solid #9580ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Smaller spinner for stat cards */
.stat-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(149, 128, 255, 0.2);
    border-top: 2px solid #9580ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Pulsing dots alternative (uncomment to use instead) */
/*
.loader-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.loader-dots span {
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite both;
}

.loader-dots span:nth-child(1) { animation-delay: 0s; }
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}
*/

/* Hide page content until loaded */
body:not(.loaded)>*:not(#page-loader):not(script):not(link):not(style) {
    opacity: 0;
}

body.loaded>* {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ==================== FEATURE DISABLED MODAL ==================== */
/* Full-screen blocking modal when a feature is disabled */
#feature-disabled-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#feature-disabled-modal.active {
    opacity: 1;
    visibility: visible;
}

.feature-disabled-content {
    background: linear-gradient(135deg, rgba(30, 27, 45, 0.95), rgba(20, 18, 35, 0.95));
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 16px;
    padding: 40px 50px;
    text-align: center;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 80px rgba(255, 100, 100, 0.1);
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.feature-disabled-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.feature-disabled-title {
    font-size: 24px;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 12px;
}

.feature-disabled-message {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.feature-disabled-btn {
    background: linear-gradient(135deg, #9580ff, #7b5fff);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.feature-disabled-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(149, 128, 255, 0.4);
}

/* ==================== DROPDOWN MENU ==================== */
/* Fix dropdown menu spacing and ensure single-line items */
#dropdown-menu a,
#dropdown-menu button {
    display: block;
    padding: 10px 16px;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s ease;
}

#dropdown-menu a:hover,
#dropdown-menu button:hover {
    background: rgba(149, 128, 255, 0.1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
}

/* Remove iOS tap highlight and focus outlines globally */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}

*:focus,
*:active,
*:focus-visible {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

a,
button,
input,
select,
textarea,
div,
span,
img {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

html {
    scroll-behavior: smooth;
    background-color: #0d0d14;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0d0d14;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Background Ambient Glow Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(ellipse 80% 50% at 20% 15%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 85% 25%, rgba(192, 132, 252, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(ellipse 100% 50% at 50% 0%, rgba(168, 85, 247, 0.06) 0%, transparent 35%);
    pointer-events: none;
    z-index: -1;
}

@keyframes ambientPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.nav {
    background: rgb(15, 15, 24);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(149, 128, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.4));
    transition: all var(--transition-normal);
}

.nav-logo:hover {
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.6));
    transform: scale(1.02);
}

.nav-logo svg {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    transition: all var(--transition-fast);
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(26, 26, 40, 0.95);
    border-color: rgba(149, 128, 255, 0.2);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: transform var(--transition-normal);
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
    color: var(--text-primary);
    background: rgba(26, 26, 40, 0.95);
    border-color: rgba(149, 128, 255, 0.3);
    box-shadow: 0 0 25px rgba(149, 128, 255, 0.2);
}

.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

#user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

#user-dropdown {
    display: flex;
    align-items: center;
}

#user-menu .btn {
    height: 40px;
    padding: 0 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.nav-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none;
    user-select: none;
    outline: none !important;
    box-shadow: none !important;
}

.nav-balance:focus,
.nav-balance:active,
.nav-balance:focus-visible,
.nav-balance *:focus,
.nav-balance *:active {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.nav-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.balance-logout-btn {
    background: transparent;
    border: none;
    padding: 4px;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    border-radius: 4px;
}

.balance-logout-btn:hover {
    color: var(--accent-error);
}

.nav-balance-amount {
    font-weight: 600;
    color: var(--accent-success);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    box-sizing: content-box;
    cursor: pointer;
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    display: block;
}

.nav-avatar:hover {
    transform: scale(1.05);
}

/* Discord Navbar Button */
.discord-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5865F2;
    border-radius: 50%;
    color: white;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    text-decoration: none;
    flex-shrink: 0;
}

.discord-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.5);
    color: white;
}

.discord-nav-btn svg {
    width: 18px;
    height: 18px;
}

/* Floating Discord Button */
.floating-discord-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 0;
    background: #5865F2;
    color: white;
    padding: 14px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.floating-discord-btn:hover {
    padding: 14px 20px 14px 14px;
    gap: 10px;
    box-shadow: 0 6px 30px rgba(88, 101, 242, 0.6);
    transform: translateY(-2px);
}

.floating-discord-btn svg {
    flex-shrink: 0;
}

.floating-discord-text {
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.floating-discord-btn:hover .floating-discord-text {
    max-width: 120px;
    opacity: 1;
}

.floating-discord-btn:hover {
    color: white;
}

/* Hide floating Discord button on mobile */
@media (max-width: 768px) {
    .floating-discord-btn {
        display: none !important;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: rgba(149, 128, 255, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(149, 128, 255, 0.35);
}

.btn-primary:hover {
    background: rgba(149, 128, 255, 0.25);
    border-color: rgba(149, 128, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(149, 128, 255, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.btn-success {
    background: rgba(59, 178, 115, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(59, 178, 115, 0.35);
}

.btn-success:hover {
    background: rgba(59, 178, 115, 0.25);
    border-color: rgba(59, 178, 115, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 178, 115, 0.25);
}

.btn-danger,
.btn-error {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.35);
}

.btn-danger:hover,
.btn-error:hover {
    background: rgba(248, 81, 73, 0.25);
    border-color: rgba(248, 81, 73, 0.5);
    transform: translateY(-1px);
}

.btn-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.btn-warning:hover {
    background: rgba(251, 191, 36, 0.25);
    border-color: rgba(251, 191, 36, 0.5);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-icon {
    padding: 10px;
    border-radius: 50%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Cards */
.card {
    background: rgba(18, 18, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(149, 128, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card:hover {
    background: rgba(24, 24, 40, 0.98);
    border-color: rgba(149, 128, 255, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(149, 128, 255, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 0 80px;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.3);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #3fb950;
    margin-bottom: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #3fb950;
    border-radius: 50%;
    box-shadow: 0 0 8px #3fb950;
}

/* Vouches Card Link */
.vouches-card {
    text-decoration: none;
    cursor: pointer;
}

.vouches-card:hover {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 8px 32px rgba(251, 191, 36, 0.2);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

/* Glowing text effect for brand name */
.glow-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(149, 128, 255, 0.5)) drop-shadow(0 0 40px rgba(149, 128, 255, 0.3));
}

/* White text with matching glow */
.glow-text-white {
    color: white;
    -webkit-text-fill-color: white;
    filter: drop-shadow(0 0 15px rgba(149, 128, 255, 0.4)) drop-shadow(0 0 30px rgba(149, 128, 255, 0.2));
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 60px;
    margin-bottom: 40px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Modern Stats Grid - StreamYikes Style */
.modern-stats-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 60px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.modern-stat-card {
    background: rgba(20, 20, 35, 0.9);
    border: 1px solid rgba(149, 128, 255, 0.2);
    border-radius: 16px;
    padding: 32px 48px;
    text-align: center;
    min-width: 180px;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.modern-stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(149, 128, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.modern-stat-card:hover {
    border-color: rgba(149, 128, 255, 0.5);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(149, 128, 255, 0.25), 0 0 30px rgba(149, 128, 255, 0.15);
}

.modern-stat-value {
    font-size: 2.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1;
}

.modern-stat-value.modern-stat-highlight {
    font-size: 3rem;
}

.modern-stat-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .modern-stats-grid {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .modern-stat-card {
        width: 100%;
        max-width: 300px;
        padding: 24px 32px;
    }

    .modern-stat-value {
        font-size: 2.2rem;
    }

    .modern-stat-value.modern-stat-highlight {
        font-size: 2.4rem;
    }
}

/* Category Filters - Minimal Floating Pills */
.categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding: 0;
    justify-content: center;
}

.category-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(149, 128, 255, 0.3);
    border-radius: 20px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.category-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: rgba(149, 128, 255, 0.08);
}

.category-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    font-weight: 600;
}

/* Category count - simple inline */
.category-btn .category-count {
    opacity: 0.7;
    font-size: 0.8rem;
}

.category-btn.active .category-count {
    opacity: 0.9;
}

/* Mobile - wrap to show all */
@media (max-width: 768px) {
    .categories {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding: 0 8px;
        margin-bottom: 20px;
    }

    .category-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
        border-radius: 16px;
    }

    .category-btn .category-count {
        font-size: 0.7rem;
    }
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.product-card {
    background: rgba(18, 18, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(149, 128, 255, 0.2);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.product-card:hover {
    background: rgba(24, 24, 40, 0.98);
    border-color: rgba(149, 128, 255, 0.6);
    transform: translateY(-8px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(149, 128, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.product-card-content {
    padding: 24px;
}

.product-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.product-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.stock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stock-indicator.in-stock {
    background: var(--accent-success);
    box-shadow: 0 0 8px var(--accent-success);
}

.stock-indicator.out-of-stock {
    background: var(--accent-error);
    box-shadow: 0 0 8px var(--accent-error);
}

.product-actions {
    padding: 16px 24px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
    border-top: 1px solid rgba(149, 128, 255, 0.15);
}

/* Modal - NO fade animations, instant show/hide */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(149, 128, 255, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Fix dropdown option styling for dark theme */
select,
.form-select {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

select option,
.form-select option {
    background-color: #1a1a2e;
    color: #e0e0e0;
    padding: 8px 12px;
}

select option:hover,
.form-select option:hover,
select option:checked,
.form-select option:checked {
    background-color: var(--accent-primary);
    color: white;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quantity-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.quantity-input {
    width: 60px;
    height: 40px;
    text-align: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    box-sizing: border-box;
}

/* Dashboard */
.dashboard {
    padding: 60px 0 40px;
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.dashboard-header {
    margin-bottom: 40px;
    padding-top: 20px;
    position: relative;
    z-index: 1;
}

/* Modern Dashboard Header with Icon Box */
.dashboard-header-modern {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
    padding-top: 20px;
    position: relative;
    z-index: 1;
}

.dashboard-icon-box {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: linear-gradient(135deg, rgba(149, 128, 255, 0.2) 0%, rgba(88, 166, 255, 0.15) 100%);
    border: 1px solid rgba(149, 128, 255, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 20px rgba(149, 128, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dashboard-header-content {
    flex: 1;
}

.dashboard-title {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.dashboard-subtitle {
    color: #a0a0b0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
    .dashboard-header-modern {
        gap: 16px;
    }

    .dashboard-icon-box {
        width: 48px;
        height: 48px;
        min-width: 48px;
        font-size: 1.4rem;
        border-radius: 12px;
    }

    .dashboard-title {
        font-size: 1.5rem;
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    text-align: center;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 1.5rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-card-label {
    color: var(--text-secondary);
}

/* Tables - Premium Design */
.table-container {
    overflow-x: auto;
    margin-top: 24px;
    border-radius: var(--border-radius-lg);
    background: rgba(15, 15, 25, 0.6);
    border: 1px solid rgba(149, 128, 255, 0.15);
    backdrop-filter: blur(10px);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    background: linear-gradient(135deg, rgba(149, 128, 255, 0.12) 0%, rgba(149, 128, 255, 0.05) 100%);
}

.table th,
.table td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(149, 128, 255, 0.1);
}

.table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: transparent;
    border-bottom: 1px solid rgba(149, 128, 255, 0.2);
}

.table th:first-child {
    border-top-left-radius: var(--border-radius);
}

.table th:last-child {
    border-top-right-radius: var(--border-radius);
}

.table tbody tr {
    transition: all var(--transition-fast);
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(149, 128, 255, 0.08) 0%, rgba(149, 128, 255, 0.04) 100%);
}

.table tbody tr:hover td {
    color: var(--text-primary);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--border-radius);
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--border-radius);
}

/* Admin Panel Data Tables - Premium Design */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(15, 15, 25, 0.6);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(149, 128, 255, 0.15);
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(135deg, rgba(149, 128, 255, 0.12) 0%, rgba(149, 128, 255, 0.05) 100%);
}

.data-table th,
.data-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(149, 128, 255, 0.1);
}

.data-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: transparent;
    border-bottom: 1px solid rgba(149, 128, 255, 0.2);
}

.data-table tbody tr {
    transition: all var(--transition-fast);
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(149, 128, 255, 0.08) 0%, rgba(149, 128, 255, 0.04) 100%);
}

.data-table tbody tr:hover td {
    color: var(--text-primary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge - Premium */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(63, 185, 80, 0.3);
    box-shadow: 0 0 10px rgba(63, 185, 80, 0.15);
}

.badge-warning {
    background: rgba(210, 153, 34, 0.15);
    color: var(--accent-warning);
    border: 1px solid rgba(210, 153, 34, 0.3);
    box-shadow: 0 0 10px rgba(210, 153, 34, 0.15);
}

.badge-error {
    background: rgba(248, 81, 73, 0.15);
    color: var(--accent-error);
    border: 1px solid rgba(248, 81, 73, 0.3);
    box-shadow: 0 0 10px rgba(248, 81, 73, 0.15);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.tab {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    background: var(--accent-primary);
    color: white;
}

/* Deposit Section */
.deposit-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.deposit-method {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(36, 36, 66, 0.6) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.deposit-method:hover {
    background: linear-gradient(135deg, rgba(149, 128, 255, 0.15) 0%, rgba(88, 166, 255, 0.1) 100%);
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(149, 128, 255, 0.2);
}

.deposit-method-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.deposit-method-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.deposit-method-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Crypto Address Display */
.crypto-address {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-top: 16px;
}

.crypto-address-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.crypto-address-value {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crypto-address-text {
    flex: 1;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.copy-btn {
    padding: 8px 12px;
    background: var(--accent-primary);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    background: #a692ff;
}

/* QR Code */
.qr-container {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.qr-code {
    padding: 16px;
    background: white;
    border-radius: var(--border-radius);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    border-left: 4px solid var(--accent-success);
}

.toast-error {
    border-left: 4px solid var(--accent-error);
}

.toast-info {
    border-left: 4px solid var(--accent-secondary);
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-content .spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    margin-top: 80px;
    text-align: center;
    color: var(--text-muted);
}

/* Responsive - Tablet */
@media (max-width: 992px) {
    .container {
        padding: 0 16px;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .nav-user {
        gap: 8px;
    }

    .nav-balance {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .discord-nav-btn {
        width: 32px;
        height: 32px;
    }

    .nav-avatar {
        width: 28px;
        height: 28px;
    }
}

/* Responsive - Small Tablet */
@media (max-width: 850px) {
    .nav-link {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    .nav-links {
        gap: 2px;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-balance {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {

    /* Typography */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .section-subtitle {
        font-size: 0.875rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
        margin-bottom: 32px;
    }

    .categories {
        padding: 16px 0;
        gap: 10px;
    }

    /* Navigation */
    .nav-content {
        padding: 0 12px;
    }

    .nav-links {
        display: none;
    }

    .nav-logo {
        font-size: 1.2rem;
        display: flex !important;
        align-items: center;
    }

    .nav-logo svg.brand-logo-default {
        width: 24px !important;
        height: 24px !important;
    }

    .nav-logo .brand-logo {
        width: 24px !important;
        height: 24px !important;
    }

    .nav-balance {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .nav-avatar {
        width: 32px;
        height: 32px;
    }

    .nav-user {
        gap: 8px;
    }

    #user-menu .btn {
        display: none;
    }

    #user-menu .nav-avatar {
        display: block;
    }

    /* Mobile menu container */
    .mobile-nav-menu {
        position: fixed;
        top: 72px;
        right: 0;
        width: 280px;
        max-width: 90vw;
        background: linear-gradient(180deg, rgba(22, 22, 35, 0.98) 0%, rgba(19, 19, 29, 0.99) 100%);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid rgba(149, 128, 255, 0.15);
        border-bottom: 1px solid rgba(149, 128, 255, 0.15);
        border-bottom-left-radius: 16px;
        box-shadow: -4px 8px 32px rgba(0, 0, 0, 0.5);
        z-index: 999;
        padding: 16px 0;
        transform: translateX(100%);
        transition: transform 0.25s ease;
    }

    .mobile-nav-menu.active {
        transform: translateX(0);
    }

    .mobile-nav-menu a,
    .mobile-nav-menu button {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 14px 20px;
        background: none;
        border: none;
        color: var(--text-secondary);
        font-size: 0.95rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        text-decoration: none;
    }

    .mobile-nav-menu a:hover,
    .mobile-nav-menu button:hover {
        background: rgba(149, 128, 255, 0.1);
        color: var(--text-primary);
    }

    .mobile-nav-menu .menu-divider {
        height: 1px;
        background: var(--border-color);
        margin: 12px 16px;
    }

    .mobile-nav-menu .logout-btn {
        color: var(--accent-error);
    }

    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile hamburger menu button */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--bg-tertiary);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-menu-btn:hover {
        background: rgba(149, 128, 255, 0.15);
        border-color: rgba(149, 128, 255, 0.3);
    }

    /* Grids */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    /* Cards */
    .card {
        padding: 16px;
    }

    .product-card {
        padding: 16px;
    }

    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    #login-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    #login-btn svg {
        width: 16px;
        height: 16px;
    }

    /* Modal */
    .modal {
        margin: 12px;
        max-height: calc(100vh - 24px);
        width: calc(100% - 24px);
        max-width: none;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    /* Forms */
    .form-group {
        margin-bottom: 12px;
    }

    input,
    select,
    textarea {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
    }

    /* Tables - make scrollable */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    /* Dropdown menu positioning */
    #dropdown-menu {
        right: -10px !important;
        min-width: 160px !important;
    }

    /* Section padding */
    section {
        padding: 16px 0;
    }

    .hero {
        padding-top: 24px;
    }

    /* Footer */
    footer {
        padding: 16px;
        font-size: 0.85rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .nav-balance-amount {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-name {
        display: none;
    }

    /* Hide login button text on very small screens */
    #login-btn {
        padding: 8px 10px;
    }

    .login-text {
        display: none;
    }

    .product-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .modal {
        margin: 8px;
        max-height: calc(100vh - 16px);
        width: calc(100% - 16px);
    }

    /* Stack form buttons */
    .form-actions {
        flex-direction: column;
        gap: 8px;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-success {
    color: var(--accent-success);
}

.text-error {
    color: var(--accent-error);
}

.text-muted {
    color: var(--text-muted);
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}

.table-container {
    width: 100%;
}

.mobile-only {
    display: none;
}

/* Mobile nav - hidden on desktop */
.mobile-nav-menu,
.mobile-nav-overlay,
.mobile-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    .mobile-nav-menu,
    .mobile-nav-overlay {
        display: block;
    }

    /* Show hamburger button on mobile - but only when it doesn't have hidden class */
    .mobile-menu-btn:not(.hidden) {
        display: flex;
    }
}

/* ==================== INLINE ICON SYSTEM ==================== */
/* Base icon class for inline SVG icons */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

.icon svg {
    width: 100%;
    height: 100%;
}

/* Icon size variants */
.icon-sm {
    width: 0.875em;
    height: 0.875em;
}

.icon-lg {
    width: 1.25em;
    height: 1.25em;
}

.icon-xl {
    width: 1.5em;
    height: 1.5em;
}

.icon-2xl {
    width: 2em;
    height: 2em;
}

.icon-3xl {
    width: 2.5em;
    height: 2.5em;
}

.icon-4xl {
    width: 3em;
    height: 3em;
}

.icon-5xl {
    width: 4em;
    height: 4em;
}

/* Status indicator dots */
.status-dot-green {
    color: #3fb950;
}

.status-dot-red {
    color: #f85149;
}

.status-dot-yellow {
    color: #d29922;
}

.status-dot-orange {
    color: #ff8c00;
}

/* ==================== CATEGORY-FIRST NAVIGATION ==================== */

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(149, 128, 255, 0.1);
    border: 1px solid rgba(149, 128, 255, 0.4);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent-primary);
    margin-bottom: 14px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 14px 0;
    letter-spacing: -0.5px;
}

.section-underline {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    margin: 0 auto 18px auto;
    border-radius: 3px;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 auto 40px auto;
    max-width: 600px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 60px;
}

/* Category Card */
.category-card {
    position: relative;
    min-height: 200px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(145deg,
            rgba(30, 30, 45, 0.9) 0%,
            rgba(20, 20, 30, 0.95) 100%);
    border: 1px solid rgba(149, 128, 255, 0.2);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(149, 128, 255, 0.6);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(149, 128, 255, 0.2);
}

.category-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    transition: opacity 0.4s ease, transform 0.5s ease;
}

.category-card:hover .category-card-image {
    opacity: 0.55;
    transform: scale(1.05);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(13, 13, 20, 0.4) 40%,
            rgba(13, 13, 20, 0.95) 100%);
}

.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 1;
}

.category-card-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.category-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.category-card-price {
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-card-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Category Card Placeholder (no image) */
.category-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
            rgba(149, 128, 255, 0.08) 0%,
            rgba(88, 166, 255, 0.04) 50%,
            rgba(149, 128, 255, 0.08) 100%);
}

.category-card-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%,
            rgba(149, 128, 255, 0.15) 0%,
            transparent 60%);
}

.category-card-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.25;
    color: var(--accent-primary);
    position: relative;
    z-index: 1;
}

/* Glassmorphic Modal */
.glass-modal {
    background: rgba(18, 18, 30, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(149, 128, 255, 0.2);
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(149, 128, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glass-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(149, 128, 255, 0.15);
    background: rgba(149, 128, 255, 0.05);
}

.glass-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.glass-modal-title-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(149, 128, 255, 0.15);
    border-radius: 12px;
    color: var(--accent-primary);
}

.glass-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.2s ease;
}

.glass-modal-close:hover {
    background: rgba(248, 81, 73, 0.15);
    border-color: rgba(248, 81, 73, 0.3);
    color: #f85149;
}

.glass-modal-body {
    padding: 20px 28px 28px;
    max-height: calc(85vh - 90px);
    overflow-y: auto;
}

/* Product Row (inside category modal) */
.product-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(30, 30, 45, 0.6);
    border: 1px solid rgba(139, 148, 158, 0.1);
    border-radius: 14px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.product-row:last-child {
    margin-bottom: 0;
}

.product-row:hover {
    background: rgba(40, 40, 60, 0.7);
    border-color: rgba(149, 128, 255, 0.25);
}

.product-row-image {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(149, 128, 255, 0.1);
    flex-shrink: 0;
}

.product-row-info {
    flex: 1;
    min-width: 0;
}

.product-row-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-row-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.product-row-price {
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-row-stock {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
}

.product-row-stock.in-stock {
    color: var(--accent-success);
}

.product-row-stock.out-of-stock {
    color: var(--accent-error);
}

.product-row-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.product-row-btn {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-row-btn.buy {
    background: rgba(149, 128, 255, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(149, 128, 255, 0.35);
}

.product-row-btn.buy:hover:not(:disabled) {
    background: rgba(149, 128, 255, 0.25);
    border-color: rgba(149, 128, 255, 0.5);
}

.product-row-btn.buy:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.product-row-btn.info {
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(88, 166, 255, 0.25);
}

.product-row-btn.info:hover {
    background: rgba(88, 166, 255, 0.2);
    border-color: rgba(88, 166, 255, 0.4);
}

/* Product Detail View */
.product-detail-modal {
    background: rgba(13, 13, 20, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(149, 128, 255, 0.2);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(149, 128, 255, 0.15);
    /* Use flexbox layout to keep footer visible */
    display: flex;
    flex-direction: column;
}

/* Header bar */
.product-detail-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(149, 128, 255, 0.15);
    background: rgba(149, 128, 255, 0.05);
}

/* Header pills container */
.product-detail-header-pills {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

/* Pill style for header items */
.product-detail-pill {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(149, 128, 255, 0.12);
    border: 1px solid rgba(149, 128, 255, 0.25);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-primary);
    white-space: nowrap;
}

.product-detail-pill-title {
    background: rgba(30, 30, 45, 0.8);
    border-color: rgba(139, 148, 158, 0.2);
    color: #fff;
    font-weight: 600;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-detail-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.2s ease;
}

.product-detail-close-btn:hover {
    background: rgba(248, 81, 73, 0.15);
    border-color: rgba(248, 81, 73, 0.3);
    color: #f85149;
}

.product-detail-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.2s ease;
    z-index: 10;
}

.product-detail-close:hover {
    background: rgba(248, 81, 73, 0.3);
    border-color: rgba(248, 81, 73, 0.5);
}

.product-detail-back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(149, 128, 255, 0.1);
    border: 1px solid rgba(149, 128, 255, 0.25);
    border-radius: 10px;
    color: var(--accent-primary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.product-detail-back:hover {
    background: rgba(149, 128, 255, 0.2);
    border-color: rgba(149, 128, 255, 0.4);
}

/* Product Image in Modal */
.product-detail-image-wrapper {
    width: 100%;
    max-height: 220px;
    overflow: hidden;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(149, 128, 255, 0.15);
}

.product-detail-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Scrollable body */
.product-detail-body {
    padding: 24px 28px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.product-detail-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Markdown styling in description */
.product-detail-description h1,
.product-detail-description h2,
.product-detail-description h3 {
    color: #fff;
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.product-detail-description h1 {
    font-size: 1.3rem;
}

.product-detail-description h2 {
    font-size: 1.15rem;
}

.product-detail-description h3 {
    font-size: 1rem;
}

.product-detail-description strong {
    color: #fff;
    font-weight: 600;
}

.product-detail-description ul {
    padding-left: 1.25em;
    margin: 0.5em 0;
}

.product-detail-description li {
    margin-bottom: 0.4em;
}

/* Fixed footer */
.product-detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid rgba(149, 128, 255, 0.15);
    background: rgba(149, 128, 255, 0.05);
}

.product-detail-footer-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-detail-price {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-detail-stock {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.product-detail-footer-buttons {
    display: flex;
    gap: 10px;
}

.product-detail-buy-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-primary), #7b5fff);
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(149, 128, 255, 0.3);
}

.product-detail-buy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(149, 128, 255, 0.4);
}

.product-detail-buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive for Category Navigation */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .category-card {
        min-height: 180px;
    }

    .category-card-name {
        font-size: 1.25rem;
    }

    .glass-modal {
        max-width: 95%;
        max-height: 90vh;
        border-radius: 20px;
    }

    .glass-modal-header {
        padding: 18px 20px;
    }

    .glass-modal-title {
        font-size: 1.2rem;
    }

    .glass-modal-body {
        padding: 16px 20px 20px;
    }

    .product-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .product-row-actions {
        width: 100%;
        justify-content: stretch;
    }

    .product-row-btn {
        flex: 1;
        justify-content: center;
    }

    .product-detail-modal {
        max-width: 95%;
        border-radius: 20px;
    }

    .product-detail-header {
        height: 160px;
    }

    .product-detail-title {
        font-size: 1.4rem;
    }

    .product-detail-price {
        font-size: 1.5rem;
    }
}