/* =====================================================================
   HD/HQ Radio - custom "premium audio" facelift
   Layered on top of Beautiful Jekyll via _config.yml `site-css`.
   Pure overlay: no core theme files are modified.
   ===================================================================== */

:root {
  --bg-0:        #07070d;   /* deepest background          */
  --bg-1:        #0d0d18;   /* page base                   */
  --surface:     rgba(255, 255, 255, 0.045);
  --surface-2:   rgba(255, 255, 255, 0.07);
  --border:      rgba(255, 255, 255, 0.10);
  --border-2:    rgba(255, 255, 255, 0.16);

  --text:        #e9e9f2;
  --text-muted:  #a2a2b8;
  --heading:     #ffffff;

  --accent:      #b14bff;   /* violet  */
  --accent-2:    #ff3cac;   /* magenta */
  --accent-3:    #2dd4ff;   /* cyan    */
  --grad:        linear-gradient(120deg, #ff3cac 0%, #b14bff 50%, #2dd4ff 100%);
  --grad-soft:   linear-gradient(120deg, rgba(255,60,172,.18), rgba(177,75,255,.18) 50%, rgba(45,212,255,.18));

  --radius:      18px;
  --radius-sm:   12px;
  --shadow:      0 18px 50px -18px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 10px 40px -8px rgba(177, 75, 255, 0.45);
}

/* --- Base ------------------------------------------------------------ */

html { font-size: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg-1);
  background-image:
    radial-gradient(48rem 48rem at 12% -8%, rgba(255, 60, 172, 0.16), transparent 60%),
    radial-gradient(46rem 46rem at 98% 4%, rgba(45, 212, 255, 0.14), transparent 58%),
    radial-gradient(60rem 60rem at 50% 120%, rgba(177, 75, 255, 0.18), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* a slow drifting aurora layer behind everything */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(30rem 30rem at 20% 30%, rgba(177, 75, 255, 0.12), transparent 60%),
    radial-gradient(26rem 26rem at 80% 60%, rgba(45, 212, 255, 0.10), transparent 60%);
  filter: blur(20px);
  animation: aurora 26s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2%, -3%, 0) scale(1.08); }
}

p { line-height: 1.7; }

h1, h2, h3, h4, h5, h6 { color: var(--heading); letter-spacing: -0.01em; }

/* Section headings get a gradient accent bar */
[role="main"] h1,
[role="main"] h2 {
  position: relative;
  padding-bottom: 0.4rem;
  margin-top: 2.4rem;
}
[role="main"] h1::after,
[role="main"] h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 3.25rem; height: 4px;
  border-radius: 4px;
  background: var(--grad);
}

a { color: var(--accent-3); text-decoration: none; transition: color .18s ease; }
a:hover, a:focus { color: #fff; text-decoration: none; }

hr { border-color: var(--border); }
hr.small { border-color: var(--accent); opacity: .8; }

blockquote {
  color: var(--text-muted);
  border-left: 4px solid transparent;
  border-image: var(--grad) 1;
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.8rem 1.2rem;
}

::selection      { background: rgba(177, 75, 255, .45); color: #fff; }
::-moz-selection { background: rgba(177, 75, 255, .45); color: #fff; }

/* --- Navbar (frosted glass) ----------------------------------------- */

.navbar-custom {
  background: rgba(12, 12, 22, 0.55) !important;
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 30px -12px rgba(0, 0, 0, 0.8);
}

.navbar-custom .navbar-brand {
  color: #fff !important;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar-custom .nav-link {
  color: var(--text) !important;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  transition: color .18s ease;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus { color: #fff !important; }

/* animated underline on nav links */
.navbar-custom .navbar-nav > li > .nav-link::before {
  content: "";
  position: absolute;
  left: 0.5rem; right: 0.5rem; bottom: 0.35rem;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.navbar-custom .navbar-nav > li > .nav-link:hover::before { transform: scaleX(1); }

.navbar-custom .dropdown-menu {
  background: rgba(16, 16, 28, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 0.4rem;
}
.navbar-custom .dropdown-item {
  color: var(--text);
  border-radius: 8px;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  transition: background .15s ease, color .15s ease;
}
.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item:focus {
  background: var(--grad-soft);
  color: #fff;
}

.navbar-toggler { border-color: var(--border-2); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(233,233,242,0.9)' stroke-width='2.2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Avatar logo gets a glowing gradient ring */
.avatar-img-border {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.06), var(--shadow-glow) !important;
  background: var(--grad);
  padding: 2px;
}

/* --- Hero header ----------------------------------------------------- */

.intro-header {
  background: transparent;
}
.intro-header .page-heading h1,
.intro-header .post-heading h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  background: linear-gradient(120deg, #ffffff 0%, #e9d4ff 40%, #b9ecff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 8px 40px rgba(177, 75, 255, 0.25);
}
.intro-header .page-subheading,
.intro-header .post-subheading {
  color: var(--text-muted);
  font-style: normal;
  font-weight: 500;
}

/* --- Station logo cards --------------------------------------------- */
/* Targets only the station logos so dark/transparent logos stay readable
   on the dark page by sitting on a bright card. */

[role="main"] p > a > img[src*="/stations/"],
[role="main"] p > img[src*="/stations/"],
[role="main"] td img[src*="/stations/"] {
  background: #ffffff;
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform .22s ease, box-shadow .22s ease;
  height: auto;
}

[role="main"] p > a:hover > img[src*="/stations/"],
[role="main"] td a:hover img[src*="/stations/"] {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow), var(--shadow-glow);
}

/* The big network banners (KIIS Network etc.) - keep centered, subtle card */
[role="main"] p[align="center"] > a > img[src*="/stations/"] {
  padding: 18px 24px;
}

/* --- Native audio players ------------------------------------------- */

audio {
  width: 100%;
  max-width: 420px;
  height: 44px;
  margin: 0.4rem 0 2rem;
  border-radius: 40px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 6px 20px -10px rgba(0,0,0,0.7);
  filter: drop-shadow(0 0 0.5px rgba(177,75,255,0.4));
}
audio::-webkit-media-controls-panel {
  background: transparent;
}
audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-mute-button {
  filter: invert(1);
}
/* highlight a player whose stream is currently playing (set via JS) */
audio.is-playing {
  border-color: rgba(177, 75, 255, 0.65);
  box-shadow: 0 0 0 1px rgba(177,75,255,0.4), 0 0 28px -4px rgba(177,75,255,0.55);
}

/* --- Tables (the big station index) --------------------------------- */

[role="main"] table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2.5rem;
  background: #14141f;                 /* solid so text is always legible */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 1rem;
}
/* Override Beautiful Jekyll's white rows + gray cell borders */
[role="main"] table tr,
[role="main"] table thead tr,
[role="main"] table tbody tr {
  background-color: transparent;
  border: none;
  transition: background .15s ease;
}
[role="main"] table thead th {
  background-color: #1a1326;           /* solid base under the gradient */
  background-image: linear-gradient(120deg, rgba(255,60,172,.35), rgba(177,75,255,.35) 50%, rgba(45,212,255,.35));
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  padding: 0.85rem 1.1rem;
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--border-2);
}
[role="main"] table tbody td {
  padding: 0.7rem 1.1rem;
  border: none;
  border-top: 1px solid var(--border);
  background-color: transparent;       /* let the dark table show through */
  color: #f1f1f8;                      /* high-contrast cell text */
  vertical-align: middle;
}
[role="main"] table tbody tr:nth-child(even) td { background-color: rgba(255, 255, 255, 0.035); }
[role="main"] table tbody tr:hover td { background-color: rgba(177, 75, 255, 0.16); }

/* Turn the bitrate reference links in the Stream URL column into pills */
[role="main"] table td a {
  display: inline-block;
  padding: 0.28rem 0.85rem;
  border-radius: 30px;
  background: var(--grad);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px -8px rgba(177, 75, 255, 0.7);
  transition: transform .15s ease, filter .15s ease;
}
[role="main"] table td a:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
/* ...but never pill-wrap a link that holds a logo image (eJukebox/iHeart) */
[role="main"] table td a:has(img) {
  display: inline;
  padding: 0;
  background: none;
  box-shadow: none;
}

/* Keep wide tables usable on small screens */
@media (max-width: 576px) {
  [role="main"] table { display: block; overflow-x: auto; }
}

/* --- Buttons / pills -------------------------------------------------- */

.btn-primary,
.btn-default {
  background: var(--grad);
  border: none;
  border-radius: 40px;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
  transition: transform .15s ease, filter .15s ease;
}
.btn-primary:hover,
.btn-default:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* --- Code blocks ----------------------------------------------------- */

pre, code {
  background: rgba(0, 0, 0, 0.45);
  color: #e9d4ff;
  border-radius: 8px;
  border: 1px solid var(--border);
}
pre { padding: 1rem 1.2rem; box-shadow: var(--shadow); }
code { padding: 0.12rem 0.4rem; }

/* --- Search box ------------------------------------------------------ */

#beautifuljekyll-search-overlay { background: rgba(7, 7, 13, 0.92) !important; }
#nav-search-input {
  background: var(--surface-2);
  color: #fff;
  border-bottom: 2px solid var(--accent) !important;
}
#nav-search-input::placeholder { color: var(--text-muted); }

/* --- Footer ---------------------------------------------------------- */

footer {
  background: rgba(8, 8, 15, 0.85) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  color: var(--text-muted) !important;
}
footer a { color: var(--text-muted) !important; }
footer a:hover { color: #fff !important; }
footer .social-network-links a:hover { color: var(--accent) !important; }

/* --- Images that aren't station logos (hero photos) ------------------ */

[role="main"] img:not([src*="/stations/"]):not(.avatar-img) {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --- Motion / accessibility ------------------------------------------ */

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