* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: #0b0b0b;
  color: #ffffff;
  min-height: 100vh;
}

/* Gradient glow at top of page */
body::before {
  content: "";
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(255, 140, 0, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 900px;
  margin: auto;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

header {
  margin-bottom: 40px;
  text-align: center;
}

.header-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
  color: #0b0b0b;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  margin: 0;
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 52px;
}

.header-pill:hover {
  background: linear-gradient(135deg, #ffa533 0%, #ff8c00 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
}

.pill-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0b0b0b;
  letter-spacing: 0.5px;
}

.countdown-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(145deg, rgba(255, 140, 0, 0.1) 0%, rgba(255, 140, 0, 0.05) 100%);
  border: 1px solid rgba(255, 140, 0, 0.2);
  border-radius: 8px;
  padding: 6px 20px;
  min-height: 52px;
  justify-content: center;
}

.countdown-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 2px;
}

.countdown-time {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  color: #ff8c00;
  letter-spacing: 1px;
}

h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  font-style: italic;
}

.title-white {
  color: #ffffff;
}

.title-orange {
  color: #ff8c00;
}

.subtitle {
  color: #888;
  font-size: 1.1rem;
}

.tagline {
  color: rgba(255, 140, 0, 0.5);
  font-size: 0.85rem;
  margin-top: 8px;
  line-height: 1.2;
  transform: rotate(-2deg);
  display: inline-block;
  font-style: italic;
  letter-spacing: 0.5px;
}

.card {
  background: linear-gradient(145deg, #161616 0%, #111111 100%);
  border: 1px solid rgba(255, 140, 0, 0.1);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(255, 140, 0, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

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

.grid>div {
  background: rgba(255, 140, 0, 0.03);
  border: 1px solid rgba(255, 140, 0, 0.08);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: background 0.2s ease;
}

.grid>div:hover {
  background: rgba(255, 140, 0, 0.06);
}

.grid>div h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 0;
  color: #ff8c00;
  opacity: 0.8;
}

.grid>div p {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ff8c00;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

h2::before {
  content: "";
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, #ff8c00, #ff6b00);
  border-radius: 2px;
}

h3 {
  color: #ff8c00;
}

img {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0b0b0b;
  background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

a:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
  background: linear-gradient(135deg, #ffa533 0%, #ff8c00 100%);
}

a:active {
  transform: translateY(0);
}

ul {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

ul li {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid rgba(255, 140, 0, 0.3);
  margin-bottom: 8px;
  border-radius: 0 8px 8px 0;
  transition: all 0.2s ease;
}

ul li:hover {
  background: rgba(255, 140, 0, 0.05);
  border-left-color: #ff8c00;
}

ul li:last-child {
  margin-bottom: 0;
}

strong {
  color: #ff8c00;
}

/* Tip banner style for specific elements */
#signal-title {
  background: linear-gradient(90deg, rgba(255, 140, 0, 0.1) 0%, rgba(255, 140, 0, 0.02) 100%);
  border: 1px solid rgba(255, 140, 0, 0.15);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
  color: #ccc;
  margin: 0 0 12px 0;
}

#signal-title::before {
  content: "Signal: ";
  color: #ff8c00;
  font-weight: 600;
}

/* Games preview section */
.section-subtitle {
  color: #888;
  font-size: 0.95rem;
  margin: 0 0 16px 0;
}

.games-preview-link {
  display: block;
  margin: 16px 0;
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.games-preview-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 140, 0, 0.3);
}

.games-image {
  width: 100%;
  display: block;
  margin: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 140, 0, 0.15);
}

.play-link {
  display: inline-flex;
}

/* Snapshot metadata text */
.snapshot-meta {
  font-size: 0.75rem;
  color: #666;
  margin: 8px 0 0 0;
  text-align: right;
}

/* Timestamp text */
.timestamp-text {
  text-align: center;
  font-size: 0.8rem;
  color: #555;
  margin-top: 8px;
  margin-bottom: 0;
}

/* ===== Weekly Pulse Overlay ===== */
.weekly-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.weekly-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.weekly-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.weekly-panel {
  position: relative;
  width: 92%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid rgba(255, 140, 0, 0.2);
  border-radius: 16px;
  padding: 32px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(255, 140, 0, 0.08);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.weekly-overlay.active .weekly-panel {
  transform: translateY(0);
}

.weekly-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 140, 0, 0.1);
  padding-bottom: 16px;
}

.weekly-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ff8c00;
  margin: 0;
  display: block;
}

.weekly-title::before {
  display: none;
}

.weekly-period {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 4px 0 0 0;
}

.weekly-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
}

.weekly-close:hover {
  background: rgba(255, 140, 0, 0.15);
  border-color: rgba(255, 140, 0, 0.3);
  color: #ff8c00;
}

.weekly-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.weekly-empty {
  text-align: center;
  color: #666;
  font-size: 0.95rem;
  padding: 40px 0;
  margin: 0;
}

.weekly-section {
  margin-bottom: 20px;
}

.weekly-section:last-child {
  margin-bottom: 0;
}

.weekly-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ff8c00;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 140, 0, 0.12);
}

.weekly-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.weekly-table-header {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 12px;
  padding: 8px 16px;
}

.weekly-table-header .weekly-col-name {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  font-weight: 600;
}

.weekly-table-header .weekly-col-value {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  font-weight: 600;
  text-align: right;
}

.weekly-table-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  margin-bottom: 4px;
  transition: background 0.15s ease;
}

.weekly-table-row:hover {
  background: rgba(255, 140, 0, 0.04);
}

.weekly-table-row .weekly-col-name {
  font-size: 0.9rem;
  color: #bbb;
  font-weight: 500;
}

.weekly-table-row .weekly-col-value {
  font-size: 0.9rem;
  color: #bbb;
  text-align: right;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.weekly-table-row .weekly-col-current {
  color: #ff8c00;
  font-weight: 700;
}

.weekly-trend {
  font-size: 0.65rem;
  margin-left: 6px;
  font-weight: 400;
  opacity: 0.7;
}

.weekly-trend.up {
  color: #4caf50;
}

.weekly-trend.down {
  color: #e05555;
}

.weekly-trend.flat {
  color: #888;
}

.weekly-footer {
  text-align: center;
  font-size: 0.75rem;
  color: #555;
  margin: 24px 0 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 140, 0, 0.08);
}

/* ===== Responsive adjustments ===== */
@media (max-width: 600px) {
  h1 {
    font-size: 1.8rem;
  }

  .card {
    padding: 20px;
  }

  .grid>div p {
    font-size: 1.25rem;
  }

  .weekly-panel {
    padding: 20px;
    width: 95%;
    max-height: 90vh;
  }

  .weekly-metric-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .weekly-metric-values {
    width: 100%;
  }
}