/*
Theme Name: Titan Flow 369 UI
Author: Titan Team
Description: Das Tesla-Code Interface für WordPress.
Version: 1.0
*/

:root {
    /* --- TITAN TRUST PALETTE --- */
    --bg-deep: #0b0e14; 
    --bg-sidebar: #11151f;
    --color-btc: #f7931a;
    --color-eth: #627eea;
    --color-usdt: #26a17b;
    --color-gold: #d4af37;
    --color-xp: #bc13fe; 
    --color-text: #ffffff;
    --color-text-muted: #8b9bb4;
    --color-danger: #ff4d4d;
    --color-success: #4cd964;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --radius-main: 16px;
    --font-main: 'Inter', sans-serif;
    --font-numbers: 'Rajdhani', sans-serif;
}

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

body {
    background-color: var(--bg-deep);
    color: var(--color-text);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(188, 19, 254, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(247, 147, 26, 0.05) 0%, transparent 40%);
}

/* Layout */
.dashboard-container { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg-sidebar); padding: 2rem; display: flex; flex-direction: column; gap: 2rem; height: 100vh; position: sticky; top: 0; border-right: 1px solid rgba(255,255,255,0.05); }
.main-content { padding: 2.5rem; overflow-y: auto; height: 100vh; }

/* Navigation */
.brand-logo { font-family: var(--font-numbers); font-size: 1.8rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; }
.nav-menu { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.nav-item { padding: 0.9rem 1rem; border-radius: 8px; color: var(--color-text-muted); cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 1rem; font-weight: 500; font-size: 0.95rem; border: 1px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,0.02); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.05); color: #fff; border: var(--glass-border); border-left: 3px solid var(--color-gold); }
.nav-item i { width: 20px; text-align: center; }

/* Header & Profile */
.header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; }
.user-profile { display: flex; align-items: center; gap: 1rem; background: rgba(255,255,255,0.03); padding: 8px 16px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.05); }
.avatar { width: 35px; height: 35px; border-radius: 50%; background: #333; display: flex; align-items: center; justify-content: center; border: 1px solid #555; position: relative; }

/* Cards & Stats */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
.glass-card { background: var(--bg-sidebar); border: 1px solid rgba(255,255,255,0.05); border-radius: var(--radius-main); padding: 1.5rem; transition: 0.3s ease; }
.stat-value { font-family: var(--font-numbers); font-size: 2rem; font-weight: 600; color: #fff; }

/* Crypto Cards */
.cards-container { display: flex; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.crypto-card { width: 340px; height: 210px; border-radius: 20px; padding: 24px; position: relative; display: flex; flex-direction: column; justify-content: space-between; color: white; box-shadow: 0 15px 35px rgba(0,0,0,0.4); overflow: hidden; transition: all 0.4s ease; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); flex-shrink: 0; }
.crypto-card:hover { transform: translateY(-10px) scale(1.02); }
.card-btc { background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%); }
.card-header-row { display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.chip { width: 45px; height: 32px; background: linear-gradient(135deg, #a8a8a8, #666); border-radius: 4px; }
.card-balance-val { font-family: var(--font-numbers); font-size: 1.8rem; font-weight: 700; margin-top: 5px; }

/* Shop & Locks */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.shop-item { background: var(--bg-sidebar); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 20px; text-align: center; position: relative; overflow: hidden; }
.shop-item.locked { opacity: 0.6; filter: grayscale(0.8); cursor: not-allowed; }
.shop-item.locked::after { content: "\f023"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 3rem; color: #fff; z-index: 10; text-shadow: 0 0 10px #000; }
.lock-msg { position: absolute; bottom: 20px; left: 0; width: 100%; background: rgba(0,0,0,0.8); color: var(--color-danger); font-weight: 700; padding: 5px; font-size: 0.8rem; display: none; }
.shop-item.locked:hover .lock-msg { display: block; }

.btn-buy { background: var(--color-gold); color: #000; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 700; cursor: pointer; width: 100%; transition: 0.2s; }
.btn-buy:hover { background: #fff; }

/* Earn Grid */
.earn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.ad-card { background: var(--bg-sidebar); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 0; display: flex; flex-direction: column; transition: 0.2s; overflow: hidden; }
.ad-header { height: 100px; background: linear-gradient(135deg, #222, #111); position: relative; display: flex; align-items: center; justify-content: center; }
.ad-card.mindset .ad-header { background: linear-gradient(135deg, #4b6cb7, #182848); }
.ad-card.crypto .ad-header { background: linear-gradient(135deg, #f7971e, #ffd200); }
.ad-icon-big { font-size: 3rem; color: rgba(255,255,255,0.2); }
.ad-content { padding: 1.2rem; flex: 1; display: flex; flex-direction: column; }
.ad-title { font-weight: 600; font-size: 1rem; margin-bottom: 5px; }
.reward-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.ad-reward { color: #4cd964; font-weight: 700; font-size: 1rem; }
.xp-pill { background: rgba(188, 19, 254, 0.2); color: var(--color-xp); padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; }

/* Level Widget */
.level-widget { background: rgba(255,255,255,0.05); padding: 1rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); }
.xp-bar-container { width: 100%; height: 6px; background: rgba(0,0,0,0.5); border-radius: 10px; overflow: hidden; margin-top: 5px;}
.xp-bar-fill { height: 100%; background: var(--color-xp); width: 0%; transition: width 0.5s ease; box-shadow: 0 0 10px var(--color-xp); }
.xp-text { font-size: 0.75rem; color: #888; margin-top: 5px; text-align: right; }

/* SPA Visibility */
.view-section { display: none; animation: fadeIn 0.4s ease; }
.view-section.active-view { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Login Screen */
.login-screen { display: flex; height: 100vh; align-items: center; justify-content: center; background: #000; color: #fff; text-align: center; }
.login-btn { padding: 15px 30px; background: var(--color-gold); color: #000; text-decoration: none; font-weight: bold; border-radius: 8px; margin-top: 20px; display: inline-block; font-family: var(--font-numbers); font-size: 1.2rem; }

/* Mobile Optimizations */
.mobile-header, .mobile-nav { display: none; }
@media (max-width: 768px) {
    .dashboard-container { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .mobile-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; background: rgba(11, 14, 20, 0.95); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 999; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .mobile-nav { display: flex; justify-content: space-around; align-items: center; position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(17, 21, 31, 0.95); backdrop-filter: blur(10px); border-top: 1px solid rgba(255,255,255,0.05); padding: 10px 0 20px 0; z-index: 1000; }
    .mobile-nav-item { color: #888; font-size: 0.7rem; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; width: 20%; }
    .mobile-nav-item i { font-size: 1.2rem; }
    .mobile-nav-item.active { color: var(--color-gold); }
    .main-content { padding: 1.5rem; padding-bottom: 90px; }
    .header-bar { display: none; }
    .stats-grid { grid-template-columns: 1fr !important; gap: 1rem; margin-bottom: 2rem; }
    .shop-grid, .earn-grid { grid-template-columns: 1fr; }
    .cards-container { flex-direction: row; overflow-x: auto; padding-bottom: 20px; scroll-snap-type: x mandatory; margin-left: -1.5rem; margin-right: -1.5rem; padding-left: 1.5rem; }
    .crypto-card { scroll-snap-align: center; width: 300px; height: 190px; }
}