/* ============================================
   TRENCHER CHAN - UNIFIED STYLES
   ============================================ */

:root {
  /* Light Theme (Landing) */
  --bg-cream: #fff4ed;
  --bg-blush: #ffe6f2;
  --bg-mint: #e8f6f1;
  --ink: #3b2a30;
  --muted: #6f5b66;
  --accent-pink: #ff9fc7;
  --accent-peach: #ffc7a8;
  --accent-green: #6b7d4d;
  --accent-gold: #f6d36f;

  /* Dark Theme (Dashboard) */
  --dark-bg: #0a0a0a;
  --dark-surface: #111111;
  --dark-border: #222222;
  --dark-text: #e5e5e5;
  --dark-muted: #71717a;
  --dark-accent: #facc15;
  --dark-success: #22c55e;
  --dark-error: #ef4444;
  --dark-glow: rgba(250, 204, 21, 0.15);

  /* Fonts */
  --mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --landing-font: "M PLUS Rounded 1c", "Fredoka", "Trebuchet MS", sans-serif;
  --landing-display: "Fredoka", "M PLUS Rounded 1c", "Trebuchet MS", sans-serif;
}

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

/* ============================================
   LANDING PAGE STYLES (Light Theme)
   ============================================ */

body.landing {
  font-family: var(--landing-font);
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 199, 168, 0.45), transparent 46%),
    radial-gradient(circle at 80% 15%, rgba(255, 159, 199, 0.35), transparent 42%),
    radial-gradient(circle at 70% 80%, rgba(232, 246, 241, 0.6), transparent 40%),
    linear-gradient(160deg, var(--bg-cream) 0%, var(--bg-blush) 45%, var(--bg-mint) 100%);
  min-height: 100vh;
  padding: 60px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  position: relative;
  overflow-x: hidden;
}

body.landing::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 159, 199, 0.25), transparent 60%),
    radial-gradient(circle at 70% 30%, rgba(255, 227, 168, 0.35), transparent 55%);
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
}

body.landing::after {
  content: "";
  position: absolute;
  inset: auto -10% -20% -10%;
  height: 55%;
  background: radial-gradient(circle at 40% 40%, rgba(107, 125, 77, 0.18), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(255, 159, 199, 0.2), transparent 55%);
  z-index: 0;
  pointer-events: none;
}

.grok-shell {
  width: min(920px, 100%);
  min-height: 75vh;
  padding: 50px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: shellRise 0.9s ease both;
}

.grok-logo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(140deg, #fff7f0, #ffe7f3);
  border: 4px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 18px 45px rgba(108, 76, 77, 0.18),
    0 0 0 8px rgba(255, 159, 199, 0.15);
  display: grid;
  place-items: center;
  animation: float 4s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.grok-logo img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.grok-logo span {
  font-family: var(--landing-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-green);
  letter-spacing: 1px;
  opacity: 0;
}

.grok-logo.logo-fallback span {
  opacity: 1;
}

.grok-terminal {
  width: 100%;
  max-width: 700px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(107, 125, 77, 0.2);
  box-shadow:
    0 20px 60px rgba(108, 76, 77, 0.18),
    0 0 35px rgba(255, 159, 199, 0.18);
  overflow: hidden;
  text-align: left;
  transform: translateY(12px);
  opacity: 0;
  animation: terminalIn 0.8s ease 0.3s forwards;
}

.terminal-bar {
  background: linear-gradient(90deg, rgba(232, 246, 241, 0.9), rgba(255, 244, 237, 0.9));
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(107, 125, 77, 0.15);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red {
  background: #ff7b7b;
}

.dot-yellow {
  background: #ffd561;
}

.dot-green {
  background: var(--accent-green);
}

.terminal-title {
  font-family: var(--mono);
  font-size: 12px;
  color: #7c6470;
  margin-left: 10px;
}

.terminal-body {
  padding: 20px;
  min-height: 190px;
  font-family: var(--mono);
  font-size: 14px;
  color: #6a5660;
  line-height: 1.8;
}

.terminal-line {
  margin-bottom: 4px;
}

.terminal-line.accent {
  color: var(--accent-green);
  font-weight: 600;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent-pink);
  margin-left: 4px;
  animation: blink 1s infinite;
}

.grok-cta-row {
  opacity: 0;
  animation: ctaIn 0.8s ease 3s forwards;
}

.cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-peach));
  color: #3b1b2e;
  padding: 14px 36px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 16px;
  font-family: var(--landing-display);
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(255, 159, 199, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 159, 199, 0.5);
}

.grok-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.grok-meta .ca {
  color: var(--accent-green);
  font-family: var(--mono);
  font-size: 11px;
}

.meta-x {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--accent-green);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent-green);
  text-decoration: none;
  margin-top: 8px;
}

/* ============================================
   DASHBOARD STYLES (Pastel Theme)
   ============================================ */

body.dashboard-dark {
  font-family: var(--sans);
  background: radial-gradient(circle at 20% 15%, rgba(255, 199, 168, 0.35), transparent 45%),
    radial-gradient(circle at 80% 25%, rgba(255, 159, 199, 0.3), transparent 40%),
    linear-gradient(160deg, var(--bg-cream) 0%, var(--bg-blush) 45%, var(--bg-mint) 100%);
  color: var(--ink);
  min-height: 100vh;
  padding: 16px;
}

/* Header */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(107, 125, 77, 0.2);
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 30px rgba(108, 76, 77, 0.1);
}

.dash-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dash-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 20px;
}

.logo-text {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-green);
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(107, 125, 77, 0.15);
  border: 1px solid rgba(107, 125, 77, 0.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-green);
}

.live-pulse {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-stat {
  font-size: 13px;
}

.header-stat-label {
  color: var(--muted);
  margin-right: 4px;
}

.header-stat-value {
  font-family: var(--mono);
  color: var(--ink);
  font-weight: 600;
}

.wallet-address {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  border: 1px solid rgba(107, 125, 77, 0.15);
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(107, 125, 77, 0.15);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 25px rgba(108, 76, 77, 0.08);
  transition: border-color 0.2s, transform 0.2s;
}

.stat-card:hover {
  border-color: var(--accent-pink);
  transform: translateY(-2px);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-green);
  font-weight: 700;
}

.stat-icon {
  font-size: 16px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--ink);
  margin-bottom: 4px;
}

.stat-sub {
  font-size: 12px;
  color: var(--muted);
}

/* Main Grid */
.dash-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  /* Fixed width for image panel */
  gap: 16px;
  min-height: calc(100vh - 220px);
}

/* Panels */
.panel {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(107, 125, 77, 0.15);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(108, 76, 77, 0.08);
  display: flex;
  flex-direction: column;
}

/* Visual Panel (Left) */
.panel-visual {
  padding: 0;
  border: 1px solid var(--accent-pink);
  /* Subtle frame */
  background: #000;
  position: relative;
}

.visual-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.visual-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.visual-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.visual-name {
  font-family: var(--landing-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: var(--accent-pink);
}

.visual-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

/* Panel Header (Right Panel) */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(107, 125, 77, 0.1);
  background: rgba(232, 246, 241, 0.5);
  flex-shrink: 0;
}

.panel-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-green);
}

.neural-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(107, 125, 77, 0.15);
  border: 1px solid var(--accent-green);
  border-radius: 20px;
  color: var(--accent-green);
  animation: pulse 3s infinite;
}

/* Avatar Section - SHE IS THE STAR */
.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 20px;
  border-bottom: 1px solid rgba(107, 125, 77, 0.1);
  background: linear-gradient(180deg, rgba(255, 232, 243, 0.8), rgba(255, 244, 237, 0.6));
}

.avatar-frame {
  width: 300px;
  height: 300px;
  border-radius: 30px;
  background: white;
  border: 5px solid var(--accent-pink);
  padding: 12px;
  box-shadow:
    0 20px 60px rgba(255, 159, 199, 0.4),
    0 0 0 12px rgba(255, 159, 199, 0.15),
    0 0 80px rgba(255, 159, 199, 0.2);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 20px;
}

.avatar-info {
  text-align: center;
}

.avatar-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.avatar-mood {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-green);
  margin-bottom: 6px;
}

.avatar-note {
  font-size: 14px;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.4;
}

/* Neural Stats */
.neural-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(107, 125, 77, 0.1);
  background: rgba(255, 255, 255, 0.5);
}

.neural-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.neural-stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

.neural-stat-value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

/* Panel Sections */
.panel-section {
  padding: 16px;
  border-bottom: 1px solid rgba(107, 125, 77, 0.1);
}

.panel-section:last-child {
  border-bottom: none;
}

.section-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* Terminal Log */
.terminal-log {
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(232, 246, 241, 0.6);
  border: 1px solid rgba(107, 125, 77, 0.1);
  border-radius: 10px;
  padding: 12px;
  overflow-y: auto;
}

.mini-logs {
  margin-top: auto;
  /* Push to bottom if flex container allows, or just spacing */
  border-top: 1px solid rgba(107, 125, 77, 0.1);
  background: rgba(255, 255, 255, 0.3);
}

.log-line {
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.5;
}

.log-line:last-child {
  color: var(--ink);
}

.log-line .cursor {
  background: var(--accent-pink);
  width: 6px;
  height: 12px;
}

/* Bot Status */
.bot-status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.bot-status-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bot-status-label {
  font-size: 11px;
  color: var(--muted);
}

.bot-status-value {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-green);
}

/* Thoughts Feed */
.thoughts-count {
  font-size: 12px;
  color: var(--muted);
}

.thoughts-feed {
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.thought-card {
  background: rgba(255, 244, 237, 0.8);
  border: 1px solid rgba(255, 159, 199, 0.2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  transition: border-color 0.2s, transform 0.2s;
}

.thought-card:hover {
  border-color: var(--accent-pink);
  transform: translateY(-1px);
}

.thought-card.placeholder {
  opacity: 0.6;
}

.thought-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.thought-ticker {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  padding: 4px 10px;
  background: var(--accent-pink);
  color: white;
  border-radius: 6px;
}

.thought-score {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.thought-action {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.action-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.action-badge.buy {
  background: rgba(107, 125, 77, 0.2);
  color: var(--accent-green);
}

.action-badge.sell {
  background: rgba(255, 159, 199, 0.3);
  color: #d946a0;
}

.action-badge.skip {
  background: rgba(111, 91, 102, 0.15);
  color: var(--muted);
}

.risk-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(107, 125, 77, 0.1);
  color: var(--muted);
}

.thought-body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}

.thought-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  opacity: 0.7;
}

/* Chart Section */
.chart-section {
  padding: 20px;
  border-top: 1px solid rgba(107, 125, 77, 0.1);
  background: rgba(255, 255, 255, 0.4);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.timeframe-buttons {
  display: flex;
  gap: 4px;
}

.tf-btn {
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  border: 1px solid rgba(107, 125, 77, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.tf-btn:hover {
  border-color: var(--accent-pink);
  color: var(--ink);
}

.tf-btn.active {
  background: var(--accent-pink);
  color: white;
  border-color: var(--accent-pink);
}

.chart-container {
  background: rgba(255, 244, 237, 0.8);
  border: 1px solid rgba(255, 159, 199, 0.2);
  border-radius: 12px;
  padding: 0;
  height: 200px;
  position: relative;
  overflow: hidden;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.chart-overlay {
  position: absolute;
  top: 12px;
  left: 16px;
  pointer-events: none;
  z-index: 2;
}

.chart-value-display {
  display: flex;
  flex-direction: column;
}

.cv-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.cv-value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.chart-tooltip {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--accent-pink);
  border-radius: 8px;
  padding: 8px 12px;
  pointer-events: none;
  z-index: 10;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(255, 159, 199, 0.2);
  transform: translate(-50%, -100%);
  margin-top: -10px;
  white-space: nowrap;
}

.chart-tooltip span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 2px;
}

/* Holdings Panel */
.holdings-section {
  padding: 16px 20px;
  border-top: 1px solid rgba(107, 125, 77, 0.1);
  background: rgba(232, 246, 241, 0.4);
}

.holdings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.holdings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.holding-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(107, 125, 77, 0.15);
  border-radius: 10px;
  padding: 12px;
  transition: border-color 0.2s, transform 0.2s;
}

.holding-card:hover {
  border-color: var(--accent-pink);
  transform: translateY(-1px);
}

.holding-token {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.holding-symbol {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-green);
}

.holding-pnl {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.holding-pnl.positive {
  color: var(--accent-green);
}

.holding-pnl.negative {
  color: #d946a0;
}

.holding-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.holding-row {
  display: flex;
  justify-content: space-between;
}

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

.holding-value {
  font-family: var(--mono);
  color: var(--ink);
}

.holdings-empty {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
}

/* Animations */
@keyframes shellRise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes terminalIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ctaIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 720px) {
  body.landing {
    padding: 40px 16px;
  }

  .grok-shell {
    min-height: 70vh;
    gap: 24px;
  }

  .grok-logo {
    width: 110px;
    height: 110px;
  }

  .grok-terminal {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

  .dash-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .dash-header-left,
  .dash-header-right {
    flex-direction: column;
    gap: 8px;
  }
}

/* ============================================
   CHAT DASHBOARD V2 (Premium Alpha Stream)
   ============================================ */

/* Layout & Grid */
.chat-page-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 20px;
  height: calc(100vh - 100px);
  /* Full height minus header */
  overflow: hidden;
}

/* Glassmorphism Panels */
.glass-panel {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.05),
    0 10px 30px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.08),
    0 20px 40px rgba(0, 0, 0, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* LEFT PANEL: Trencher Live */
.trencher-highlight {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 240, 245, 0.6), rgba(230, 255, 240, 0.6));
}

.avatar-highlight-container {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  position: relative;
}

.avatar-large-frame {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  padding: 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid var(--accent-pink);
  box-shadow: 0 0 40px rgba(255, 159, 199, 0.3);
  margin-bottom: 24px;
  position: relative;
}

.avatar-large-frame img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
}

.live-status-pill {
  background: rgba(107, 125, 77, 0.15);
  color: var(--accent-green);
  padding: 8px 16px;
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(107, 125, 77, 0.2);
}

.status-beacon {
  width: 8px;
  height: 8px;
  background: var(--dark-success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: beacon 2s infinite;
}

@keyframes beacon {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}


/* RIGHT PANEL: Alpha Stream */
.chat-header {
  padding: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.4);
}

.stream-title {
  font-family: var(--landing-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.stream-meta {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

.chat-stream-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: 0;
  /* Space for input is separate */
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

/* Scrollbar hiding */
.chat-stream-container::-webkit-scrollbar {
  width: 6px;
}

.chat-stream-container::-webkit-scrollbar-track {
  background: transparent;
}

.chat-stream-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}


/* Chat Mesage Cards */
.msg-card {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  display: flex;
  gap: 14px;
  transition: all 0.2s ease;
  animation: slideInUp 0.4s ease forwards;
  transform-origin: bottom center;
}

.msg-card:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Whale Special Styling */
.msg-card.whale {
  background: linear-gradient(to right, rgba(255, 250, 230, 0.8), rgba(255, 255, 255, 0.8));
  border: 1px solid rgba(246, 211, 111, 0.5);
  box-shadow:
    0 4px 15px rgba(246, 211, 111, 0.15),
    inset 0 0 20px rgba(246, 211, 111, 0.05);
}

.msg-card.whale::after {
  content: "🐋 WHALE DETECTED";
  position: absolute;
  top: -8px;
  right: 20px;
  background: var(--accent-gold);
  color: #5c4d1f;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.5px;
}

/* Trencher Chan Styling */
.msg-card.chan {
  background: linear-gradient(135deg, rgba(232, 246, 241, 0.95), rgba(255, 244, 237, 0.95));
  border: 1px solid rgba(107, 125, 77, 0.3);
  margin-left: 40px;
  /* Slight indent */
}

/* Avatar in Chat */
.msg-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eee;
  overflow: hidden;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Message Content */
.msg-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.msg-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--sans);
}

.msg-badges {
  display: flex;
  gap: 6px;
}

.badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.holder {
  background: rgba(107, 125, 77, 0.1);
  color: var(--accent-green);
}

.badge.dev {
  background: rgba(255, 159, 199, 0.15);
  color: #c95c8e;
}

.msg-text {
  font-size: 14px;
  line-height: 1.5;
  color: #4a4a4a;
}

.msg-footer {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  opacity: 0.7;
}

/* Input Area */
.chat-input-wrapper {
  padding: 20px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.glass-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid transparent;
  padding: 14px 20px;
  border-radius: 14px;
  font-family: var(--sans);
  font-size: 15px;
  transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.glass-input:focus {
  outline: none;
  background: white;
  border-color: var(--accent-green);
  box-shadow: 0 8px 20px rgba(107, 125, 77, 0.15);
}