:root{
--bg-1: hsl(250, 30%, 8%);
--bg-2: hsl(250, 35%, 12%);
--muted: hsl(215, 20%, 65%);
--card-bg: hsla(250,25%,12%,0.5);
--accent: hsl(280, 80%, 60%);
--accent-2: hsl(180, 90%, 55%);
--listener-bg: rgba(0, 0, 0, 0.6);
--player-height: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
color: hsl(210, 40%, 98%);
min-height: 100vh;
padding-bottom: 200px;
}

.header {
border-bottom: 1px solid hsla(250, 20%, 20%, 0.5);
background: hsla(250, 30%, 10%, 0.5);
backdrop-filter: blur(40px);
position: sticky; top: 0; z-index: 40;
}

.header-content {
max-width: 1200px; margin: 0 auto; padding: 1rem;
display: flex; align-items: center; gap: 0.75rem;
justify-content: space-between;
}

.brand {
display:flex; align-items:center; gap:0.75rem;
}

.logo {
height: 2.5rem; width: 2.5rem; border-radius: 0.5rem;
background: linear-gradient(135deg, hsl(280, 80%, 60%) 0%, hsl(240, 70%, 50%) 100%);
display: flex; align-items: center; justify-content: center;
box-shadow: 0 0 40px hsla(280, 80%, 60%, 0.3);
}

.header-text h1 { font-size: 1.25rem; font-weight: 700; }
.header-text p { font-size: 0.75rem; color: var(--muted); }

.logo-image {
width: 36px;
height: 36px;
display: block;
}

.controls-row {
display:flex; gap:0.5rem; align-items:center; flex-wrap: wrap;
}

.search-input {
padding: 0.5rem 0.75rem; border-radius: 0.5rem;
border: 1px solid rgba(255,255,255,0.06);
background: rgba(255,255,255,0.02);
color: inherit; min-width: 220px;
}

.small-toggle {
padding: 0.5rem 0.75rem; border-radius: 0.5rem;
border: 1px solid hsla(250, 20%, 20%, 0.5);
background: var(--card-bg);
color: hsl(210, 40%, 98%);
cursor: pointer; font-weight: 600;
}
.small-toggle[aria-pressed="true"] { background: var(--accent); box-shadow: 0 0 30px rgba(128,0,255,0.12); color: #0b0710; }

.column-selector {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
border-radius: 0.5rem;
border: 1px solid hsla(250, 20%, 20%, 0.5);
background: var(--card-bg);
}

.column-selector-label {
font-size: 0.875rem;
color: var(--muted);
white-space: nowrap;
}

.column-select {
padding: 0.25rem 0.5rem;
border-radius: 0.375rem;
border: 1px solid rgba(255,255,255,0.1);
background: rgba(255,255,255,0.05);
color: hsl(210, 40%, 98%);
font-weight: 600;
cursor: pointer;
outline: none;
transition: all 0.2s;
}

.column-select:hover {
background: rgba(255,255,255,0.1);
}

.column-select:focus {
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(128, 0, 255, 0.2);
}

/* Live Visitors Counter */
.live-visitors {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
border-radius: 0.5rem;
background: var(--card-bg);
border: 1px solid hsla(250, 20%, 20%, 0.5);
}

.visitors-icon {
width: 1.5rem;
height: 1.5rem;
color: var(--accent-2);
animation: pulse 2s infinite;
}

.visitors-text {
display: flex;
flex-direction: column;
gap: 0.1rem;
}

.visitors-label {
font-size: 0.65rem;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.5px;
}

.visitors-count {
font-size: 0.9rem;
font-weight: 700;
color: hsl(210, 40%, 98%);
}

.main { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }

.section-header { margin-bottom: 1rem; display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.section-header h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0; }
.section-header p { color: var(--muted); font-size: 0.875rem; }

.stations-grid {
display: grid;
gap: 1rem;
transition: grid-template-columns 0.3s ease;
}

/* Dynamic column classes */
.stations-grid.cols-1 { grid-template-columns: repeat(1, 1fr); }
.stations-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.stations-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stations-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stations-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.stations-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
.stations-grid.cols-7 { grid-template-columns: repeat(7, 1fr); }
.stations-grid.cols-8 { grid-template-columns: repeat(8, 1fr); }

.navigation-buttons {
display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem;
}
.nav-button {
padding: 0.6rem 1rem; border-radius: 0.5rem;
border: 1px solid hsla(250, 20%, 20%, 0.5);
background: var(--card-bg);
backdrop-filter: blur(8px);
color: hsl(210, 40%, 98%);
cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
font-weight: 600;
}
.nav-button:hover:not(:disabled) {
background: var(--accent);
box-shadow: 0 0 20px hsla(280, 80%, 60%, 0.3);
transform: translateY(-2px);
}
.nav-button:disabled { opacity: 0.3; cursor: not-allowed; }

.station-card {
border: 1px solid hsla(250, 20%, 20%, 0.5);
background: var(--card-bg);
backdrop-filter: blur(8px);
border-radius: 0.75rem; overflow: hidden;
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
cursor: pointer; display:flex; flex-direction:column;
position: relative;
}
.station-card:hover { transform: translateY(-4px); box-shadow: 0 0 40px hsla(280, 80%, 60%, 0.12); background: rgba(255,255,255,0.02); }

.station-image-container { position: relative; padding-bottom: 100%; overflow: hidden; }
.station-image {
position: absolute; inset: 0; width: 100%; height: 100%;
object-fit: cover; transition: transform 0.5s;
}
.station-card:hover .station-image { transform: scale(1.06); }

.image-overlay {
position: absolute; inset: 0;
background: linear-gradient(to top, rgba(8,7,12,0.9), rgba(8,7,12,0.35) 50%, transparent);
opacity: 0.7; transition: opacity 0.3s;
}
.station-card:hover .image-overlay { opacity: 0.9; }

.card-actions {
position:absolute; top: 0.6rem; right: 0.6rem; display:flex; gap:0.5rem;
}
.icon-button {
width:2.4rem; height:2.4rem; border-radius:50%; display:flex; align-items:center; justify-content:center;
background: rgba(0,0,0,0.45); border: 1px solid hsla(0,0%,100%,0.04); color: white; cursor:pointer;
}
.fav-button[aria-pressed="true"] { background: linear-gradient(90deg,var(--accent), #ff8ea3); color: #0b0710; box-shadow: 0 0 12px rgba(255,100,200,0.12); }

.play-button {
position: absolute; bottom: 0.9rem; right: 0.9rem;
width: 3rem; height: 3rem; border-radius: 50%;
border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
transition: all 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.play-button.playing { background: var(--accent-2); color: hsl(250, 30%, 8%); box-shadow: 0 0 40px hsla(280, 80%, 60%, 0.3); }
.play-button:not(.playing) { background: var(--accent); color: white; }
.station-card:hover .play-button { transform: scale(1.05); box-shadow: 0 0 20px hsla(280, 80%, 60%, 0.2); }
.play-button svg { width: 1.25rem; height: 1.25rem; }

.station-info { padding: 0.85rem; }
.station-name { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-genre { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.5rem; }

/* Social icons in station card */
.station-social-icons {
display: flex;
gap: 0.4rem;
align-items: center;
margin-top: 0.5rem;
flex-wrap: wrap;
}

.social-icon-link {
width: 1.75rem;
height: 1.75rem;
border-radius: 50%;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
color: var(--muted);
text-decoration: none;
}

.social-icon-link:hover {
background: var(--accent);
color: white;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(128, 0, 255, 0.2);
}

.social-icon-link svg {
width: 0.9rem;
height: 0.9rem;
}

/* Stream Sponsor Badge */
.stream-sponsor {
margin-top: 0.75rem;
padding: 0.5rem;
background: linear-gradient(135deg, rgba(128, 0, 255, 0.1) 0%, rgba(64, 0, 128, 0.1) 100%);
border: 1px solid rgba(128, 0, 255, 0.2);
border-radius: 0.375rem;
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.7rem;
transition: all 0.2s;
}

.stream-sponsor:hover {
background: linear-gradient(135deg, rgba(128, 0, 255, 0.15) 0%, rgba(64, 0, 128, 0.15) 100%);
border-color: rgba(128, 0, 255, 0.3);
}

.sponsor-icon {
width: 1.25rem;
height: 1.25rem;
display: flex;
align-items: center;
justify-content: center;
background: var(--accent);
border-radius: 50%;
flex-shrink: 0;
}

.sponsor-icon svg {
width: 0.75rem;
height: 0.75rem;
color: white;
}

.sponsor-text {
flex: 1;
display: flex;
flex-direction: column;
gap: 0.1rem;
}

.sponsor-label {
color: var(--muted);
font-size: 0.65rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.sponsor-name {
color: hsl(210, 40%, 98%);
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

/* Listener count badge */
.listener-count {
position: absolute;
top: 0.6rem;
left: 0.6rem;
background: var(--listener-bg);
color: white;
padding: 0.25rem 0.5rem;
border-radius: 1rem;
font-size: 0.75rem;
font-weight: 600;
display: flex;
align-items: center;
gap: 0.25rem;
z-index: 2;
}
.listener-count::before {
content: "•";
color: #4ade80;
font-size: 1.2rem;
animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

.audio-player {
position: fixed; 
bottom: 0; 
left: 0; 
right: 0;
height: var(--player-height);
background: hsla(250, 25%, 12%, 0.98);
backdrop-filter: blur(40px);
border-top: 1px solid hsl(250, 20%, 20%);
padding: 0;
margin: 0;
z-index: 50; 
display: none;
}
.audio-player.active { display: block; }

.audio-player-content {
max-width: 1200px; 
margin: 0 auto; 
height: 100%;
display: flex; 
align-items: center; 
gap: 1rem;
padding: 0 1rem;
}
.player-controls { display: flex; align-items: center; gap: 0.6rem; }

.control-button {
width: 2.8rem; height: 2.8rem; border-radius: 12px;
background: var(--accent); color: white;
border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4px 12px rgba(128, 0, 255, 0.2);
position: relative;
overflow: hidden;
}

.control-button::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
opacity: 0;
transition: opacity 0.3s ease;
}

.control-button:hover {
transform: translateY(-3px);
box-shadow: 0 6px 16px rgba(128, 0, 255, 0.3);
}

.control-button:hover::before {
opacity: 1;
}

.control-button:active {
transform: translateY(-1px) scale(0.95);
box-shadow: 0 2px 8px rgba(128, 0, 255, 0.25);
}

.control-button svg {
width: 1.3rem;
height: 1.3rem;
filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.share-button {
width: 2.6rem; height: 2.6rem; border-radius: 8px;
background: var(--accent-2); color: hsl(250, 30%, 8%);
border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
transition: all 0.2s;
position: relative;
}
.share-button:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 0 20px hsla(180, 90%, 55%, 0.3);
}

.share-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.share-tooltip {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.share-tooltip.show {
  opacity: 1;
}

.share-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--accent);
}

.player-info { flex: 1; min-width: 0; }
.now-playing { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.25rem; }
.station-name-player { font-size: 1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.volume-control { display: flex; align-items: center; gap: 0.5rem; }
.volume-button {
background: none; border: none; color: var(--muted);
cursor: pointer; padding: 0.5rem; display: flex; align-items: center; transition: color 0.2s;
}
.volume-button:hover { color: white; }
.volume-button svg { width: 1.25rem; height: 1.25rem; }

.volume-slider {
width: 100px; height: 6px; background: hsla(250, 20%, 20%, 1);
border-radius: 3px; position: relative; cursor: pointer;
}
.volume-fill {
height: 100%; background: var(--accent);
border-radius: 3px; transition: width 0.1s;
}

.visually-hidden { position:absolute !important; height:1px; width:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }

.ad-slider-wrapper {
position: fixed;
bottom: var(--player-height);
left: 0;
right: 0;
z-index: 45;
display: none;
margin: 0;
padding: 0;
}
.ad-slider-wrapper.active {
display: block;
}
.ad-slider-container {
max-width: 1200px;
margin: 0 auto;
height: 100%;
background: var(--card-bg);
overflow: hidden;
position: relative;
padding: 0;
border-radius: 0;
}
.ad-slider-track {
display: flex;
height: 100%;
transition: transform 0.8s ease-in-out;
margin: 0;
padding: 0;
}
.ad-slide {
flex: 0 0 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
margin: 0;
}
.ad-slide a {
display: flex;
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
text-decoration: none;
color: var(--muted);
padding: 0;
margin: 0;
}
.ad-slide img {
height: 100%;
width: 720px;
max-width: 100%;
object-fit: cover;
display: block;
}
.ad-slide a:hover {
background: rgba(255,255,255,0.05);
}

.site-footer {
background: var(--bg-1);
color: var(--muted);
padding: 3rem 1rem;
margin-top: 3rem;
font-size: 0.875rem;
border-top: 1px solid hsla(250, 20%, 20%, 0.5);
}
.footer-content {
max-width: 1200px;
margin: 0 auto;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 2rem;
margin-bottom: 2rem;
}
.footer-column h3 {
color: hsl(210, 40%, 98%);
font-size: 1rem;
margin-bottom: 1rem;
}
.footer-column p, .footer-column a {
color: var(--muted);
text-decoration: none;
line-height: 1.6;
}
.footer-column a:hover {
color: var(--accent);
text-decoration: underline;
}
.social-links {
display: flex;
gap: 0.75rem;
margin-top: 1rem;
flex-wrap: wrap;
}
.social-links a {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2.5rem;
height: 2.5rem;
border-radius: 50%;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
transition: all 0.2s;
color: var(--muted);
}
.social-links a:hover {
transform: translateY(-2px);
color: white;
background: var(--accent);
box-shadow: 0 4px 12px rgba(128, 0, 255, 0.2);
}
.social-links svg {
width: 1.1rem;
height: 1.1rem;
}
.footer-bottom {
max-width: 1200px;
margin: 0 auto;
padding-top: 2rem;
border-top: 1px solid hsla(250, 20%, 20%, 0.5);
text-align: center;
font-size: 0.8rem;
}

/* Hero Section */
.hero {
padding: 3rem 1rem;
background: hsla(250, 30%, 10%, 0.3);
backdrop-filter: blur(20px);
border-bottom: 1px solid hsla(250, 20%, 20%, 0.3);
margin-bottom: 2rem;
position: relative;
overflow: hidden;
}

.hero-map-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.2;
}

.hero-map {
width: 100%;
height: 100%;
}

.map-path {
animation: mapPulse 8s infinite ease-in-out;
}

.map-dot {
animation: mapDotPulse 3s infinite ease-in-out;
}

.map-dot:nth-child(1) {
animation-delay: 0s;
}

.map-dot:nth-child(2) {
animation-delay: 0.5s;
}

.map-dot:nth-child(3) {
animation-delay: 1s;
}

.map-dot:nth-child(4) {
animation-delay: 1.5s;
}

.map-dot:nth-child(5) {
animation-delay: 2s;
}

.map-dot:nth-child(6) {
animation-delay: 2.5s;
}

.hero-content {
max-width: 1200px;
margin: 0 auto;
text-align: center;
position: relative;
z-index: 1;
}

.hero-title {
font-size: 2.5rem;
font-weight: 800;
margin-bottom: 1rem;
background: linear-gradient(90deg, var(--accent), var(--accent-2));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}

.hero-subtitle {
font-size: 1.1rem;
color: var(--muted);
margin-bottom: 2rem;
max-width: 600px;
margin-left: auto;
margin-right: auto;
}

.hero-search-container {
max-width: 600px;
margin: 0 auto;
position: relative;
display: flex;
}

.hero-search-input {
flex: 1;
padding: 1rem 1.5rem;
padding-right: 4rem;
border-radius: 50px;
border: 1px solid hsla(250, 20%, 20%, 0.5);
background: hsla(250, 25%, 12%, 0.6);
backdrop-filter: blur(10px);
color: inherit;
font-size: 1rem;
transition: all 0.3s ease;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-search-input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(128, 0, 255, 0.3);
background: hsla(250, 25%, 12%, 0.8);
}

.hero-search-button {
position: absolute;
right: 0.5rem;
top: 50%;
transform: translateY(-50%);
width: 3rem;
height: 3rem;
border-radius: 50%;
background: var(--accent);
color: white;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}

.hero-search-button:hover {
background: var(--accent-2);
transform: translateY(-50%) scale(1.05);
}

.hero-search-button svg {
width: 1.25rem;
height: 1.25rem;
}

/* World Map Animations */
@keyframes mapPulse {
0% {
  stroke-opacity: 0.2;
  transform: scale(1);
}
50% {
  stroke-opacity: 0.4;
  transform: scale(1.02);
}
100% {
  stroke-opacity: 0.2;
  transform: scale(1);
}
}

@keyframes mapDotPulse {
0% {
  r: 3;
  opacity: 0.6;
}
50% {
  r: 5;
  opacity: 1;
}
100% {
  r: 3;
  opacity: 0.6;
}
}

/* Responsive breakpoints */
@media (max-width: 1200px) {
.stations-grid.cols-8 { grid-template-columns: repeat(7, 1fr); }
}

@media (max-width: 1024px) {
.stations-grid.cols-7,
.stations-grid.cols-8 { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 900px) {
.stations-grid.cols-6,
.stations-grid.cols-7,
.stations-grid.cols-8 { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 768px) {
.stations-grid.cols-5,
.stations-grid.cols-6,
.stations-grid.cols-7,
.stations-grid.cols-8 { grid-template-columns: repeat(4, 1fr); }
.volume-control { display: none; }
.header-content { padding: 0.75rem; }
.audio-player-content { padding: 0 0.75rem; }
.live-visitors { display: none; }
}

@media (max-width: 640px) {
.stations-grid.cols-4,
.stations-grid.cols-5,
.stations-grid.cols-6,
.stations-grid.cols-7,
.stations-grid.cols-8 { grid-template-columns: repeat(3, 1fr); }
}

/* MOBILE: FORCE 2 COLUMNS - NON NEGOTIABLE */
@media (max-width: 480px) {
.stations-grid.cols-1,
.stations-grid.cols-2,
.stations-grid.cols-3,
.stations-grid.cols-4,
.stations-grid.cols-5,
.stations-grid.cols-6,
.stations-grid.cols-7,
.stations-grid.cols-8 { 
  grid-template-columns: repeat(2, 1fr) !important; 
}

.column-selector {
  display: none !important;
}
}

@media (max-width: 420px) {
.search-input { min-width: 120px; }
.header-content { flex-direction: column; align-items:stretch; gap:0.5rem; }
.controls-row { justify-content: flex-end; }
}

/* Hero section responsive adjustments */
@media (max-width: 768px) {
.hero {
  padding: 2rem 1rem;
}

.hero-title {
  font-size: 2rem;
}

.hero-subtitle {
  font-size: 1rem;
}

.hero-search-container {
  max-width: 100%;
}
}

@media (max-width: 480px) {
.hero {
  padding: 1.5rem 0.5rem;
}

.hero-title {
  font-size: 1.75rem;
}

.hero-subtitle {
  font-size: 0.9rem;
}

.hero-search-input {
  padding: 0.75rem 1rem;
  padding-right: 3rem;
}

.hero-search-button {
  width: 2.5rem;
  height: 2.5rem;
}
}
