* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Orbitron", system-ui, sans-serif;
  background: #0a0a0a;
  color: #e8e4dc;
  min-height: 100vh;
  position: relative;
}

/* Logo watermark — full body background */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../images/je-radio-logo.png");
  background-size: 55%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

/* Subtle 80s scan-line feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' 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%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
  z-index: 1;
}

/* Top bar — metallic faceplate */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(180deg, #2a2520 0%, #1a1510 50%, #0f0d0a 100%);
  border-bottom: 2px solid #6a6560;
  border-top: 2px solid #8a8580;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 52px;
  width: auto;
  display: block;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #909090;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 50%, #cc0000 100%);
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(255, 140, 0, 0.7);
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 12px rgba(255, 140, 0, 0.7); }
  50% { opacity: 0.8; box-shadow: 0 0 8px rgba(255, 140, 0, 0.5); }
}

.meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: #808080;
}

.sep {
  opacity: 0.5;
}

.weather {
  font-size: 12px;
  color: #808080;
}

.linklike {
  background: none;
  border: none;
  color: #a0a0a0;
  opacity: 0.9;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font: inherit;
}

.linklike:hover {
  opacity: 1;
  color: #ff8c00;
}

.wrap {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* Hero — main display area */
.hero .visual {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  position: relative;
  border: 2px solid #5a5550;
  border-top: 2px solid #7a7570;
  border-radius: 8px;
  padding: 28px;
  min-height: 200px;
  background: linear-gradient(145deg, #1a1510 0%, #151210 50%, #0f0d0a 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.6),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.4);
}

.hero-main {
  flex: 1;
  min-width: 0;
}

.now .label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #606060;
}

.now .title {
  font-size: 26px;
  font-weight: 400;
  margin-top: 8px;
  color: #f0ece4;
}

.now .sub {
  margin-top: 6px;
  font-size: 13px;
  color: #909090;
}

.tagline {
  margin-top: 14px;
  font-size: 13px;
  color: #707070;
}

.tune {
  margin-top: 20px;
  padding: 14px 24px;
  border-radius: 6px;
  border: 1px solid #505050;
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  color: #e8e8e8;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  letter-spacing: 0.06em;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tune:hover {
  background: linear-gradient(180deg, #3a3025 0%, #2a2015 100%);
  border-color: #7a6550;
  color: #ffd700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 16px rgba(255, 140, 0, 0.25);
}

.listening {
  margin-top: 16px;
  font-size: 13px;
  color: #ff8c00;
}

.hidden {
  display: none;
}

/* Player — compact, inline right of now-playing */
.player-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.playerMount {
  width: 220px;
  min-width: 220px;
  border: 2px solid #5a5550;
  border-top: 2px solid #6a6560;
  border-radius: 8px;
  overflow: hidden;
  background: #050505;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.8);
  transition: width 0.3s ease, min-width 0.3s ease;
}

.hero.hero--tv-mode .visual {
  flex-direction: column;
}

.hero.hero--tv-mode .player-wrap {
  width: 100%;
}

.playerMount.playerMount--tv {
  width: 100%;
  min-width: 100%;
}

.playerMount .placeholder {
  display: block;
  padding: 20px;
  min-height: 124px;
  color: #606060;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
}

.playerMount iframe {
  width: 220px;
  height: 124px;
  border: 0;
  display: block;
  transition: width 0.3s ease, height 0.3s ease;
}

.playerMount.playerMount--tv iframe {
  width: 100%;
  height: 360px;
}

.tv-mode-btn {
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  border: 1px solid #404040;
  border-radius: 4px;
  background: #1a1a1a;
  color: #909090;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tv-mode-btn:hover {
  border-color: #7a6550;
  color: #ff8c00;
}

.tv-mode-btn.tv-mode-btn--active {
  border-color: #ff8c00;
  color: #ff8c00;
}

/* Lower panels */
.lower {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.panel {
  border: 2px solid #5a5550;
  border-top: 2px solid #6a6560;
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(145deg, #1a1510 0%, #151210 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 2px 6px rgba(0, 0, 0, 0.3);
}

.panelTitle {
  letter-spacing: 0.14em;
  font-size: 11px;
  text-transform: uppercase;
  color: #606060;
}

.panelBody {
  margin-top: 12px;
  color: #b0b0b0;
  font-size: 14px;
}

.code-form {
  display: flex;
  gap: 8px;
}

.code {
  flex: 1;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid #404040;
  background: #0a0a0a;
  color: #e8e8e8;
  font: inherit;
}

.code:focus {
  outline: none;
  border-color: #7a6550;
  box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.3);
}

.code-submit {
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid #505050;
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  color: #e8e8e8;
  font: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.code-submit:hover {
  border-color: #ff8c00;
  color: #ff8c00;
}

.hint {
  margin-top: 10px;
  font-size: 12px;
  color: #505050;
}

.hint.hint--success {
  color: #ff8c00;
}

.hint.hint--error {
  color: #e05050;
}

/* Footer row: sponsor + connect */
.footer-row {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}

.sponsor {
  padding: 20px;
  border: 2px solid #5a5550;
  border-top: 2px solid #6a6560;
  border-radius: 8px;
  background: linear-gradient(145deg, #1a1510 0%, #151210 100%);
  text-align: center;
}

.sponsor-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #606060;
  margin-bottom: 12px;
}

.sponsor-link {
  display: block;
}

.sponsor-ad {
  width: 300px;
  height: auto;
  display: block;
  border-radius: 4px;
  margin: 0 auto;
}

.connect-panel {
  border: 2px solid #5a5550;
  border-top: 2px solid #6a6560;
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(145deg, #1a1510 0%, #151210 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.connect-about {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #909090;
  line-height: 1.5;
}

.connect-link {
  display: block;
  margin-top: 8px;
  color: #a0a0a0;
  text-decoration: none;
  font-size: 14px;
}

.connect-link:hover {
  color: #ff8c00;
}

.connect-link:first-of-type {
  margin-top: 12px;
}

.unlocked-list {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #2a2a2a;
}

.unlocked-item {
  font-size: 12px;
  color: #ff8c00;
  margin-bottom: 4px;
}

.unlocked-item::before {
  content: "✓ ";
}

/* Transmission Log entries */
.log-entry {
  padding: 8px 0;
  border-bottom: 1px solid #252525;
  font-size: 13px;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-entry--lore {
  color: #8b7a5c;
  font-style: italic;
}

.log-entry--code {
  color: #ff8c00;
}

.log-entry--tune {
  color: #909090;
}

.log-entry time {
  font-size: 11px;
  color: #505050;
  margin-right: 8px;
}

@media (max-width: 760px) {
  .footer-row {
    grid-template-columns: 1fr;
  }

  .sponsor-ad {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .hero .visual {
    flex-direction: column;
  }

  .player-wrap {
    width: 100%;
    align-items: stretch;
  }

  .playerMount {
    width: 100% !important;
    min-width: unset !important;
  }

  .playerMount .placeholder,
  .playerMount iframe {
    width: 100%;
    min-height: 140px;
  }

  .playerMount iframe {
    height: 200px;
  }

  .playerMount.playerMount--tv iframe {
    height: 240px;
  }

  .brand-logo {
    height: 44px;
  }

  .lower {
    grid-template-columns: 1fr;
  }

  .now .title {
    font-size: 22px;
  }
}
