/* ========================================
   WEB RÁDIO SPA - STYLE
   ======================================== */

/* ========================================
   RESET & VARIÁVEIS
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #e11d48;
  --primary-dark: #be123c;
  --primary-lighter: #f43f5e;
  --bg-primary: #000000;
  --bg-secondary: #18181b;
  --bg-card: #1a1a1a;
  --bg-card-hover: #1f1f1f;
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --border: rgba(39, 39, 42, 1);
  --border-light: rgba(39, 39, 42, 0.5);
  --header-height: 70px;
  --player-height: 80px;
  --nav-width: 260px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* ========================================
   HEADER
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
}

.header-container {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  flex-shrink: 0;
}

.logo-img {
  height: 40px;
  width: auto;
}

.search-box {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.search-box:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.search-box:focus-within {
  background: rgba(255, 255, 255, 0.1);
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.9375rem;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-btn {
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.search-btn:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

.search-toggle {
  display: none;
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

.mobile-search-container {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.mobile-search-container.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-search-container .search-box {
  max-width: none;
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--nav-width);
  height: calc(100vh - var(--header-height) - var(--player-height));
  background: rgba(24, 24, 27, 0.95);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-header {
  display: none;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 55px;
  width: auto;
}

.nav-close {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.nav-list {
  list-style: none;
  padding: 1rem 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  color: inherit;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: white;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.2) 0%, rgba(190, 18, 60, 0.2) 100%);
  border-left: none;
}

.nav-icon {
  font-size: 1.25rem;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

.nav-section-title {
  padding: 1rem 1.5rem 0.5rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-overlay {
  display: none;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
  margin-top: var(--header-height);
  margin-left: var(--nav-width);
  margin-bottom: var(--player-height);
  padding: 2rem;
  min-height: calc(100vh - var(--header-height) - var(--player-height));
}

#app-container {
  width: 100%;
}

/* ========================================
   PÁGINAS
   ======================================== */
.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Page containers */
.page-home,
.page-category,
.page-search,
.page-favorites {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.category-header,
.search-header,
.favorites-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-back:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
  color: var(--primary);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  flex: 1;
}

.radio-count {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ========================================
   RADIO GRID
   ======================================== */
.radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.radio-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, #1f1f1f 0%, #2b2b2b 100%);
  z-index: 10;
}

.radio-card:active {
  transform: translateY(-2px) scale(1.01);
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-card.playing::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(135deg, #e11d48, #be123c);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: borderPulse 2s ease-in-out infinite;
  pointer-events: none;
}

.radio-card.playing {
  background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
}

.radio-card.playing:hover {
  transform: translateY(-4px) scale(1.03);
  background: linear-gradient(135deg, #242424 0%, #303030 100%);
  box-shadow: 0 12px 30px rgba(225, 29, 72, 0.3);
  z-index: 10;
}

@keyframes borderPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.radio-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: linear-gradient(to bottom right, rgba(63, 63, 70, 1), rgba(39, 39, 42, 1));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  position: relative;
}

.radio-icon.has-logo {
  background: #ffffff;
  padding: 0.25rem;
}

.radio-card:hover .radio-icon {
  background: linear-gradient(to bottom right, rgba(75, 75, 82, 1), rgba(52, 52, 59, 1));
  transform: scale(1.05);
}

.radio-card:hover .radio-icon.has-logo {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.radio-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fallback-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom right, rgba(63, 63, 70, 1), rgba(39, 39, 42, 1));
  border-radius: 0.5rem;
}

.radio-info {
  flex: 1;
  min-width: 0;
}

.radio-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  min-height: 2.6em;
  white-space: normal;
  transition: color 0.25s ease;
}

.radio-card:hover .radio-name {
  color: #f0f0f0;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.radio-category {
  background: rgba(225, 29, 72, 0.15);
  color: #f87171;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.25s ease;
  display: inline-block;
}

.radio-card:hover .radio-category {
  background: rgba(225, 29, 72, 0.25);
  color: #fca5a5;
}

.btn-favorite {
  padding: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.btn-favorite:hover {
  transform: scale(1.2);
}

.btn-favorite.active {
  animation: heartbeat 0.4s ease;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1.1); }
}

/* Equalizer Animation */
.equalizer {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.eq-bar {
  width: 3px;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  animation: equalizer 0.8s ease-in-out infinite;
}

.eq-bar:nth-child(1) { animation-delay: 0s; }
.eq-bar:nth-child(2) { animation-delay: 0.2s; }
.eq-bar:nth-child(3) { animation-delay: 0.4s; }
.eq-bar:nth-child(4) { animation-delay: 0.6s; }

@keyframes equalizer {
  0%, 100% { height: 3px; }
  50% { height: 100%; }
}

/* ========================================
   CATEGORIES GRID
   ======================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Category Dot - Bolinhas coloridas */
.category-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-link .category-dot {
  width: 0.625rem;
  height: 0.625rem;
}

.category-emoji {
  font-size: 2.5rem;
}

.category-name {
  font-size: 1rem;
  font-weight: 600;
}

.category-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ========================================
   LOAD MORE & END MESSAGE
   ======================================== */
.load-more-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.btn-load-more {
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  border: none;
  border-radius: 0.75rem;
  color: white;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.btn-load-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
}

.end-message {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ========================================
   INFINITE SCROLL SENTINEL
   ======================================== */
.infinite-scroll-sentinel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  min-height: 80px;
}

.infinite-scroll-sentinel .loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.infinite-scroll-sentinel .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(225, 29, 72, 0.1);
  border-top-color: #e11d48;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   NO RESULTS & ERROR STATES
   ======================================== */
.no-results,
.error,
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.no-results svg,
.error svg {
  color: var(--border);
}

.no-results h3,
.error h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
}

.btn-retry {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  border: none;
  border-radius: 0.5rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-retry:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   MINI PLAYER
   ======================================== */
.mini-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-height);
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
  border-top: 1px solid rgba(225, 29, 72, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

.mini-player.active {
  transform: translateY(0);
}

.player-info-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.player-favicon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(63, 63, 70, 1) 0%, rgba(39, 39, 42, 1) 100%);
  box-shadow: 
    0 1px 4px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

.mini-player.active .player-favicon {
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.player-text {
  min-width: 0;
  flex: 1;
}

.player-name {
  font-size: 1.0625rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.player-category {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.btn-play-pause {
  position: relative;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 2px 8px rgba(225, 29, 72, 0.25),
    0 4px 16px rgba(225, 29, 72, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: white;
  overflow: hidden;
}

.btn-play-pause::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 70%
  );
  transform: rotate(0deg);
  transition: transform 0.6s;
}

.btn-play-pause:hover::before {
  transform: rotate(180deg);
}

.btn-play-pause:hover {
  transform: scale(1.05);
  box-shadow: 
    0 3px 12px rgba(225, 29, 72, 0.3),
    0 6px 20px rgba(225, 29, 72, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-play-pause:active {
  transform: scale(0.98);
  transition: all 0.1s;
}

/* Pulse animation quando tocando */
.btn-play-pause.playing {
  animation: playerPulse 2.5s ease-in-out infinite;
}

@keyframes playerPulse {
  0%, 100% {
    box-shadow: 
      0 2px 8px rgba(225, 29, 72, 0.25),
      0 4px 16px rgba(225, 29, 72, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  50% {
    box-shadow: 
      0 2px 10px rgba(225, 29, 72, 0.35),
      0 4px 20px rgba(225, 29, 72, 0.2),
      0 0 0 6px rgba(225, 29, 72, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

.btn-play-pause svg {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.volume-control svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.volume-slider {
  width: 120px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #e11d48 0%, #e11d48 var(--volume, 70%), #3f3f46 var(--volume, 70%), #3f3f46 100%);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast {
  position: fixed;
  bottom: calc(var(--player-height) + 1rem);
  right: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transform: translateX(calc(100% + 2rem));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.toast.show {
  animation: slideIn 0.3s ease-out forwards;
}

.toast.hiding {
  animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

.toast-error {
  border-color: var(--primary);
  background: rgba(225, 29, 72, 0.1);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .main-content {
    margin-left: 0;
    padding: 1.5rem;
  }
  
  .nav-menu {
    top: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: rgba(18, 18, 20, 0.98);
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    z-index: 150;
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
  }
  
  .nav-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 140;
  }
  
  .nav-overlay.active {
    opacity: 1;
    pointer-events: all;
  }
  
  .nav-list {
    padding: 0.5rem 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .volume-control {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Header Mobile */
  .header {
    position: fixed;
  }
  
  .header-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
  }
  
  .menu-toggle {
    display: flex;
    order: 1;
  }
  
  .logo {
    order: 2;
    justify-self: center;
  }
  
  .logo-img {
    height: 40px;
  }
  
  .header-container .search-box {
    display: none;
  }
  
  .search-toggle {
    display: flex;
    order: 3;
  }
  
  .mobile-search-container {
    display: block;
  }
  
  /* Content adjustments */
  .search-box {
    max-width: none;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  .radio-grid {
    grid-template-columns: 1fr;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mini-player {
    padding: 0 1rem;
  }
  
  .player-controls {
    gap: 1rem;
  }
}

/* Desabilitar hover em dispositivos touch */
@media (hover: none) and (pointer: coarse) {
  .radio-card:hover {
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    z-index: auto;
  }
  
  .radio-card:hover .radio-icon {
    background: linear-gradient(to bottom right, rgba(63, 63, 70, 1), rgba(39, 39, 42, 1));
    transform: none;
  }
  
  .radio-card:hover .radio-icon.has-logo {
    background: #ffffff;
    box-shadow: none;
  }
  
  .radio-card:hover .radio-name {
    color: white;
    text-shadow: none;
  }
  
  .radio-card:hover .radio-category {
    background: rgba(225, 29, 72, 0.15);
    color: #f87171;
  }
  
  .radio-card:active {
    transform: scale(0.98);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }
}

@media (max-width: 480px) {
  .btn-back span {
    display: none;
  }
  
  .page-title {
    font-size: 1.25rem;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   LIGHT MODE - Tema Claro
   ======================================== */

/* Cores principais do tema claro */
body.light-mode {
  background-color: #F8F9FB;
  color: #1F2937;
}

/* Header no tema claro */
body.light-mode .header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.light-mode .menu-toggle {
  color: #4B5563;
}

body.light-mode .menu-toggle:hover {
  color: #111827;
}

/* Navigation no tema claro */
body.light-mode .nav-menu {
  background: rgba(255, 255, 255, 0.98);
  border-right: 1px solid #E5E7EB;
}

body.light-mode .nav-header {
  border-bottom: 1px solid #E5E7EB;
}

body.light-mode .nav-link {
  color: #6B7280;
}

body.light-mode .nav-link:hover {
  background: #F3F4F6;
  color: #1F2937;
}

body.light-mode .nav-link.active {
  background: rgba(225, 29, 72, 0.1);
  color: #E11D48;
}

body.light-mode .nav-section-title {
  color: #9CA3AF;
}

body.light-mode .nav-divider {
  background: #E5E7EB;
}

/* Search bar no tema claro */
body.light-mode .search-input {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  color: #1F2937;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.light-mode .search-input:hover {
  border-color: #D1D5DB;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

body.light-mode .search-input:focus {
  background: #FFFFFF;
  border-color: #E11D48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
}

body.light-mode .search-input::placeholder {
  color: #9CA3AF;
}

body.light-mode .search-btn svg {
  stroke: #4B5563;
}

body.light-mode .search-btn:hover svg {
  stroke: #E11D48;
}

/* Section titles no tema claro */
body.light-mode .section-title {
  color: #1F2937;
}

body.light-mode .page-title {
  color: #1F2937;
}

/* Radio cards no tema claro */
body.light-mode .radio-card {
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #E5E7EB;
}

body.light-mode .radio-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: #E11D48;
  transform: translateY(-2px);
}

body.light-mode .radio-card.playing {
  border-color: #E11D48;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.15);
}

body.light-mode .radio-card.playing::before {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.1) 0%, rgba(225, 29, 72, 0.05) 100%);
}

body.light-mode .radio-name {
  color: #1F2937;
}

body.light-mode .radio-card:hover .radio-name {
  color: #E11D48;
}

body.light-mode .category-badge {
  background: rgba(225, 29, 72, 0.1);
  color: #E11D48;
}

body.light-mode .radio-count {
  color: #6B7280;
}

/* Category header no tema claro */
body.light-mode .category-header {
  border-bottom: 1px solid #E5E7EB;
}

body.light-mode .btn-back {
  color: #6B7280;
  background: #F3F4F6;
}

body.light-mode .btn-back:hover {
  background: #E5E7EB;
  color: #1F2937;
}

/* Mini player no tema claro */
body.light-mode .mini-player {
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #E5E7EB;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

body.light-mode .mini-player.active {
  border-top: 2px solid #E11D48;
}

body.light-mode .player-name {
  color: #1F2937;
}

body.light-mode .player-category {
  color: #6B7280;
}

body.light-mode .volume-control {
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
}

body.light-mode .volume-slider::-webkit-slider-thumb {
  background: #E11D48;
  box-shadow: 0 0 4px rgba(225, 29, 72, 0.3);
}

body.light-mode .volume-slider::-moz-range-thumb {
  background: #E11D48;
  box-shadow: 0 0 4px rgba(225, 29, 72, 0.3);
}

/* Messages no tema claro */
body.light-mode .no-results,
body.light-mode .error,
body.light-mode .loading {
  color: #6B7280;
}

body.light-mode .end-message {
  color: #6B7280;
}

/* Toast no tema claro */
body.light-mode .toast {
  background: #FFFFFF;
  color: #1F2937;
  border: 1px solid #E5E7EB;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.light-mode .toast-info {
  border-left: 3px solid #E11D48;
}

/* ========================================
   LIVE SEARCH MODE - Busca em Tempo Real
   ======================================== */

/* Quando modo de busca est� ativo */
body.search-mode-active .header,
body.search-mode-active .nav-menu,
body.search-mode-active .mini-player {
  display: none;
}

body.search-mode-active .main-content {
  padding: 0;
  margin: 0;
  height: 100vh;
}

/* Container da busca */
.live-search-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

/* Header da busca */
.live-search-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.btn-back-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-back-search:hover {
  background: var(--hover-bg);
  color: var(--primary);
}

/* Box de busca */
.live-search-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 2rem;
  transition: all 0.3s;
}

.live-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.live-search-box .search-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.live-search-box:focus-within .search-icon {
  color: var(--primary);
}

.live-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.live-search-input::placeholder {
  color: var(--text-secondary);
  font-weight: 400;
}

.btn-clear-search {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-clear-search:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

/* Resultados da busca */
.live-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.live-search-results .radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  opacity: 1;
  transition: none;
  contain: layout style;
}

.live-search-results .radio-card {
  min-width: 0; /* Fix para flex items dentro do grid */
  width: 100%;
}

.search-results-header {
  margin-bottom: 1.5rem;
}

.results-count {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.results-count strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Sugest�es */
.search-suggestions {
  padding: 1rem 0;
}

.suggestion-title {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.suggestion-chip {
  padding: 0.625rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 2rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-1px);
}

/* Light mode adjustments */
body.light-mode .live-search-container {
  background: #F8F9FB;
}

body.light-mode .live-search-header {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #E5E7EB;
}

body.light-mode .live-search-box {
  background: #FFFFFF;
  border-color: #E5E7EB;
}

body.light-mode .live-search-box:focus-within {
  border-color: #E11D48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

body.light-mode .live-search-input {
  color: #1F2937;
  font-weight: 500;
}

body.light-mode .live-search-input::placeholder {
  color: #9CA3AF;
  font-weight: 400;
}

body.light-mode .btn-back-search {
  color: #4B5563;
}

body.light-mode .btn-back-search:hover {
  background: #F3F4F6;
  color: #E11D48;
}

body.light-mode .btn-clear-search {
  color: #6B7280;
}

body.light-mode .btn-clear-search:hover {
  background: #F3F4F6;
  color: #1F2937;
}

body.light-mode .search-suggestions {
  background: transparent;
}

body.light-mode .suggestion-title {
  color: #6B7280;
}

body.light-mode .suggestion-chip {
  background: #FFFFFF;
  border: 1.5px solid #E5E7EB;
  color: #1F2937;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

body.light-mode .suggestion-chip:hover {
  background: #E11D48;
  border-color: #E11D48;
  color: white;
  box-shadow: 0 2px 4px rgba(225, 29, 72, 0.2);
}

body.light-mode .results-count {
  color: #6B7280;
}

body.light-mode .results-count strong {
  color: #1F2937;
}

/* Responsive */
@media (max-width: 768px) {
  .live-search-header {
    padding: 0.75rem;
  }
  
  .live-search-results {
    padding: 1rem;
  }
  
  .live-search-results .radio-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .live-search-box {
    padding: 0.625rem 0.875rem;
  }
}



