/* 
   CAPIX MARKET - Hyper-Scale C2C Platform
   Design System
*/

:root {
    --primary: #00ff88;
    --primary-alt: #00cc6a;
    --bg-app: #050508;
    --bg-header: rgba(10, 10, 15, 0.8);
    --bg-card: #0f0f15;
    --text-main: #ffffff;
    --text-dim: #8a8a92;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #00ff88;
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-app: #f4f7fa;
    --bg-header: rgba(255, 255, 255, 0.8);
    --bg-card: #ffffff;
    --text-main: #0a0a0f;
    --text-dim: #60606a;
    --border: rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }

/* Preloader */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; z-index: 10000; display: flex; justify-content: center; align-items: center;
}
.loader-text { font-family: var(--font-mono); font-size: 0.8rem; color: var(--primary); letter-spacing: 0.2em; animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* Header */
.header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--bg-header); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 3rem; }

.logo { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--text-main); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; }
.logo i { color: var(--primary); }
.logo .accent { color: var(--primary); }

.search-bar { 
    flex: 1; max-width: 600px; background: var(--bg-app); border: 1px solid var(--border);
    border-radius: 12px; display: flex; align-items: center; padding: 0.6rem 1.2rem; gap: 1rem;
}
.search-bar i { color: var(--text-dim); width: 18px; }
.search-bar input { background: none; border: none; color: var(--text-main); flex: 1; font-family: inherit; outline: none; }
.search-key { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); background: var(--border); padding: 2px 6px; border-radius: 4px; }

.header-actions { display: flex; align-items: center; gap: 2rem; }
.lang-selector { display: flex; gap: 0.5rem; }
.lang-btn { 
    background: none; border: none; color: var(--text-dim); font-weight: 700; font-size: 0.75rem; 
    cursor: pointer; transition: var(--transition);
}
.lang-btn.active { color: var(--primary); }

.theme-btn { background: none; border: none; color: var(--text-main); cursor: pointer; display: flex; }
[data-theme="dark"] i[data-lucide="sun"] { display: block; }
[data-theme="dark"] i[data-lucide="moon"] { display: none; }
[data-theme="light"] i[data-lucide="sun"] { display: none; }
[data-theme="light"] i[data-lucide="moon"] { display: block; }

.user-profile .avatar { width: 40px; height: 40px; background: var(--primary); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem; }

/* Ticker */
.ticker { background: var(--bg-card); border-bottom: 1px solid var(--border); overflow: hidden; padding: 0.6rem 0; }
.ticker-inner { display: flex; gap: 4rem; animation: ticker 30s linear infinite; white-space: nowrap; }
@keyframes ticker { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.ticker-item { display: flex; align-items: center; gap: 0.8rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); }
.dot { width: 6px; height: 6px; border-radius: 50%; }
.dot.green { background: #00ff88; box-shadow: 0 0 10px #00ff88; }
.dot.blue { background: #0088ff; box-shadow: 0 0 10px #0088ff; }
.dot.yellow { background: #ffcc00; box-shadow: 0 0 10px #ffcc00; }

/* Main Layout */
.main { display: grid; grid-template-columns: 280px 1fr; gap: 3rem; margin-top: 3rem; }

/* Sidebar */
.sidebar-section { margin-bottom: 3rem; }
.sidebar-section h4 { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.5rem; }

.filter-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.filter-list li { 
    display: flex; align-items: center; gap: 1rem; padding: 0.8rem 1.2rem; 
    border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--text-dim); transition: var(--transition);
}
.filter-list li i { width: 18px; }
.filter-list li:hover { background: var(--border); color: var(--text-main); }
.filter-list li.active { background: rgba(0, 255, 136, 0.1); color: var(--primary); }

.status-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.2rem; }
.status-item { display: flex; flex-direction: column; }
.status-item .label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-dim); margin-bottom: 4px; }
.status-item .val { font-family: var(--font-mono); font-weight: 700; color: var(--primary); }

/* Feed */
.feed-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }
.feed-header h2 { font-size: 2rem; letter-spacing: -0.02em; }
.feed-sort { display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; color: var(--text-dim); }
.feed-sort select { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-main); padding: 0.5rem 1rem; border-radius: 8px; outline: none; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.product-card { 
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; 
    overflow: hidden; transition: var(--transition);
}
.product-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }

.product-img { height: 200px; position: relative; overflow: hidden; background: #222; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.product-card:hover .product-img img { transform: scale(1.1); }
.verified-badge { position: absolute; top: 1rem; right: 1rem; background: var(--primary); color: #000; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.product-info { padding: 2rem; }
.meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-size: 0.75rem; font-weight: 700; }
.meta .category { color: var(--primary); text-transform: uppercase; letter-spacing: 0.1em; }
.meta .time { color: var(--text-dim); }

.product-info h3 { font-size: 1.3rem; margin-bottom: 0.8rem; }
.product-info .price { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--text-main); margin-bottom: 1.5rem; }

.actions { display: flex; gap: 1rem; }
.btn-buy { flex: 1; background: var(--primary); color: #000; border: none; padding: 1rem; border-radius: 12px; font-weight: 700; cursor: pointer; transition: var(--transition); }
.btn-buy:hover { transform: scale(1.05); }
.btn-icon { width: 48px; background: var(--border); border: none; border-radius: 12px; color: var(--text-main); cursor: pointer; transition: var(--transition); }
.btn-icon:hover { color: #ff4d4d; }

/* Footer */
.footer { margin-top: 8rem; padding: 4rem 0; border-top: 1px solid var(--border); opacity: 0.6; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-brand p { font-size: 0.9rem; color: var(--text-dim); margin-top: 0.5rem; }
.footer-links a { text-decoration: none; color: var(--text-main); font-weight: 700; font-size: 0.9rem; }

/* Responsive */
@media (max-width: 1024px) {
    .main { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .header-inner { gap: 1.5rem; }
    .search-bar { display: none; }
}
@media (max-width: 768px) {
    .header-actions { gap: 1rem; }
    .lang-selector { display: none; }
}

/* Animations */
.reveal-up { opacity: 0; transform: translateY(30px); }
.reveal-up.active { opacity: 1; transform: translateY(0); transition: all 1s ease-out; }
