:root {
  --bg-primary: #0b0e14;
  --bg-card: #151a24;
  --bg-card-hover: #1c2331;
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --green: #00e676;
  --red: #ff1744;
  --gold: #ffb300;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #1e293b;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; user-select: none; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-primary); color: var(--text-main); min-height: 100vh; padding-bottom: 80px; overflow-x: hidden; }

.app-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: var(--bg-card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--accent-cyan); letter-spacing: 0.5px; }
.brand i { font-size: 22px; background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.live-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); background: rgba(0, 230, 118, 0.1); padding: 4px 10px; border-radius: 20px; border: 1px solid rgba(0, 230, 118, 0.2); }
.dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } }

.ticker-slider-container { padding: 14px 0 6px 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.ticker-slider-container::-webkit-scrollbar { display: none; }
.ticker-card { display: inline-block; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-right: 12px; min-width: 135px; cursor: pointer; transition: all 0.2s ease; }
.ticker-card:first-child { margin-right: 16px; }
.ticker-card:hover { border-color: var(--accent-cyan); transform: translateY(-2px); background: var(--bg-card-hover); }
.ticker-symbol { font-size: 13px; font-weight: 700; color: var(--text-main); }
.ticker-price { font-size: 15px; font-weight: 800; margin: 4px 0; }
.ticker-change { font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.up { color: var(--green); }
.down { color: var(--red); }

.tab-content { display: none; padding: 16px; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.grid-menu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
.tile { background: linear-gradient(145deg, var(--bg-card), #11151f); border: 1px solid var(--border); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: all 0.25s ease; position: relative; overflow: hidden; }
.tile:hover { transform: translateY(-3px); border-color: rgba(0, 242, 254, 0.4); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5); }
.tile-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.tile-icon.green { background: rgba(0, 230, 118, 0.12); color: var(--green); }
.tile-icon.blue { background: rgba(79, 172, 254, 0.12); color: var(--accent-blue); }
.tile-icon.orange { background: rgba(255, 179, 0, 0.12); color: var(--gold); }
.tile-icon.purple { background: rgba(186, 104, 200, 0.12); color: #ba68c8; }
.tile-title { font-size: 15px; font-weight: 700; color: var(--text-main); }
.tile-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

.control-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.input-group { display: flex; gap: 10px; margin-top: 10px; }
input, select, textarea { background: var(--bg-primary); border: 1px solid var(--border); color: var(--text-main); padding: 12px 14px; border-radius: 10px; font-size: 14px; width: 100%; outline: none; transition: border-color 0.2s; }
input:focus, select:focus { border-color: var(--accent-cyan); }
.btn { background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)); color: #000; font-weight: 700; border: none; padding: 12px 20px; border-radius: 10px; cursor: pointer; transition: all 0.2s; white-space: nowrap; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { opacity: 0.9; transform: scale(1.02); }

.chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 16px; margin-bottom: 16px; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.chart-title { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
#chart { width: 100%; height: 380px; border-radius: 10px; overflow: hidden; }

.signal-box { padding: 18px; border-radius: 16px; text-align: center; margin-bottom: 16px; font-size: 20px; font-weight: 800; display: flex; flex-direction: column; gap: 8px; }
.signal-box.buy { background: rgba(0, 230, 118, 0.12); border: 1px solid var(--green); color: var(--green); }
.signal-box.sell { background: rgba(255, 23, 68, 0.12); border: 1px solid var(--red); color: var(--red); }
.signal-box.hold { background: rgba(255, 179, 0, 0.12); border: 1px solid var(--gold); color: var(--gold); }
.signal-score { font-size: 13px; opacity: 0.9; font-weight: 600; color: var(--text-main); }

.targets-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.target-card { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: center; }
.target-title { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.target-val { font-size: 15px; font-weight: 800; }

.data-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.data-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--accent-cyan); display: flex; align-items: center; gap: 8px; }
.data-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.data-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--bg-primary); border-radius: 10px; font-size: 13px; border: 1px solid rgba(255, 255, 255, 0.03); }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(21, 26, 36, 0.95); backdrop-filter: blur(12px); border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 10px 0; z-index: 1000; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-muted); text-decoration: none; font-size: 11px; font-weight: 600; cursor: pointer; transition: color 0.2s; width: 20%; }
.nav-item i { font-size: 18px; }
.nav-item.active { color: var(--accent-cyan); }

@media (min-width: 768px) {
  body { max-width: 900px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  .bottom-nav { max-width: 900px; left: 50%; transform: translateX(-50%); }
}
