/* ===== RESET E ESTILOS GLOBAIS ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #070b14;
  --bg-secondary: #0b1020;
  --bg-card: linear-gradient(180deg, #111936, #0b1020);
  --accent-blue: #3b82f6;
  --accent-purple: #9b5cff;
  --text-primary: #fff;
  --text-secondary: #cbd5ff;
  --text-muted: #a0b0d0;
  --border-light: rgba(255,255,255,0.08);
  --border-hover: rgba(59,130,246,0.4);
  --shadow-heavy: 0 20px 50px rgba(0,0,0,0.5);
  --transition-default: 0.25s ease;
}

body {
  font-family: 'Inter', system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  padding-bottom: 80px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ===== HEADER FIXO ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: linear-gradient(180deg, rgba(12,18,40,0.95), rgba(10,14,30,0.9));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  z-index: 999;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5b7cff, var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 8px 24px rgba(91,124,255,0.35);
}

.logo-text {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, #fff, #a5b4ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.category-btn {
  background: #121a2e;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition-default);
}
.category-btn:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px var(--border-hover);
}

.login-btn {
  background: linear-gradient(90deg, var(--accent-blue), #2563eb);
  border: none;
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.login-btn:hover {
  opacity: 0.9;
}

.install-btn {
  background: #22c55e;
  border: none;
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  white-space: nowrap;
  display: none;
}
.install-btn:hover {
  background: #16a34a;
}
.install-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Dropdown de categorias */
.dropdown {
  position: absolute;
  top: 78px;
  right: 120px;
  background: #0f1629;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 10px;
  display: none;
  min-width: 180px;
  box-shadow: var(--shadow-heavy);
}
.dropdown button {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 10px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.dropdown button:hover {
  background: #1b2440;
}

/* ===== HERO ===== */
.hero {
  padding-top: 130px;
  padding-bottom: 80px;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, #1b2a55 0%, #0b1020 60%, #070b14 100%);
  padding-left: 20px;
  padding-right: 20px;
}
.hero-logo {
  width: 90px;
  height: 90px;
  margin: 0 auto 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #5b7cff, var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 32px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  margin-bottom: 14px;
}
.hero h1 span {
  background: linear-gradient(90deg, #6ee7ff, #4f8cff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  max-width: 720px;
  margin: 0 auto 32px;
  font-size: 18px;
  color: var(--text-secondary);
}
.hero-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent-blue), #2563eb);
  border: none;
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== GRADE DE RÁDIOS ===== */
.results {
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}
.radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.radio-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 18px;
  cursor: pointer;
  transition: var(--transition-default);
  overflow: hidden;
}
.radio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(79,140,255,0.25), transparent 60%);
  opacity: 0;
  transition: var(--transition-default);
}
.radio-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-heavy);
}
.radio-card:hover::before {
  opacity: 1;
}
.radio-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
}
.radio-logo {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: #0b1228;
  object-fit: cover;
  border: 1px solid var(--border-light);
}
.radio-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  max-width: 120px;
}
.radio-meta {
  font-size: 12px;
  color: #9fb0ff;
  margin-top: 4px;
}
.fav-icon {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 18px;
  cursor: pointer;
  color: #ff4d4d;
  background: rgba(0,0,0,0.3);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}
.fav-icon:hover {
  transform: scale(1.15);
  background: rgba(0,0,0,0.6);
}
.fav-icon:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}
.radio-play {
  margin-top: 14px;
  width: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border: none;
  color: var(--text-primary);
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}
.radio-play:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ===== PLAYER FIXO ===== */
.player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 999;
  gap: 10px;
}
#nowPlaying {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
}
.player audio {
  max-width: 55%;
  height: 40px;
}

/* ===== SEÇÃO DE RECURSOS ===== */
.features {
  max-width: 1200px;
  margin: 80px auto 60px;
  padding: 0 20px;
}
.features-header {
  text-align: center;
  margin-bottom: 60px;
}
.features-header h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #5b7cff;
  font-weight: 600;
  margin-bottom: 12px;
}
.features-header h3 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  background: linear-gradient(90deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}
.features-header p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-blue);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.feature-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #1b2a55, #0f1a30);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 32px;
  color: #5b7cff;
  border: 1px solid rgba(91,124,255,0.3);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 48px 20px 32px;
  margin-top: 20px;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-logo .brand-logo {
  width: 48px;
  height: 48px;
  font-size: 22px;
}
.footer-logo .logo-text {
  font-size: 22px;
}
.footer-desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
  max-width: 300px;
}
.footer h3 {
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 12px;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  font-size: 15px;
  cursor: pointer;
}
.footer-links a:hover {
  color: var(--accent-blue);
}
.social-icons {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}
.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #121a2e;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 20px;
  transition: all 0.2s;
  border: 1px solid var(--border-light);
}
.social-icons a:hover {
  background: #1f2a48;
  border-color: var(--accent-blue);
  transform: translateY(-3px);
}
.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: #7f8bb3;
  font-size: 14px;
}
.footer-bottom .heart {
  color: #ff4d4d;
}

/* ===== MODAIS ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}
.modal-content {
  background: #0f1629;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}
.modal-content h2 {
  margin-bottom: 16px;
  font-size: 24px;
}
.modal-content h3 {
  margin: 20px 0 10px;
  font-size: 18px;
  color: #a5b4ff;
}
.modal-content p {
  margin-bottom: 12px;
  line-height: 1.6;
  color: #ddd;
}
.modal-content ul, .modal-content ol {
  margin-left: 20px;
  margin-bottom: 16px;
  color: #ddd;
}
.modal-content li {
  margin-bottom: 6px;
}
.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: color 0.2s;
}
.close-modal:hover {
  color: #ff4d4d;
}
.login-modal .modal-content {
  max-width: 400px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}
.login-form input {
  background: #1b2440;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 14px 16px;
  color: #fff;
  font-size: 16px;
  outline: none;
}
.login-form input:focus {
  border-color: var(--accent-blue);
}
.login-form button {
  background: linear-gradient(90deg, var(--accent-blue), #2563eb);
  border: none;
  color: #fff;
  padding: 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
}
.btn-register {
  background: transparent;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
}
.btn-register:hover {
  background: rgba(59,130,246,0.1);
}
.login-message {
  text-align: center;
  font-size: 14px;
}
.login-message.error {
  color: #ef4444;
  background: rgba(239,68,68,0.1);
  padding: 8px;
  border-radius: 4px;
}
.login-message.success {
  color: #10b981;
  background: rgba(16,185,129,0.1);
  padding: 8px;
  border-radius: 4px;
}
.login-link {
  text-align: center;
  margin-top: 15px;
}
.login-link a {
  color: var(--accent-blue);
  cursor: pointer;
  text-decoration: underline;
}

/* ===== BUSCA MOBILE ===== */
.header-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 4px;
  backdrop-filter: blur(6px);
}
.header-search input {
  background: transparent;
  border: none;
  outline: 0;
  color: #fff;
  padding: 8px 10px;
  width: 160px;
  font-size: 13px;
}
.header-search input::placeholder {
  color: #9aa4d6;
}
#headerSearchBtn {
  border: none;
  background: linear-gradient(90deg, var(--accent-blue), #2563eb);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.menu-mobile {
  position: relative;
}
.menu-btn {
  background: transparent;
  border: none;
  font-size: 26px;
  color: #fff;
  cursor: pointer;
  padding: 6px 10px;
}
.menu-dropdown {
  position: absolute;
  right: 0;
  top: 45px;
  background: #111;
  border-radius: 12px;
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 8px;
  min-width: 140px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  z-index: 999;
}
.menu-dropdown.show {
  display: flex;
}
.menu-dropdown button {
  background: #1c1c1c;
  border: none;
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

/* ===== NOTIFICAÇÕES ===== */
.notification {
  position: fixed;
  top: 80px;
  right: 20px;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 10001;
  animation: slideIn 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.notification.success { background: #10b981; }
.notification.error { background: #ef4444; }
.notification.info { background: var(--accent-blue); }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== SKELETONS ===== */
.skeleton-card {
  background: linear-gradient(180deg, #111936, #0b1020);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 18px;
  height: 170px;
  position: relative;
  overflow: hidden;
}
.skeleton-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}
.skeleton-logo {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: #1b2440;
  margin-bottom: 12px;
}
.skeleton-line {
  height: 16px;
  background: #1b2440;
  border-radius: 8px;
  margin-bottom: 8px;
}
.skeleton-line.short { width: 70%; }
.skeleton-line.medium { width: 85%; }
.skeleton-button {
  height: 36px;
  background: #1b2440;
  border-radius: 10px;
  margin-top: 12px;
}

/* ===== MOBILE SEARCH CONTAINER ===== */
.mobile-search-container {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 998;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.mobile-search-container.show { display: block; }
.mobile-search-wrapper {
  display: flex;
  gap: 8px;
  background: #1b2440;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 4px;
}
.mobile-search-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  padding: 12px 16px;
  font-size: 16px;
}
.mobile-search-wrapper button {
  background: linear-gradient(90deg, var(--accent-blue), #2563eb);
  border: none;
  color: #fff;
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
  .top-actions .category-btn,
  .top-actions .login-btn {
    display: none;
  }
  .header-search { display: none; }
  .menu-mobile { display: block; }
  .footer-container { grid-template-columns: 1fr; }
}
@media (min-width: 769px) {
  .menu-mobile { display: none; }
  .mobile-search-container { display: none !important; }
}
@media (max-width: 640px) {
  header { height: 64px; padding: 0 16px; }
  .logo-text { font-size: 18px; }
  .brand-logo { width: 38px; height: 38px; font-size: 16px; }
  .dropdown { right: 16px; top: 70px; }
  .hero { padding-top: 120px; }
  .radio-grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); }
}