/* Custom styles layered on top of Tailwind */

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  z-index: 100;
  background: #00c9a7;
  color: #0b0e14;
  padding: .5rem 1rem;
  border-radius: .5rem;
}
.skip-link:focus { left: 1rem; }

:focus-visible { outline: 2px solid #00c9a7; outline-offset: 2px; }

/* Buttons */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: .75rem;
  padding: .6rem 1.2rem;
  transition: all .2s ease;
}
.btn-primary { background: #00c9a7; color: #0b0e14; }
.btn-primary:hover { background: #00e0ba; box-shadow: 0 8px 24px -8px rgba(0, 201, 167, .6); }
.btn-ghost { border: 1px solid #2a3342; color: #eef2f6; }
.btn-ghost:hover { border-color: #00c9a7; color: #00c9a7; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1.05rem; }

/* Hero glow */
.hero-glow::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 201, 167, .18), transparent 60%);
  pointer-events: none;
}

/* Timeframe buttons */
.tf-btn {
  flex: 1;
  padding: .45rem 0;
  border-radius: .6rem;
  font-size: .85rem;
  font-weight: 600;
  color: #9aa6b5;
  border: 1px solid transparent;
  transition: all .2s;
}
.tf-btn:hover { color: #eef2f6; background: #1c2330; }
.tf-btn.active { color: #00c9a7; background: rgba(0, 201, 167, .1); border-color: rgba(0, 201, 167, .35); }

/* Ticker flash */
.flash-up { animation: flashUp 1s ease; }
.flash-down { animation: flashDown 1s ease; }
@keyframes flashUp {
  0% { background: rgba(0, 201, 167, .25); }
  100% { background: transparent; }
}
@keyframes flashDown {
  0% { background: rgba(255, 92, 108, .25); }
  100% { background: transparent; }
}
.up { color: #00c9a7; }
.down { color: #ff5c6c; }

/* Range sliders */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, #00c9a7 var(--fill, 50%), #2a3342 var(--fill, 50%));
  cursor: pointer;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eef2f6;
  border: 4px solid #00c9a7;
  box-shadow: 0 0 0 4px rgba(0, 201, 167, .15);
}
.range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #eef2f6;
  border: 4px solid #00c9a7;
}

/* Features */
.feature-card {
  background: #151a23;
  border: 1px solid #2a3342;
  border-radius: 1rem;
  padding: 2rem;
  transition: transform .25s, border-color .25s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(0, 201, 167, .5); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: .8rem;
  font-size: 1.25rem;
  color: #00c9a7;
  background: rgba(0, 201, 167, .12);
}

.cta-banner { background: linear-gradient(120deg, #00c9a7, #00a3c9); }

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, .65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn .2s ease;
}
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #151a23;
  border: 1px solid #2a3342;
  border-radius: 1.25rem;
  padding: 2rem;
  animation: popIn .25s ease;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .6rem;
  color: #9aa6b5;
}
.modal-close:hover { background: #1c2330; color: #eef2f6; }

.field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: .9rem;
  color: #9aa6b5;
}
.field input {
  background: #0b0e14;
  border: 1px solid #2a3342;
  border-radius: .7rem;
  padding: .7rem .9rem;
  color: #eef2f6;
}
.field input:focus { outline: none; border-color: #00c9a7; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    gap: 1rem;
    padding: 1.5rem 1.25rem;
    background: #0b0e14;
    border-bottom: 1px solid #2a3342;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
