:root {
  --bg: #050505;
  --surface: #0a0a0a;
  --surface-hover: #111111;
  --border: #333333;
  --border-light: #555555;
  
  --text-main: #eeeeee;
  --text-muted: #888888;
  
  --accent: #ccff00; /* Acid Lime */
  --accent-dim: rgba(204, 255, 0, 0.1);
  
  --pos: #00ff9d;
  --neg: #ff3333;
  
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --gap: 24px;
  --radius: 0px; /* SHARP */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-display);
  line-height: 1.5;
  overflow-x: hidden;
}

/* CRT / Scanline Effect overlay - Christmas Edition */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* Red and Green subtle scanlines */
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.04));
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Subtle Snow Animation */
@keyframes snow {
  0% { background-position: 0px 0px, 0px 0px, 0px 0px; }
  100% { background-position: 500px 1000px, 400px 400px, 300px 300px; }
}

.christmas-snow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(3px 3px at 100px 50px, rgba(255,255,255,0.3) 50%, transparent),
    radial-gradient(2px 2px at 200px 150px, rgba(255,255,255,0.2) 50%, transparent),
    radial-gradient(4px 4px at 300px 250px, rgba(255,255,255,0.1) 50%, transparent);
  background-size: 500px 500px, 400px 400px, 300px 300px;
  animation: snow 20s linear infinite;
  opacity: 0.6;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.mono {
  font-family: var(--font-mono);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gap);
  position: relative;
  z-index: 1;
}

/* --- NAV --- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.05em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span { color: var(--accent); }

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-left: 2rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* --- HERO --- */
.hero {
  padding: 80px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: start;
}

.hero-content h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.9;
  margin-bottom: 2rem;
}

.hero-content h1 span {
  color: var(--text-muted);
  display: block;
  font-size: 0.5em;
  margin-bottom: 0.2em;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.accent-text { color: var(--accent); }

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 50ch;
  margin-bottom: 3rem;
}

/* --- UPLOAD BOX --- */
.upload-container {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 2px; /* For double border effect inner */
  position: relative;
}

.upload-container::before {
  content: "[ DROP_ZONE ]";
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--bg);
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.upload-area {
  border: 1px dashed var(--border-light);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.02) 10px,
    rgba(255, 255, 255, 0.02) 20px
  );
}

.upload-area:hover, .upload-area.drag-over {
  border-color: var(--accent);
  background-color: var(--accent-dim);
}

.upload-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.upload-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.upload-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

input[type="file"] { display: none; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text-main);
  color: var(--bg);
  border: none;
  padding: 16px 32px;
  font-family: var(--font-mono);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
  width: 100%;
  margin-top: 1rem;
}

.btn:hover {
  background: var(--accent);
  color: black;
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

/* --- GRID SYSTEM --- */
.b-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.panel {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 24px;
  position: relative;
}

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

.panel-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.panel-icon {
  color: var(--accent);
}

/* --- METRICS --- */
.metric-big {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* --- TABLE STYLES --- */
.trade-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.trade-row:last-child { border-bottom: none; }

.trade-info { display: flex; flex-direction: column; }
.trade-ticker { font-weight: 700; color: var(--text-main); }
.trade-date { font-size: 0.75rem; color: var(--text-muted); }

/* --- CHART --- */
.chart-box {
  height: 400px;
  width: 100%;
  position: relative;
}

/* --- PERSONA & SHARE --- */
.persona-box {
  border: 1px solid var(--accent);
  background: rgba(204, 255, 0, 0.02);
}

.persona-text {
  font-size: 1.25rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
}

.share-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.share-actions .btn {
  width: auto;
  margin-top: 0;
  font-size: 0.8rem;
  padding: 10px 20px;
}

/* --- HELP SECTION --- */
.help-section {
  margin-bottom: 80px;
}

.help-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  text-transform: uppercase;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.help-step {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.help-step-num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  align-self: flex-start;
}

.help-img {
  width: auto;
  max-width: 100%;
  height: 200px;
  object-fit: contain;
  border: 1px solid #333;
  display: block;
}

.help-caption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* --- UTILS --- */
.hidden { display: none; }
.fade-in { animation: fadeIn 0.5s ease forwards; opacity: 0; }

@keyframes fadeIn { to { opacity: 1; } }

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent);
  color: black;
  padding: 15px 25px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  transform: translateY(100px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
}

.toast.show { transform: translateY(0); }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 40px 0; }
  .hero-content h1 { font-size: 3rem; }
}

/* --- SHARE CARD SPECIFIC (Hidden normally) --- */
.share-capture {
  background: #000;
  border: 2px solid #333;
  padding: 40px;
  width: 1080px; /* IG Post size approx */
  height: 1080px;
  position: fixed;
  left: -9999px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
}

.share-capture .header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #333;
  padding-bottom: 20px;
}

.share-capture .main-stat {
  font-size: 14rem;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.share-capture .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.share-capture .stat-box {
  border: 1px solid #333;
  padding: 30px;
}

.share-capture .stat-label {
  font-family: 'JetBrains Mono';
  color: #888;
  font-size: 1.5rem;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.share-capture .stat-val {
  font-size: 4rem;
  font-weight: 700;
}

