/* 
 * STREAMCRYPT - Netflix × Crypto Analytics Dashboard
 * A Kiro AI Accelerated Project
 * Version: 1.0.0
 */

:root {
  --bg: #0a0a0f;
  --card: #12121a;
  --border: rgba(255, 255, 255, 0.06);
  --text: #e5e5e5;
  --text-dim: #888;
  --red: #e50914;
  --green: #00d68f;
  --orange: #f7931a;
  --purple: #627eea;
  --cyan: #00d4ff;
  --font: "Rajdhani", sans-serif;
  --font-mono: "Share Tech Mono", monospace;
  --font-display: "Orbitron", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  font-weight: 500;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--red), var(--orange));
  border-radius: 4px;
}

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

/* Selection */
::selection {
  background: var(--red);
  color: white;
}

/* ========== LANDING PAGE ========== */
.landing-page {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

.landing-page.hidden {
  display: none;
}

.landing-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(229, 9, 20, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229, 9, 20, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  animation: scanlineMove 8s linear infinite;
}

@keyframes scanlineMove {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(4px);
  }
}
@keyframes gridMove {
  to {
    background-position: 50px 50px;
  }
}

.floating-particles {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: float 15s infinite ease-in-out;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translate(30px, -30px) rotate(180deg);
    opacity: 0.8;
  }
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbPulse 8s infinite ease-in-out;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(229, 9, 20, 0.2);
  top: 10%;
  left: 10%;
}
.orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(247, 147, 26, 0.15);
  bottom: 20%;
  right: 15%;
  animation-delay: 2s;
}
.orb-3 {
  width: 250px;
  height: 250px;
  background: rgba(98, 126, 234, 0.15);
  top: 50%;
  left: 60%;
  animation-delay: 4s;
}

@keyframes orbPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.9;
  }
}

.stranger-lights {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stranger-light {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  filter: blur(3px);
  animation: strangerFlicker 0.5s infinite;
}

@keyframes strangerFlicker {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

.landing-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 1000px;
  padding: 2rem;
  width: 100%;
}

/* FIXED: Glitch Effect - Reduced letter-spacing */
.glitch-container {
  position: relative;
  margin-bottom: 1.5rem;
  overflow: visible;
}

.landing-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  background: linear-gradient(
    135deg,
    #fff 0%,
    var(--red) 50%,
    var(--orange) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.glitch {
  animation: glitchText 3s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    #fff 0%,
    var(--red) 50%,
    var(--orange) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glitch::before {
  animation: glitchBefore 3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  text-shadow: -3px 0 var(--cyan);
}

.glitch::after {
  animation: glitchAfter 3s infinite;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  text-shadow: 3px 0 var(--red);
}

.glitch-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(229, 9, 20, 0.8);
  animation: scanline 4s linear infinite;
  opacity: 0.5;
}

@keyframes scanline {
  0% {
    top: 0;
  }
  100% {
    top: 100%;
  }
}

@keyframes glitchText {
  0%,
  90%,
  100% {
    transform: translate(0);
  }
  92% {
    transform: translate(-5px, 3px) skew(2deg);
  }
  94% {
    transform: translate(5px, -3px) skew(-2deg);
  }
  96% {
    transform: translate(-3px, -2px);
  }
  98% {
    transform: translate(3px, 2px);
  }
}

@keyframes glitchBefore {
  0%,
  90%,
  100% {
    transform: translate(0);
    opacity: 0.8;
  }
  92% {
    transform: translate(6px, 0);
    opacity: 0.5;
  }
  94% {
    transform: translate(-6px, 0);
    opacity: 0.8;
  }
  96% {
    transform: translate(3px, 0);
    opacity: 0.6;
  }
}

@keyframes glitchAfter {
  0%,
  90%,
  100% {
    transform: translate(0);
    opacity: 0.8;
  }
  92% {
    transform: translate(-6px, 0);
    opacity: 0.6;
  }
  94% {
    transform: translate(6px, 0);
    opacity: 0.5;
  }
  96% {
    transform: translate(-3px, 0);
    opacity: 0.8;
  }
}

.glitch-small {
  animation: glitchSmall 5s infinite;
}

@keyframes glitchSmall {
  0%,
  95%,
  100% {
    transform: translate(0);
    opacity: 0.5;
  }
  96% {
    transform: translate(-2px, 1px);
    opacity: 0.8;
  }
  97% {
    transform: translate(2px, -1px);
    opacity: 0.3;
  }
  98% {
    transform: translate(-1px, 0);
    opacity: 0.6;
  }
}

.landing-tagline {
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.tagline-word {
  color: var(--text-dim);
}
.tagline-highlight {
  font-weight: 700;
}
.netflix-text {
  color: var(--red);
  text-shadow: 0 0 30px rgba(229, 9, 20, 0.7);
}
.flicker-text {
  animation: textFlicker 4s infinite;
}

@keyframes textFlicker {
  0%,
  100% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  93% {
    opacity: 0.3;
  }
  94% {
    opacity: 1;
  }
  95% {
    opacity: 0.5;
  }
  96% {
    opacity: 1;
  }
}

.crypto-text {
  color: var(--orange);
  text-shadow: 0 0 30px rgba(247, 147, 26, 0.7);
}
.pulse-text {
  animation: textPulse 2s infinite;
}

@keyframes textPulse {
  0%,
  100% {
    text-shadow: 0 0 30px rgba(247, 147, 26, 0.7);
  }
  50% {
    text-shadow: 0 0 50px rgba(247, 147, 26, 1),
      0 0 80px rgba(247, 147, 26, 0.5);
  }
}

.landing-description {
  max-width: 650px;
  margin: 0 auto 2rem;
  color: var(--text-dim);
  line-height: 1.9;
  font-size: 1.1rem;
}

.landing-features {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.feature {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.hover-glow:hover {
  border-color: var(--red);
  box-shadow: 0 0 30px rgba(229, 9, 20, 0.3);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 1.3rem;
}

.explore-btn {
  position: relative;
  padding: 1.4rem 3rem;
  background: linear-gradient(135deg, var(--red), #ff4444);
  border: none;
  border-radius: 10px;
  color: white;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s ease;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  text-transform: uppercase;
}

.explore-btn:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 25px 50px rgba(229, 9, 20, 0.5);
}

.explore-btn:hover .btn-icon {
  transform: translateX(8px);
}
.btn-icon {
  transition: transform 0.3s;
  font-size: 1.2rem;
}

.btn-glow {
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, var(--red), var(--orange), var(--red));
  border-radius: 12px;
  z-index: -1;
  opacity: 0;
  animation: btnGlow 2s infinite;
}

.explore-btn:hover .btn-glow {
  opacity: 1;
}

@keyframes btnGlow {
  0%,
  100% {
    filter: blur(15px);
  }
  50% {
    filter: blur(25px);
  }
}

.landing-footer {
  margin-top: 3rem;
}

.stranger-text {
  font-size: 0.85rem;
  color: rgba(139, 0, 0, 0.6);
  letter-spacing: 3px;
  font-family: var(--font-mono);
}

.static-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
  z-index: 200;
}

.static-noise.active {
  animation: staticNoise 0.1s steps(5) infinite;
}

@keyframes staticNoise {
  0% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.15;
  }
  100% {
    opacity: 0.1;
  }
}

.flicker-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
  z-index: 100;
}

.flicker-overlay.active {
  animation: flicker 0.15s steps(2) 8;
}

@keyframes flicker {
  0% {
    background: rgba(139, 0, 0, 0.15);
  }
  25% {
    background: transparent;
  }
  50% {
    background: rgba(229, 9, 20, 0.1);
  }
  75% {
    background: transparent;
  }
  100% {
    background: rgba(139, 0, 0, 0.2);
  }
}

/* ========== NETFLIX INTRO - FIXED ANIMATION ========== */
.netflix-intro {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
}

.netflix-intro.active {
  display: flex;
}

.intro-sound-waves {
  position: absolute;
  top: 20%;
  display: flex;
  gap: 6px;
  opacity: 0;
  animation: fadeIn 0.5s ease 0.3s forwards;
}

.wave {
  width: 5px;
  height: 20px;
  background: var(--red);
  border-radius: 3px;
  animation: soundWave 0.4s ease infinite alternate;
}

.wave:nth-child(1) {
  animation-delay: 0s;
}
.wave:nth-child(2) {
  animation-delay: 0.1s;
  height: 35px;
}
.wave:nth-child(3) {
  animation-delay: 0.2s;
  height: 50px;
}
.wave:nth-child(4) {
  animation-delay: 0.1s;
  height: 35px;
}
.wave:nth-child(5) {
  animation-delay: 0s;
}

@keyframes soundWave {
  to {
    height: 60px;
  }
}

/* Netflix N Logo - SVG Animation */
.netflix-logo-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.netflix-n-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.netflix-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(
    circle,
    rgba(229, 9, 20, 0.4) 0%,
    transparent 70%
  );
  opacity: 0;
  animation: glowPulse 2s ease 1.5s forwards;
}

@keyframes glowPulse {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

.n-part {
  opacity: 0;
  transform-origin: center;
}

.n-left-bar {
  animation: slideInLeft 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}

.n-ribbon {
  animation: slideInDiagonal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s
    forwards;
}

.n-right-bar {
  animation: slideInRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s forwards;
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-20px) scaleY(0);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scaleY(1);
  }
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(20px) scaleY(0);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scaleY(1);
  }
}

@keyframes slideInDiagonal {
  0% {
    opacity: 0;
    transform: translateY(-20px) rotate(-10deg) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

.intro-text-container {
  text-align: center;
  opacity: 0;
  animation: fadeInUp 1s ease 1.8s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-presents {
  font-family: var(--font);
  font-size: 0.9rem;
  letter-spacing: 6px;
  color: var(--text-dim);
  margin-bottom: 1rem;
  font-weight: 600;
}

.intro-title {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 8px;
  margin-bottom: 0.5rem;
}

.intro-word {
  color: white;
}
.intro-word.accent {
  color: var(--red);
  text-shadow: 0 0 40px rgba(229, 9, 20, 0.8);
}

.intro-subtitle {
  font-family: var(--font);
  font-size: 1.1rem;
  letter-spacing: 8px;
  color: var(--text-dim);
  font-weight: 600;
}

.intro-loader {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 350px;
  opacity: 0;
  animation: fadeIn 0.5s ease 2.5s forwards;
}

.loader-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.loader-bar-container {
  width: 100%;
  height: 4px;
  background: #222;
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--red));
  background-size: 200% 100%;
  animation: gradientMove 1s linear infinite;
  transition: width 0.4s ease;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ========== MAIN APP ========== */
.app {
  display: none;
}
.app.visible {
  display: block;
  animation: dashboardFadeIn 1s ease;
}

@keyframes dashboardFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-icon {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.live-ticker {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: tickerPulse 2s infinite;
}

@keyframes tickerPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.ticker-symbol {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-weight: 600;
}
.ticker-price {
  font-weight: 700;
  font-family: var(--font-mono);
}
.ticker-change {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 600;
}
.ticker-change.up {
  color: var(--green);
}
.ticker-change.down {
  color: var(--red);
}

.market-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--green);
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 1.5s infinite;
  box-shadow: 0 0 10px var(--green);
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.theme-btn:hover {
  background: rgba(229, 9, 20, 0.15);
  border-color: var(--red);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.2);
}

/* Dashboard */
.dashboard {
  padding: 1.5rem;
  max-width: 1700px;
  margin: 0 auto;
}

.hover-lift {
  transition: all 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

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

.stat-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.stat-card:hover {
  border-color: var(--red);
}
.stat-card:hover .stat-glow {
  opacity: 1;
}

.stat-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-icon {
  font-size: 2.2rem;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  display: block;
}
.stat-value.correlation {
  color: var(--green);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Sections */
.section {
  margin-bottom: 1.5rem;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.section-badge {
  font-size: 0.75rem;
  padding: 0.3rem 0.9rem;
  background: var(--card);
  border-radius: 20px;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 1px;
}

.section-badge.pulse {
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(229, 9, 20, 0);
  }
}

/* Crypto Grid - 10 items */
.crypto-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.crypto-card {
  position: relative;
  padding: 1.3rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-left: 4px solid var(--coin-color, var(--orange));
  transition: all 0.4s ease;
  overflow: hidden;
}

.crypto-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(var(--coin-rgb, 247, 147, 26), 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.crypto-card:hover::before {
  opacity: 1;
}

.crypto-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(var(--coin-rgb, 247, 147, 26), 0.2);
  border-color: var(--coin-color, var(--orange));
}

.crypto-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.crypto-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.crypto-icon {
  font-size: 1.5rem;
}
.crypto-name {
  font-weight: 700;
  font-size: 0.95rem;
}
.crypto-symbol {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.crypto-rank {
  font-size: 0.65rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.crypto-price {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.crypto-changes {
  display: flex;
  gap: 0.8rem;
  font-size: 0.8rem;
}
.crypto-change {
  display: flex;
  flex-direction: column;
}
.crypto-change span:first-child {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 600;
}
.crypto-change.up span:last-child {
  color: var(--green);
  font-weight: 700;
}
.crypto-change.down span:last-child {
  color: var(--red);
  font-weight: 700;
}
.crypto-sparkline {
  height: 40px;
  margin-top: 0.75rem;
}

/* Netflix Grid - 10 items */
.netflix-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.netflix-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.netflix-card:hover {
  transform: scale(1.08);
  z-index: 10;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(229, 9, 20, 0.3);
  border-color: var(--red);
}

.netflix-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  transition: transform 0.4s;
}
.netflix-card:hover .netflix-poster {
  transform: scale(1.1);
}

.netflix-rank {
  position: absolute;
  bottom: 0;
  left: 0;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 3px #fff;
  line-height: 0.8;
  padding: 0.5rem;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.netflix-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.98));
  transform: translateY(100%);
  transition: transform 0.4s;
}

.netflix-card:hover .netflix-info {
  transform: translateY(0);
}
.netflix-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}
.netflix-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.netflix-rating {
  color: var(--green);
  font-weight: 700;
}

.netflix-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* Charts */
.charts-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.charts-section.three-col {
  grid-template-columns: repeat(3, 1fr);
}
.charts-section.four-col {
  grid-template-columns: repeat(4, 1fr);
}

.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s;
}

.chart-card:hover {
  border-color: rgba(229, 9, 20, 0.5);
}

.chart-header {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.chart-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.chart-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.chart-header p {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* Time Period Buttons */
.time-period-btns {
  display: flex;
  gap: 0.3rem;
}
.period-btn {
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.period-btn:hover {
  background: rgba(229, 9, 20, 0.15);
  border-color: var(--red);
  color: var(--text);
}
.period-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.chart-container {
  padding: 1rem;
  height: 280px;
}
.chart-container.small {
  height: 200px;
}

/* Tables */
.tables-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.table-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}
.live-badge {
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 700;
  animation: blink 1.5s infinite;
}
.table-wrapper {
  max-height: 400px;
  overflow-y: auto;
}

.table-wrapper::-webkit-scrollbar {
  width: 6px;
}
.table-wrapper::-webkit-scrollbar-track {
  background: var(--bg);
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--red);
  border-radius: 3px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  font-weight: 700;
  letter-spacing: 1px;
}

.data-table td {
  font-size: 0.85rem;
}
.data-table tr {
  transition: all 0.2s;
}
.data-table tr:hover td {
  background: rgba(229, 9, 20, 0.08);
}

.coin-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.coin-icon {
  font-size: 1.2rem;
}
.coin-name {
  font-weight: 700;
}
.coin-sym {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.price-cell {
  font-family: var(--font-mono);
  font-weight: 700;
}
.change-up {
  color: var(--green);
  font-weight: 700;
}
.change-down {
  color: var(--red);
  font-weight: 700;
}
.mini-chart {
  width: 80px;
  height: 30px;
}

/* Correlation Events Timeline */
.correlation-events {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.event-chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.events-list::-webkit-scrollbar {
  width: 4px;
}
.events-list::-webkit-scrollbar-thumb {
  background: var(--red);
  border-radius: 2px;
}

.event-card {
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-left: 3px solid var(--event-color, var(--red));
  transition: all 0.3s;
  cursor: pointer;
}

.event-card:hover {
  border-color: var(--event-color, var(--red));
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.event-card.bullish {
  --event-color: var(--green);
}
.event-card.bearish {
  --event-color: var(--red);
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.event-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.event-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 4px;
}

.event-type.rise {
  background: rgba(0, 214, 143, 0.2);
  color: var(--green);
}
.event-type.fall {
  background: rgba(229, 9, 20, 0.2);
  color: var(--red);
}

.event-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.event-show {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.event-show .netflix-icon {
  color: var(--red);
}

.event-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
}

.event-stat {
  display: flex;
  flex-direction: column;
}

.event-stat-label {
  color: var(--text-dim);
  font-size: 0.65rem;
}

.event-stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
}

.event-stat-value.up {
  color: var(--green);
}
.event-stat-value.down {
  color: var(--red);
}

@media (max-width: 1200px) {
  .correlation-events {
    grid-template-columns: 1fr;
  }
  .events-list {
    max-height: 300px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .event-card {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 250px;
  }
}

@media (max-width: 768px) {
  .event-card {
    flex: 1 1 100%;
  }
}

/* Insights */
.insights-section {
  margin-bottom: 1.5rem;
}
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.insight-card {
  padding: 1.3rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.3s;
}

.insight-card:hover {
  border-color: var(--red);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.insight-card.featured {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.15), var(--card));
}
.insight-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-weight: 600;
}
.insight-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0.8rem 0 0.5rem;
  font-weight: 700;
}
.insight-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.insight-stat {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
}
.stat-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text);
  letter-spacing: 2px;
}
.footer-time {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Upside Down */
.upside-down-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s;
}

body.upside-down .upside-down-overlay {
  opacity: 1;
  visibility: visible;
}
.ash-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ash-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(150, 150, 150, 0.6);
  border-radius: 50%;
  animation: floatUp 12s linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 20%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

body.upside-down {
  --red: #8b0000;
  --card: rgba(15, 5, 5, 0.95);
  --border: rgba(139, 0, 0, 0.4);
  filter: saturate(0.5) hue-rotate(10deg);
}

/* COMPLETE REFLECTION - Flip each section individually */
body.upside-down .stats-row,
body.upside-down .section,
body.upside-down .featured-section,
body.upside-down .charts-section,
body.upside-down .tables-section,
body.upside-down .insights-section,
body.upside-down .section-divider,
body.upside-down .footer {
  transform: scaleY(-1);
}

/* Flip content inside cards */
body.upside-down .stat-card,
body.upside-down .crypto-card,
body.upside-down .chart-card,
body.upside-down .table-card,
body.upside-down .insight-card,
body.upside-down .event-card,
body.upside-down .event-chart-card {
  transform: scaleY(-1);
}

/* Keep header always accessible and stable */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Smooth transition when toggling */
.stats-row,
.section,
.featured-section,
.charts-section,
.tables-section,
.insights-section,
.section-divider,
.footer,
.stat-card,
.crypto-card,
.chart-card,
.table-card,
.insight-card,
.event-card,
.event-chart-card {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section Dividers */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 0.5rem 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border),
    rgba(229, 9, 20, 0.3),
    var(--border),
    transparent
  );
}

.divider-icon {
  font-size: 1.5rem;
  padding: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.2);
  animation: dividerPulse 3s ease-in-out infinite;
}

@keyframes dividerPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.4);
    transform: scale(1.05);
  }
}

/* Featured Section Styling */
.featured-section {
  position: relative;
  padding: 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(229, 9, 20, 0.05),
    rgba(247, 147, 26, 0.05)
  );
  border: 1px solid rgba(229, 9, 20, 0.2);
  border-radius: 20px;
  margin-bottom: 1rem;
}

.featured-section::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--red), var(--orange), var(--red));
  border-radius: 22px;
  z-index: -1;
  opacity: 0.3;
  animation: featuredGlow 4s ease-in-out infinite;
}

@keyframes featuredGlow {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.4;
  }
}

/* Responsive */
@media (max-width: 1400px) {
  .crypto-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .netflix-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .charts-section.four-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1200px) {
  .crypto-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .netflix-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .charts-section,
  .charts-section.three-col,
  .charts-section.four-col {
    grid-template-columns: 1fr;
  }
  .tables-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .crypto-grid,
  .netflix-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .insights-grid {
    grid-template-columns: 1fr;
  }
  .header-center {
    display: none;
  }
  .landing-title {
    font-size: 2.2rem !important;
    letter-spacing: 0.1em;
  }
  .landing-features {
    flex-direction: column;
    align-items: center;
  }
  .explore-btn {
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
  }
  .intro-title {
    font-size: 2.5rem;
    letter-spacing: 4px;
  }
}

@media (max-width: 480px) {
  .stats-row,
  .crypto-grid,
  .netflix-grid {
    grid-template-columns: 1fr;
  }
  .footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
