/* X-GATE PREMIUM STYLESHEET 
    Theme: McLaren High-Performance (Midnight/Orange)
    Features: Global Ticker, Vault Scanner, Dynamic Supply Gauges
*/

:root { 
    --mclaren-deep: #E0610E;
    --mclaren-papaya: #FF9800; 
    --bg: #F5F7FA;      /* Light Grey/White */
    --card-bg: #FFFFFF; 
    --text-main: #1A1A1A;
    --text-dim: #64748b;
    --border: rgba(0, 0, 0, 0.1);
}

#user-menu {
    display: none;
}

#user-menu[style*="display: block"] #user-pill {
    display: flex !important;
}

/* Forces the Dashboard selection boxes to stay in a row */
.dashboard-menu, .tab-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap; /* Prevents them from stacking vertically */
    width: 100%;
}

/* Ensure the boxes don't take up 100% width and force a wrap */
.dashboard-menu .card, .tab-container .btn-p {
    flex: 1;
    max-width: 300px;
    min-width: 200px;
}

.card[style*="#27ae60"] .btn-p {
    background: linear-gradient(135deg, #1e8449 0%, #27ae60 100%);
}

/* --- FIX: TAB BUTTONS (Center & Hover) --- */
/* This makes marketplace/vault buttons transparent until hover */
.tab-container .btn-p {
    background: transparent !important;
    border: 1px solid #ddd !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
    position: relative; /* For badge positioning */
}

.tab-container .btn-p:hover, .tab-container .btn-p.active-tab {
    border-color: var(--mclaren-papaya) !important;
    color: var(--mclaren-papaya) !important;
    background: rgba(255, 152, 0, 0.05) !important;
}

.notification-badge {
    background-color: #ff4444; color: white; border-radius: 50%;
    padding: 1px 6px; font-size: 0.7rem; font-weight: bold;
    position: absolute; top: -5px; right: -5px;
    border: 2px solid white;
}

#seller-notification-bar {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-left: 5px solid rgba(0,0,0,0.2);
    animation: slideDown 0.5s ease;
}

.file-status-text {
    font-size: 0.7rem;
    color: var(--mclaren-papaya);
    margin-top: 4px;
    font-style: italic;
    min-height: 12px;
}

.xgate-upload-container {
    position: relative;
    width: 100%;
    height: 50px;
    margin-bottom: 5px;
}

.xgate-real-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0; /* Browser sees it, User doesn't */
    z-index: 2; /* It sits on top of the skin */
    cursor: pointer;
}

.xgate-upload-skin {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--card-bg); /* Use your existing orange/dark theme */
    border: 1px solid var(--mclaren-papaya);
    color: var(--mclaren-papaya);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: bold;
    z-index: 1; /* Sits behind the real input */
    pointer-events: none; /* Clicks pass through to the real input */
}

/* Visual Feedback when hovering/clicking the invisible input */
.xgate-real-input:hover + .xgate-upload-skin {
    background: rgba(255, 152, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.2);
}

.xgate-real-input:active + .xgate-upload-skin {
    transform: scale(0.98);
    background: rgba(255, 152, 0, 0.2);
}

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

.delist-btn {
    background: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s;
}
.delist-btn:hover {
    background: #e74c3c;
    color: white;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-filters {
    display: none; /* Hidden by default on desktop */
}

/* --- SEARCH BAR --- */
#market-search {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    width: 200px;
    transition: all 0.3s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
#market-search:focus {
    border-color: var(--mclaren-papaya);
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.15);
    width: 260px;
}

/* Specific override for the Dashboard selection grid */
#dashboard-view .grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto; /* Centers the whole grid */
}

/* Ensure Dashboard cards stay big and clickable */
#dashboard-view .card {
    padding: 50px 30px; 
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#dashboard-view .card:hover {
    background: rgba(255, 152, 0, 0.05);
    border-color: var(--mclaren-papaya);
    box-shadow: 0 0 30px rgba(255, 152, 0, 0.15);
}

.hero-logo-large {
    position: fixed;
    top: 2.5rem;  /* 2.5 margin from top (starts below ticker) */
    left: 2.5rem; /* 2.5 margin from left */
    width: 120px !important; /* Smaller size for the corner */
    height: auto;
    margin: 0 !important;
    display: block;
    border-radius: 24px;
    z-index: 1002; /* Sits above Navbar (1000) and Ticker (1001) */
    box-shadow: 0 5px 20px rgba(0,0,0,0.2); /* Adds depth over the navbar */
}

/* Reset on Mobile so it doesn't block the screen */
@media (max-width: 768px) {
    .hero-logo-large {
        position: static;
        width: 200px !important;
        margin: 0 auto 25px auto !important;
        box-shadow: none;
    }
}

.view-section {
    padding-top: 140px !important; 
}

#marketplace-view {
    padding-top: 150px !important;
}

#market-filters {
    position: sticky;
    top: 110px; 
    z-index: 100;
    background: var(--bg);
    padding: 10px 0;
}

/* --- BASE STYLES --- */
body { 
    background-color: var(--bg); 
    color: var(--text-main); 
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 0; 
    overflow-x: hidden;
    text-align: center; /* Ensures guest view content is centered */
    background-image: radial-gradient(circle at top right, rgba(255, 152, 0, 0.03), transparent);
}

/* Custom Scrollbar for the whole page and rails */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a0a0f; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--mclaren-papaya); }

/* --- 1. GLOBAL ACTIVITY TICKER --- */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: #0a0a0f;
    border-bottom: 1px solid var(--mclaren-papaya);
    padding: 8px 0;
    position: fixed;
    top: 0;
    z-index: 1001;
}

.ticker {
    display: inline-block;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--mclaren-papaya);
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(255, 152, 0, 0.4);
    letter-spacing: 1.5px;
    animation: ticker-scroll 35s linear infinite;
    padding-left: 100%;
}

@keyframes ticker-scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* --- 2. NAVIGATION --- */
nav {
    position: fixed;
    top: 35px !important; 
    width: 100%;
    display: flex;
    justify-content: center; 
    padding: 25px 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 50px;
}

.nav-link {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--mclaren-papaya);
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.4);
}

/* Social Links in Nav */
.nav-socials {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-social-link {
    font-size: 0.9rem;
    font-weight: 600;
}

/* --- MATCHING DROPDOWN STYLE --- */
.wallet-dropdown { 
    position: relative; 
    display: inline-block; 
    padding-bottom: 10px;
    margin-bottom: -10px;
}

/* This makes the "Wallet Address" look exactly like the Connect Button */
.user-pill {
    background: linear-gradient(135deg, var(--mclaren-deep) 0%, var(--mclaren-papaya) 100%);
    color: white; 
    border: none; 
    padding: 14px 28px; 
    border-radius: 4px;
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.user-pill:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.3);
}

/* The Menu Box */
.dropdown-content {
    display: none; 
    position: absolute; 
    right: 0; 
    top: 100%; /* Sits flush against the bottom of the padding bridge */
    background: #ffffff;
    min-width: 220px; 
    border: 1px solid var(--mclaren-papaya); 
    border-radius: 4px;
    z-index: 9999 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    padding: 0;
}

.wallet-dropdown:hover .dropdown-content { 
    display: block !important; 
    animation: fadeIn 0.2s ease-out;
}

/* Individual Links in the Dropdown */
.dropdown-item {
    padding: 14px 20px; 
    color: var(--text-main); 
    text-decoration: none;
    display: block; 
    cursor: pointer; 
    text-align: left; 
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: 0.2s;
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* Hovering over a menu item */
.dropdown-item:hover { 
    background: linear-gradient(90deg, rgba(224, 97, 14, 0.2) 0%, transparent 100%);
    color: var(--mclaren-papaya);
    padding-left: 25px; /* Subtle "slide" effect on hover */
}

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

/* --- 3. HERO & BRANDING --- */
.hero-brand { padding: 40px 20px 60px; text-align: center; }
.hero-title { font-size: 3.5rem; font-weight: 900; margin: 0; letter-spacing: -1px; }
.orange-text { 
    color: var(--mclaren-papaya); 
    background: linear-gradient(to bottom, #FFB74D, #FF9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- 4. GRID SYSTEM --- */
.grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    width: 100%;
}

.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border: 2px solid var(--mclaren-papaya);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--mclaren-papaya);
}

.card.sold-out {
    opacity: 0.6;
    filter: grayscale(0.8);
    cursor: not-allowed;
}
.card.sold-out:hover {
    transform: none;
    border-color: #ccc;
    box-shadow: none;
}
.sold-out-text { color: #e74c3c !important; font-weight: 900; letter-spacing: 1px; }

.card-image-wrap {
    width: 100%; height: 160px; 
    background: #f0f0f0; margin-bottom: 15px; border-radius: 4px;
    display: flex; justify-content: center; align-items: center; overflow: hidden;
}
.card-img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* --- 5. SUPPLY GAUGES --- */
.supply-gauge-wrap {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid #ccc;
}

.supply-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--mclaren-deep), var(--mclaren-papaya));
    box-shadow: 0 0 8px var(--mclaren-papaya);
    transition: width 1s ease-in-out;
}

/* --- 6. VAULT SCANNER & MODAL --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(240, 240, 245, 0.95); backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center; z-index: 9999;
}

.modal-content {
    background: #ffffff; 
    border: 2px solid var(--mclaren-papaya);
    padding: 40px; 
    border-radius: 4px; 
    text-align: center; 
    width: 400px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

/* Desktop Modal Sizing - Restrict width & Height */
#status-modal .modal-content {
    width: 30%;
    min-width: 380px;
    max-width: 550px;
    max-height: 90vh; /* Prevent vertical overflow */
    overflow-y: auto; /* Scroll if content is too tall */
}

/* --- NEW PRODUCT MODAL LAYOUT --- */
#status-modal .modal-content.product-modal {
    width: 60% !important;
    max-width: 900px !important;
}

.product-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    text-align: left;
    margin-bottom: 20px;
}

.product-bottom-row {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 5px;
}
.star-rating input { display: none; }
.star-rating label { cursor: pointer; color: #ccc; font-size: 1.5rem; transition: color 0.2s; }
.star-rating input:checked ~ label, .star-rating label:hover, .star-rating label:hover ~ label {
    color: var(--mclaren-papaya);
}

#library-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
    gap: 25px;
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

/* Fix for the massive black bars in your screenshot */
#library-grid .card-image-wrap {
    width: 100%;
    height: 180px; /* Lock height */
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 4px;
}

#library-grid .card-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Prevents stretching and black bars */
}

/* Ensure cards don't expand vertically beyond reason */
#library-grid .card {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.unlock-gate {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-weight: 900;
    text-shadow: 0 0 10px #00ff00;
}

/* --- NEW: MARKETPLACE RAILS (GetGems Style) --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 15px;
    padding: 0 10px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Horizontal Scroll Container */
.scroll-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 5px 25px 5px; /* Bottom padding for scrollbar */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Wrapper for Fresh Drops Section */
.fresh-drops-wrapper {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(240, 240, 245, 0.6) 100%);
    border: 1px solid rgba(255, 152, 0, 0.1);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    position: relative;
}

.fresh-drops-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--mclaren-deep), var(--mclaren-papaya));
    opacity: 0.8;
}

.fresh-drops-wrapper .section-header {
    margin-top: 0; /* Reset margin since wrapper has padding */
    padding: 0;
}

/* Row 1: Hero Cards */
.hero-card {
    min-width: 300px;
    height: 200px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}
.hero-card:hover { transform: scale(1.02); border-color: var(--mclaren-papaya); }
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 20px; box-sizing: border-box;
}

/* Row 2: Collection Rank Cards */
.collection-card {
    min-width: 260px;
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    cursor: pointer;
}
.collection-card:hover { background: #f9f9f9; border-color: var(--mclaren-papaya); }
.rank-num { font-size: 1.2rem; font-weight: 900; color: var(--text-dim); width: 20px; }
.col-img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; background: #eee; }
.col-info h4 { margin: 0; font-size: 0.9rem; color: var(--text-main); }
.col-info p { margin: 2px 0 0 0; font-size: 0.75rem; color: var(--text-dim); }
.col-stat { margin-left: auto; text-align: right; }
.stat-val { display: block; font-weight: bold; color: var(--text-main); font-size: 0.9rem; }
.stat-change { font-size: 0.75rem; }
.stat-green { color: #27ae60; }
.stat-red { color: #e74c3c; }

/* Row 3: Featured Banner */
.featured-banner {
    width: 100%;
    height: 250px;
    border-radius: 16px;
    background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 100%);
    margin: 40px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    box-sizing: border-box;
    border: 1px solid rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}
.banner-content { z-index: 2; text-align: left; }
.banner-img { height: 120%; position: absolute; right: 0; top: -10%; opacity: 0.8; mask-image: linear-gradient(to left, black 50%, transparent 100%); }

/* Footer */
footer {
    background: #ffffff;
    border-top: 1px solid #eee;
    padding: 60px 20px;
    margin-top: 80px;
    text-align: left;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-col h4 { color: var(--text-main); margin-bottom: 20px; }
.footer-col a { display: block; color: var(--text-dim); text-decoration: none; margin-bottom: 10px; font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--mclaren-papaya); }

.footer-social-link {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.footer-social-link:hover {
    color: var(--mclaren-papaya);
}

.footer-socials {
    margin-top: 20px;
    display: flex;
    gap: 25px;
}

/* --- 7. BUTTONS --- */
.btn-p { 
    background: linear-gradient(135deg, var(--mclaren-deep) 0%, var(--mclaren-papaya) 100%);
    color: white; border: none; padding: 14px 28px; border-radius: 4px;
    font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer; transition: all 0.3s ease;
}

.btn-p:hover { filter: brightness(1.2); box-shadow: 0 0 20px var(--mclaren-deep); }

.btn-share-x {
    background: #000000;
    color: white;
    border: 1px solid #333;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
    display: inline-flex; align-items: center; gap: 10px;
}

/* --- 8. ADMIN & FORMS --- */
.admin-input {
    background: #ffffff !important; border: 1px solid #ddd !important;
    color: var(--text-main) !important; padding: 12px !important; width: 100%; margin-bottom: 10px;
    box-sizing: border-box; /* Fixes input overflow */
}

#admin-dashboard .grid-3, .studio-container .grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr); /* Force horizontal stats */
    gap: 20px;
    margin-bottom: 30px;
}

/* FIX: SELLER STUDIO FORM ALIGNMENT */
.studio-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding: 40px;
    background: #ffffff;
    border: 1px solid var(--mclaren-papaya);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

label {
    color: var(--mclaren-papaya);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: bold;
}

input, select, textarea {
    background: #ffffff;
    border: 1px solid #ddd;
    color: var(--text-main);
    padding: 12px;
    width: 100%;
    box-sizing: border-box; /* Essential to prevent overflow */
}

/* --- SUPPORT VIEW & MOBILE OPTIMIZATIONS --- */
.support-card {
    max-width: 600px; 
    margin: 0 auto; 
    text-align: left;
}

@media (max-width: 768px) {
    /* Stack Grid Items */
    .grid-3, .grid-6 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Adjust Navigation */
    .nav-center {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 10px 0;
    }

    /* Hide social text links on mobile to save space */
    .nav-socials {
        display: none;
    }
    
    /* Stack Form Rows */
    .form-row {
        flex-direction: column;
        gap: 15px !important;
    }
    
    /* Adjust View Padding for taller Nav */
    .view-section {
        padding-top: 160px !important;
        padding-left: 20px;
        padding-right: 20px;
    }

    .support-card {
        width: 100% !important;
        padding: 25px 20px !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    /* --- SELLER DASHBOARD MOBILE --- */
    .grid-4-stats {
        grid-template-columns: 1fr 1fr !important; /* 2x2 Grid for stats */
        gap: 10px !important;
    }

    .dashboard-split {
        display: flex !important;
        flex-direction: column-reverse; /* Puts Quick Actions (Right) ABOVE Recent Sales (Left) */
        gap: 20px !important;
    }

    .quick-actions-grid {
        flex-direction: row !important; /* Horizontal buttons */
        flex-wrap: wrap;
    }

    .quick-actions-grid button {
        flex: 1;
        min-width: 140px; /* Prevent buttons from getting too small */
        font-size: 0.8rem !important;
        padding: 12px !important;
    }
}

/* --- ROADMAP SECTION --- */
.roadmap-container {
    padding: 80px 20px;
    max-width: 1400px;
    margin: 40px auto 0 auto;
    background: #ffffff;
    border-top: 1px solid #eee;
}

.roadmap-grid {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 40px 0;
}

/* Vertical Center Line */
.roadmap-grid::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: #eee;
    transform: translateX(-50%);
    z-index: 0;
    border-radius: 4px;
}

.roadmap-card {
    width: 45%;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    
    /* Animation Initial State */
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Left Side Cards */
.roadmap-card:nth-child(odd) {
    align-self: flex-start;
    text-align: right;
    border-right: 4px solid var(--mclaren-papaya);
}

/* Right Side Cards */
.roadmap-card:nth-child(even) {
    align-self: flex-end;
    text-align: left;
    border-left: 4px solid var(--mclaren-papaya);
}

/* The Node (Dot) */
.roadmap-card::after {
    content: '';
    position: absolute;
    top: 25px;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 4px solid #ddd;
    border-radius: 50%;
    z-index: 2;
    transition: all 0.5s ease;
}

/* Dot Positioning */
.roadmap-card:nth-child(odd)::after {
    right: -11.11%; /* Calculates distance to center based on 45% width */
    transform: translateX(50%);
}
.roadmap-card:nth-child(even)::after {
    left: -11.11%;
    transform: translateX(-50%);
}

/* --- ANIMATION ACTIVE STATE --- */
.roadmap-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.roadmap-card.visible::after {
    background: var(--mclaren-papaya);
    border-color: var(--mclaren-papaya);
    box-shadow: 0 0 0 6px rgba(255, 152, 0, 0.2);
    transform: translateX(50%) scale(1.2);
}
.roadmap-card:nth-child(even).visible::after {
    transform: translateX(-50%) scale(1.2);
}
.roadmap-quarter {
    background: var(--mclaren-papaya);
    color: white;
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.roadmap-card h3 {
    margin: 0 0 15px 0;
    color: var(--text-main);
}

.roadmap-card ul { list-style: none; padding: 0; margin: 0; }
.roadmap-card li {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative; 
}
.expansion-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.expansion-card { background: linear-gradient(135deg, #f5f7fa, #ffffff); border: 1px solid #eee; padding: 30px; border-radius: 12px; text-align: center; }
.expansion-icon { font-size: 2.5rem; margin-bottom: 15px; }
.expansion-card h4 { color: var(--text-main); font-size: 1.2rem; margin: 0 0 10px 0; }
.expansion-card p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; margin: 0; }
    
@media (max-width: 768px) {
    /* Prevent iOS Zoom & Increase Touch Targets */
    .support-card input, .support-card textarea {
        font-size: 16px !important; 
        padding: 15px !important;
    }

    /* Marketplace Filter Adjustments */
    #marketplace-view .section-header {
        flex-direction: column;
        align-items: flex-start; /* Align title to the left */
        gap: 15px;
    }

    .filter-controls {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .desktop-filters {
        display: none !important;
    }

    .mobile-filters {
        display: block !important;
        font-size: 16px !important; /* Prevent iOS zoom */
    }

    /* Admin Menu Mobile Fix */
    .tab-container {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    .tab-container .btn-p {
        min-width: 100px !important;
        flex: 1 1 40% !important; /* Allow 2 per row */
        font-size: 0.75rem !important;
        padding: 10px !important;
    }

    /* Roadmap Responsive (Vertical Line Left) */
    .roadmap-grid::before {
        left: 20px;
    }
    .roadmap-card {
        width: calc(100% - 50px) !important;
        margin-left: 50px !important;
        text-align: left !important;
        align-self: flex-start !important;
        border-left: 4px solid var(--mclaren-papaya) !important;
        border-right: 1px solid #eee !important;
    }
    .roadmap-card::after {
        left: -38px !important; /* Align dot to the left line */
        right: auto !important;
        transform: translateX(0) !important;
    }
    .expansion-grid {
        grid-template-columns: 1fr !important;
    }

    /* Modal Adjustments */
    #status-modal .modal-content.product-modal {
        width: 95% !important;
    }
    .product-modal-grid { grid-template-columns: 1fr; }
    #status-modal .modal-content {
        width: 90% !important;
        min-width: 0 !important;
        margin-top: 5vh;
        max-height: 85vh;
    }
}

/* Admin Tree Styling */
.admin-tree-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.85rem;
    color: var(--text-dim);
    transition: background 0.2s;
}
.admin-tree-item:hover {
    background: #f9f9f9;
    color: var(--text-main);
}
.admin-tree-item:last-child { border-bottom: none; }

.admin-actions button {
    background: none;
    border: 1px solid #eee;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.65rem;
    margin-left: 5px;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}
.admin-actions button:hover {
    background: #fff;
    border-color: currentColor;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.low-supply-pulse { animation: critical-glow 1.5s infinite alternate; }
@keyframes critical-glow { from { box-shadow: 0 0 5px #ff0000; } to { box-shadow: 0 0 20px #ff4444; } }

/* --- ABOUT MODAL STYLES --- */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--mclaren-papaya);
    color: var(--mclaren-papaya);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-ghost:hover {
    background: rgba(255, 152, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.2);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--mclaren-papaya);
}

#about-modal .modal-content,
#how-to-modal .modal-content,
#privacy-modal .modal-content,
#tos-modal .modal-content,
#roadmap-modal .modal-content,
#litepaper-modal .modal-content,
#whitepaper-modal .modal-content {
    width: 90% !important; /* Override fixed width */
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto !important; /* Enable scroll */
}

/* LITEPAPER STYLES */
#litepaper-modal .modal-content {
    max-width: 750px !important; /* Slightly wider for document feel */
}
.litepaper-header {
    text-align: center;
    border-bottom: 2px solid var(--mclaren-papaya);
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.litepaper-meta {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    font-weight: bold;
}
.lp-section {
    margin-bottom: 30px;
}
.lp-section h3 {
    color: var(--text-main);
    border-left: 4px solid var(--mclaren-papaya);
    padding-left: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}
.lp-section p, .lp-section li {
    color: var(--text-dim);
    line-height: 1.6;
    font-size: 0.95rem;
}
.lp-quote {
    font-style: italic;
    color: var(--mclaren-papaya) !important;
    border-left: 2px solid #eee;
    padding-left: 15px;
    margin: 15px 0;
    font-weight: 600;
}
.tokenomics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}
.token-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.token-card h4 { margin: 0 0 5px 0; color: var(--mclaren-papaya); font-size: 0.9rem; }
.token-card p { margin: 0; font-size: 0.8rem; color: var(--text-dim); }
.roadmap-list-simple {
    list-style: none;
    padding: 0;
}
.roadmap-list-simple li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-dim);
}
.roadmap-list-simple strong {
    color: var(--text-main);
    margin-right: 5px;
}
.litepaper-footer {
    text-align: center;
    font-weight: 900;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    letter-spacing: 2px;
    color: var(--text-main);
}
/* PIE CHART STYLES */
.pie-chart-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 25px 0;
    flex-wrap: wrap;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
}
.pie-chart {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(
        var(--mclaren-papaya) 0% 50%,
        #2c3e50 50% 70%,
        #566573 70% 80%,
        #7f8c8d 80% 90%,
        #95a5a6 90% 100%
    );
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.pie-chart::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90px; height: 90px;
    background: #f9f9f9;
    border-radius: 50%;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}
.pie-legend { display: flex; flex-direction: column; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-dim); font-weight: 600; }
.legend-color { width: 12px; height: 12px; border-radius: 3px; }

/* --- HOW TO USE MODAL (DETAILED) --- */
.guide-header {
    color: var(--mclaren-papaya);
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.guide-section h4 {
    color: var(--text-main);
    margin-top: 15px;
    margin-bottom: 5px;
}

.guide-section p {
    color: var(--text-dim);
    line-height: 1.6;
    font-size: 0.9rem;
    margin-top: 0;
}

@media (max-width: 768px) {
    .tokenomics-grid {
        grid-template-columns: 1fr;
    }
}

/* --- HOMEPAGE CAROUSEL (UPDATED) --- */
.carousel-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 40px auto;
    position: relative;
    /* Fade out edges for that premium look */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.carousel-track {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 40px 50px; /* Generous padding for hover effects */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}

.carousel-track::-webkit-scrollbar { 
    display: none; 
}

.carousel-card {
    flex: 0 0 auto;
    width: 200px;
    height: 280px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0,0,0,0.05);
    scroll-snap-align: center;
    position: relative;
}

.carousel-card:hover { 
    transform: translateY(-10px) scale(1.02); 
    border-color: var(--mclaren-papaya); 
    box-shadow: 0 20px 40px rgba(255, 152, 0, 0.15);
    z-index: 10;
}

.carousel-card img { width: 100%; height: 180px; object-fit: cover; border-bottom: 1px solid #f5f5f5; }
.carousel-info { padding: 15px; text-align: left; }
.carousel-info h4 { margin: 0 0 5px 0; font-size: 0.9rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 800; }
.carousel-info .price { color: var(--mclaren-papaya); font-weight: 900; font-size: 0.85rem; }

.carousel-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--mclaren-deep), var(--mclaren-papaya));
    color: white;
    font-size: 0.6rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 900;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 2;
}

/* --- RESPONSIVE --- */
@media (max-width: 1400px) { 
    .grid-6 { grid-template-columns: repeat(4, 1fr); } 
}
@media (max-width: 900px) { 
    .grid-6 { grid-template-columns: repeat(2, 1fr); } 
    .featured-banner { padding: 20px; flex-direction: column; text-align: center; height: auto; }
    .banner-img { position: relative; height: 200px; width: 100%; object-fit: cover; margin-top: 20px; mask-image: none; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

/* --- TICKET SYSTEM --- */
.ticket-card {
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    transition: all 0.2s;
}
.ticket-card:hover { border-color: var(--mclaren-papaya); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.badge-open { background: rgba(231, 76, 60, 0.1); color: #e74c3c; padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; }
.badge-progress { background: rgba(241, 196, 15, 0.1); color: #f1c40f; padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; }
.badge-resolved { background: rgba(39, 174, 96, 0.1); color: #27ae60; padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; }

/* --- TOGGLE SWITCH UI --- */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider { background-color: var(--mclaren-papaya); }
input:focus + .slider { box-shadow: 0 0 1px var(--mclaren-papaya); }
input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* --- WALLET SELECTION --- */
.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}
.wallet-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #eee;
}
.wallet-option:hover {
    background: #fff;
    border-color: var(--mclaren-papaya);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.wallet-option img {
    width: 32px;
    height: 32px;
    margin-right: 15px;
    border-radius: 50%;
    object-fit: contain;
}

/* --- SELLER PROFILE VIEW --- */
.profile-header-card {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eee 0%, #ddd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: #888;
}
.wallet-option span {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1rem;
}

/* --- COOKIE CONSENT BANNER --- */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.95);
    border-top: 2px solid var(--mclaren-papaya);
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease-out;
    box-sizing: border-box;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-content button {
        width: 100%;
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* --- INTELLIGENCE CARDS (CUSTOMS DASHBOARD) --- */
.intelligence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.intel-card {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.intel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.intel-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.risk-badge {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.risk-high { background: rgba(231, 76, 60, 0.1); color: #e74c3c; border: 1px solid #e74c3c; }
.risk-med { background: rgba(243, 156, 18, 0.1); color: #f39c12; border: 1px solid #f39c12; }
.risk-low { background: rgba(39, 174, 96, 0.1); color: #27ae60; border: 1px solid #27ae60; }

.intel-body {
    padding: 15px;
    flex: 1;
    text-align: left;
}

.intel-stat {
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--text-dim);
}

.intel-stat strong { color: var(--text-main); }

.intel-violations {
    margin-top: 10px;
    background: #fff5f5;
    border-left: 3px solid #e74c3c;
    padding: 10px;
    font-size: 0.8rem;
    color: #c0392b;
}

.intel-actions {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .intelligence-grid {
        grid-template-columns: 1fr; /* Stacked Cards */
    }
    .intel-actions {
        flex-direction: column; /* Thumb Zone Stacking */
    }
    .intel-actions button {
        height: 48px; /* Larger touch target */
    }
}

/* X-Gate Verified Badge: Mobile-Optimized Glassmorphism */
.xgate-verified-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 
                inset 0 0 10px rgba(100, 255, 218, 0.2);
    transition: transform 0.3s ease;
    user-select: none;
    cursor: default;
}

/* The Glowing Icon (The "Heart" of the Seal) */
.xgate-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    filter: drop-shadow(0 0 5px #64ffda);
    animation: pulsate 2s infinite ease-in-out;
}

/* Premium Typography */
.xgate-text {
    color: #64ffda; /* X-Gate Signature Teal */
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(100, 255, 218, 0.4);
}

/* Subtle "Breathing" Animation */
@keyframes pulsate {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* Touch-Feedback for Mobile Creators */
.xgate-verified-badge:active {
    transform: scale(0.95);
    background: rgba(100, 255, 218, 0.15);
}

/* --- SELLER DASHBOARD DESKTOP DEFAULTS --- */
.grid-4-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 40px auto;
}

.dashboard-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.quick-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- SELLER TABLE SCROLL --- */
.table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.sales-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    font-weight: bold;
    color: gray;
    font-size: 0.8rem;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
    min-width: 600px; /* Forces scroll on mobile */
}

.sales-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    min-width: 600px; /* Forces scroll on mobile */
}
