/* Global styles */

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

body {
  margin: 0;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #0f172a;
  color: #e1e4e8;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
}

/* Utilities */
.positive {
  color: #10b981;
}

.negative {
  color: #ef4444;
}

/* Animated gradient text */
.animated-text {
  /* gradients */
  background: -webkit-linear-gradient(
    90deg,
    #6c63ff 0%,
    #00d1ff 33%,
    #2ef2b1 66%,
    #9dff57 100%
  );
  background: linear-gradient(
    90deg,
    #6c63ff 0%,
    #00d1ff 33%,
    #2ef2b1 66%,
    #9dff57 100%
  );
  background-size: 400% 100%;
  background-repeat: repeat;
  /* clip to text */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  /* motion */
  animation: gradient-flow 6s linear infinite alternate;
  display: inline-block;
  will-change: background-position;
}

@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* Cypherpunk theme */
:root {
  --bg-0: #0b0d10;
  --bg-1: #111213;
  --panel: #131313;
  --panel-border: #232323;
  --text-0: #e6edf3;
  --text-1: #aab1b6;
  --muted: #7b8690;

  --pink: #ff2ea6;
  --cyan: #00e6ff;
  --lime: #39ff14;
  --lime-light: #b9ff6a;
  --purple: #7c3aed;
  --purple-deep: #2a1566;
  --blue-deep: #0b6aa6;
  --violet: #b84cff;
  --mint: #00f5c8;
  --track: #171717;
  --track-border: #2a2a2a;

  --gradient-cypher: linear-gradient(
    90deg,
    var(--pink),
    var(--cyan),
    var(--lime)
  );
}

@keyframes hue-slide {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.logo-cypher {
  font-weight: 800;
  letter-spacing: 0.4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "JetBrains Mono",
    "Roboto Mono", monospace;
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--mint));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 6px rgba(0, 230, 255, 0.14));
  text-shadow: none;
  animation: hue-slide 16s linear infinite;
  will-change: background-position;
}

/* Button */
@keyframes border-shift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 0 0, 100% 0;
  }
}

.btn-cypher {
  position: relative;
  border-radius: 10px;
  padding: 8px 16px;
  border: 1.5px solid transparent;
  background: linear-gradient(#101010, #101010) padding-box,
    linear-gradient(90deg, var(--pink), var(--cyan), var(--lime)) border-box;
  background-size: 100% 100%, 200% 100%;
  /* slower, subtle ping-pong; only border layer moves via keyframes above */
  animation: border-shift 28s linear infinite alternate;
  color: #e6fff6;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 0 0 rgba(0, 230, 255, 0);
  cursor: pointer;
}

.btn-cypher--fast {
  animation: border-shift 1s linear infinite alternate;
}

.btn-cypher--filled-bg {
  background: linear-gradient(
        90deg,
        rgba(0, 230, 255, 0.08),
        rgba(57, 255, 20, 0.08)
      )
      padding-box,
    linear-gradient(90deg, var(--pink), var(--cyan), var(--lime)) border-box;
  background-size: 100% 100%, 200% 100%;
}

.btn-cypher:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(0, 230, 255, 0.25), 0 0 28px rgba(57, 255, 20, 0.16);
}

.btn-cypher:active {
  transform: translateY(0) scale(0.98);
}

.btn-cypher:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #131313, 0 0 0 4px var(--cyan);
}

/* Input focus ring to match cypher button */
.input-cypher {
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  border: 1px solid #2a2a2a;
  caret-color: var(--lime-light) !important;
}

/* Ensure caret applies whether the class is on the input or a wrapper */
input.input-cypher,
.input-cypher input {
  caret-color: var(--lime-light) !important;
}

.input-cypher:focus,
.input-cypher:focus-visible {
  outline: none;
  border: 1px solid var(--lime-light) !important;
  caret-color: var(--lime-light);
  box-shadow: 0 0 16px rgba(0, 230, 255, 0.25), 0 0 28px rgba(57, 255, 20, 0.16);
}

/* Night City Mint Scrollbar Theme - Single layer gradient for better compatibility */
.cypher-scroll {
  overflow-x: auto;
  scrollbar-gutter: stable both-edges;
  /* Firefox fallback colors below */
  scrollbar-color: #00e5ff #121212; /* thumb, track */
  scrollbar-width: thin;
}

/* WebKit (Chrome/Edge/Safari) */
.cypher-scroll::-webkit-scrollbar {
  height: 12px;
}
.cypher-scroll::-webkit-scrollbar-track {
  background: #1f2937;
  border-radius: 100vh;
}

/* Clean gradient thumb like the example */
.cypher-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(
    var(--pink),
    var(--violet),
    var(--cyan),
    var(--mint),
    var(--lime)
  );
  border-radius: 100vh;
}

.cypher-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    var(--pink),
    var(--violet),
    var(--cyan),
    var(--mint),
    var(--lime)
  );
  filter: brightness(1.1);
}

/* Cyberpunk Landing Page Styles */

/* Global page background with subtle "nebula" glows */
.cypher-page {
  position: relative;
  background: radial-gradient(
      800px 500px at 20% 0%,
      rgba(184, 76, 255, 0.1),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 85% -10%,
      rgba(0, 229, 255, 0.1),
      transparent 65%
    ),
    linear-gradient(var(--bg-0), var(--bg-0));
  color: var(--text-0);
  min-height: 100vh;
}

/* Faint grid + scanlines */
.cypher-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(transparent 95%, rgba(57, 255, 20, 0.1) 95%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 14px, 28px 100%;
  opacity: 0.06;
}

@media (prefers-reduced-motion: reduce) {
  .cypher-page::after {
    background-size: 100% 14px, 28px 100%;
  }
}

/* Hero section */
.hero {
  position: relative;
  z-index: 1;
  padding: 96px 0 48px;
  text-align: center;
}

.hero h1 {
  font-weight: 800;
  line-height: 1.05;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: 0.2px;
  color: var(--text-0);
  margin-bottom: 20px;
}

.hero .accent {
  background: var(--gradient-cypher);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 18px rgba(0, 229, 255, 0.12);
}

.hero p {
  color: var(--text-1);
  max-width: 720px;
  margin: 16px auto 28px;
  font-size: 20px;
  line-height: 1.5;
}

.hero .cta {
  margin-top: 8px;
}

/* Feature cards (glass + neon edge) */
.features {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 64px auto;
  max-width: 1100px;
  padding: 0 24px;
}

@media (max-width: 960px) {
  .features {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  z-index: 1;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid var(--panel-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 40px rgba(0, 229, 255, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.card h3 {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--text-0);
  font-size: 20px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* Neon edge on hover using border-image */
.card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  border-image: var(--gradient-cypher) 1;
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.14), 0 0 36px rgba(57, 255, 20, 0.1);
}

/* Update button styles for cyberpunk theme */
.btn-cypher--filled {
  background: linear-gradient(
        90deg,
        rgba(0, 229, 255, 0.12),
        rgba(57, 255, 20, 0.12)
      )
      padding-box,
    var(--gradient-cypher) border-box;
  background-size: 100% 100%, 200% 100%;
  padding: 12px 20px;
  font-size: 16px;
}

/* Section headers */
.section-header {
  text-align: center;
  margin: 32px 0 8px;
  font-size: 36px;
  font-weight: 700;
  color: var(--text-0);
}

.section-subheader {
  text-align: center;
  color: var(--text-1);
  margin: 0 0 28px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  font-size: 18px;
}

/* Responsive valuation chip - hide at narrow widths */
/* Container query approach - requires container-type on parent */
.chart-container {
  container-type: inline-size;
}

@container (max-width: 350px) {
  .valuation-chip {
    display: none;
  }
}

/* More aggressive fallback - hide chip when chart gets very narrow */
@media (max-width: 800px) {
  .valuation-chip {
    display: none !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .btn-cypher {
    animation: none;
  }
  .card {
    transition: none;
  }
}
