/* MUSK UNITS - Bloomberg Terminal Style */

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

:root {
  --bg: #000000;
  --bg-panel: #0a0a0a;
  --bg-elevated: #111111;
  --bg-hover: #1a1a1a;
  --border: #222222;
  --border-bright: #333333;
  --orange: #ff6600;
  --orange-dim: #cc5500;
  --orange-bright: #ff8533;
  --green: #00ff00;
  --green-dim: #00cc00;
  --red: #ff3333;
  --red-dim: #cc2929;
  --yellow: #ffcc00;
  --blue: #3399ff;
  --text: #ffffff;
  --text-dim: #888888;
  --text-muted: #555555;
  --gold: #ffd700;
  --silver: #c0c0c0;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  height: 100vh;
}

/* ===== TERMINAL HEADER ===== */
.terminal-header {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.terminal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.terminal-logo {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 16px;
  color: var(--orange);
  letter-spacing: -0.5px;
}

.terminal-tagline {
  color: var(--text-muted);
  font-size: 11px;
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-label {
  color: var(--text-muted);
}

.status-value {
  color: var(--orange);
}

/* ===== MAIN LAYOUT ===== */
.terminal-main {
  display: grid;
  grid-template-columns: 1fr 1.3fr 300px;
  height: calc(100vh - 45px);
}

/* ===== PANEL COMMON ===== */
.panel-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-elevated);
}

.panel-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.panel-action {
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.panel-action:hover {
  color: var(--orange);
}

/* ===== LEFT PANEL - HEADLINES ===== */
.panel-left {
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.headlines-list {
  flex: 1;
  overflow-y: auto;
}

.headline-item {
  display: flex;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.headline-item:hover {
  background: var(--bg-hover);
}

.headline-item.selected {
  background: var(--bg-elevated);
  border-left: 2px solid var(--orange);
}

.headline-item.breaking {
  background: rgba(255, 102, 0, 0.08);
}

.headline-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  min-width: 32px;
  padding-top: 2px;
}

.headline-content {
  flex: 1;
  min-width: 0;
}

.headline-text {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
}

.headline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.headline-source {
  font-size: 10px;
  color: var(--text-muted);
}

.headline-source.twitter {
  color: var(--blue);
}

.headline-engagement {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
}

/* ===== ASSET BADGES ===== */
.asset-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 2px;
  text-transform: uppercase;
}

.asset-badge.gold { background: var(--gold); color: #000; }
.asset-badge.silver { background: var(--silver); color: #000; }
.asset-badge.copper { background: #b87333; color: #000; }
.asset-badge.spx { background: var(--green); color: #000; }
.asset-badge.oil { background: #666; color: #fff; }
.asset-badge.treasury { background: var(--blue); color: #000; }

.asset-badge.large {
  padding: 4px 8px;
  font-size: 11px;
}

/* ===== CENTER PANEL - DETAIL ===== */
.panel-center {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.detail-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.detail-source {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.detail-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--text);
}

.detail-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
}

.detail-body a {
  color: var(--orange);
  text-decoration: none;
}

.detail-body a:hover {
  text-decoration: underline;
}

.detail-assets {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.detail-engagement {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}

.engagement-stat {
  color: var(--text-dim);
}

.engagement-stat span {
  color: var(--orange);
  font-weight: 600;
}

.detail-link {
  display: inline-block;
  padding: 10px 20px;
  background: var(--orange);
  color: #000;
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-link:hover {
  background: var(--orange-bright);
}

/* ===== TWEET AUTHOR ===== */
.tweet-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tweet-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.tweet-name {
  font-weight: 600;
  color: var(--text);
}

.tweet-handle {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== RIGHT PANEL - ASSETS ===== */
.panel-right {
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Elon Card */
.elon-card {
  padding: 16px;
  background: linear-gradient(135deg, #1a0a00, #0a0500);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.elon-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.elon-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--orange);
}

.elon-note {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Asset Filter */
.asset-filter-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-elevated);
}

.asset-filter-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.asset-list {
  flex: 1;
  overflow-y: auto;
}

.asset-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.asset-item:hover {
  background: var(--bg-hover);
}

.asset-item.active {
  background: var(--bg-elevated);
  border-left: 2px solid var(--orange);
}

.asset-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asset-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.asset-name {
  font-size: 12px;
  font-weight: 500;
}

.asset-data {
  text-align: right;
  font-family: 'IBM Plex Mono', monospace;
}

.asset-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.asset-change {
  font-size: 10px;
  margin-top: 2px;
}

.asset-change.positive { color: var(--green); }
.asset-change.negative { color: var(--red); }

/* ===== LOADING STATE ===== */
.loading-message {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .terminal-main {
    grid-template-columns: 1fr 1fr 260px;
  }
}

@media (max-width: 900px) {
  .terminal-main {
    grid-template-columns: 1fr 1fr;
  }
  .panel-right {
    display: none;
  }
}

@media (max-width: 600px) {
  .terminal-main {
    grid-template-columns: 1fr;
  }
  .panel-center {
    display: none;
  }
  .terminal-tagline {
    display: none;
  }
}
