/* ==========================================================================
   REGGAE JAH WEB RÁDIO - STYLE.CSS
   Theme: Sleek Interface Reggae Roots Edition
   Primary Colors: Green (#009B4D), Yellow (#FFD100), Red (#EF3340)
   ========================================================================== */

/* CSS Variables for Dark Theme */
:root, [data-theme="dark"], [data-theme="light"] {
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  --color-green: #009b4d;
  --color-yellow: #ffd100;
  --color-red: #ef3340;
  --shadow-glow: rgba(0, 155, 77, 0.25);
  --player-height: 88px;
  --mobile-player-height: 60px;
  --mobile-nav-height: 58px;
  --header-height: 60px;
  --mobile-header-height: 52px;
}

/* Floating Background Particles & Musical Notes Canvas */
.particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

/* Base Reset & Fonts */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-green);
}

/* Reggae Gradient Line */
.reggae-border-line {
  height: 4px;
  width: 100%;
  background: linear-gradient(to right, var(--color-green) 33%, var(--color-yellow) 33% 66%, var(--color-red) 66%);
}

/* Glassmorphism Cards */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.glass-panel {
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
}

[data-theme="light"] .glass-panel {
  background: rgba(255, 255, 255, 0.85);
}

/* Vinyl Spin Animation */
.vinyl-container {
  position: relative;
  width: min(340px, 75vw);
  height: min(340px, 75vw);
  border-radius: 50%;
  padding: 8px;
  background: radial-gradient(circle, #2a2a2a 20%, #111111 70%, #050505 100%);
  border: 5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px var(--shadow-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.4s ease, width 0.3s ease, height 0.3s ease;
}

@media (max-width: 767.98px) {
  .vinyl-container {
    width: min(220px, 58vw);
    height: min(220px, 58vw);
    border-width: 4px;
  }
}

.vinyl-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: opacity 0.5s ease;
}

.vinyl-spinning img {
  animation: spinVinyl 16s linear infinite;
}

.vinyl-paused img {
  animation-play-state: paused;
}

@keyframes spinVinyl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Equalizer Bars Animation */
.equalizer-box {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
}

.equalizer-bar {
  width: 4px;
  background: var(--color-green);
  border-radius: 2px;
  height: 8px;
  transition: height 0.2s ease;
}

.equalizer-active .equalizer-bar {
  animation: bounceBar 1.2s infinite ease-in-out alternate;
}

.equalizer-active .equalizer-bar:nth-child(1) { animation-delay: 0.1s; background: var(--color-green); }
.equalizer-active .equalizer-bar:nth-child(2) { animation-delay: 0.3s; background: var(--color-yellow); }
.equalizer-active .equalizer-bar:nth-child(3) { animation-delay: 0.2s; background: var(--color-red); }
.equalizer-active .equalizer-bar:nth-child(4) { animation-delay: 0.5s; background: var(--color-yellow); }
.equalizer-active .equalizer-bar:nth-child(5) { animation-delay: 0.4s; background: var(--color-green); }

@keyframes bounceBar {
  0% { height: 6px; }
  50% { height: 28px; }
  100% { height: 12px; }
}

/* Background Blur Dynamic Layer */
.blur-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(60px) brightness(0.25);
  opacity: 0.35;
  transform: scale(1.15);
  z-index: 0;
  pointer-events: none;
  transition: background-image 0.8s ease-in-out;
}

[data-theme="light"] .blur-bg {
  filter: blur(60px) brightness(0.8);
  opacity: 0.25;
}

/* Main App Wrapper Layout */
#appWrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

.app-header {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 30;
  transition: height 0.2s ease;
}

@media (max-width: 991.98px) {
  .app-header {
    height: var(--mobile-header-height);
    padding: 0 0.85rem;
  }
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.app-sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
  z-index: 20;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    display: none;
  }
}

.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  z-index: 10;
  padding-bottom: calc(var(--player-height) + 20px);
}

@media (max-width: 991.98px) {
  .app-content {
    padding: 1rem 0.85rem;
    padding-bottom: calc(var(--mobile-player-height) + var(--mobile-nav-height) + 24px);
  }
}

/* Bottom Player Fixed Bar - Sleek Desktop & Floating Mobile Mini-Player */
.bottom-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-height);
  background: rgba(14, 16, 18, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 1.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #ffffff;
}

.bottom-player .track-title {
  color: #ffffff !important;
  font-weight: 700;
}

.bottom-player .track-artist {
  color: rgba(255, 255, 255, 0.8) !important;
}

.bottom-player .btn-link,
.bottom-player .btn-fav-toggle,
.bottom-player .btn-volume-popover-toggle,
.bottom-player .btn-mute-toggle {
  color: #ffffff !important;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.bottom-player .btn-link:hover,
.bottom-player .btn-fav-toggle:hover,
.bottom-player .btn-volume-popover-toggle:hover,
.bottom-player .btn-mute-toggle:hover {
  opacity: 1;
  color: var(--color-yellow) !important;
  transform: scale(1.15);
}

.bottom-player .volume-slider {
  background: rgba(255, 255, 255, 0.3) !important;
  accent-color: var(--color-yellow);
}

[data-theme="light"] .bottom-player {
  background: rgba(255, 255, 255, 0.96);
  color: #1a1a1a;
  border-top-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .bottom-player .track-title {
  color: #111111 !important;
}

[data-theme="light"] .bottom-player .track-artist {
  color: rgba(0, 0, 0, 0.65) !important;
}

[data-theme="light"] .bottom-player .btn-link,
[data-theme="light"] .bottom-player .btn-fav-toggle,
[data-theme="light"] .bottom-player .btn-volume-popover-toggle,
[data-theme="light"] .bottom-player .btn-mute-toggle {
  color: #222222 !important;
}

/* Mobile Floating Mini-Player Bar (Native App Style) */
@media (max-width: 991.98px) {
  .bottom-player {
    bottom: calc(var(--mobile-nav-height) + 6px);
    left: 8px;
    right: 8px;
    height: var(--mobile-player-height);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 155, 77, 0.2);
    padding: 0 0.75rem;
  }

  [data-theme="light"] .bottom-player {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  }

  .bottom-player .reggae-border-line {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }
}

/* Mobile Bottom Navigation Bar */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-height);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: none;
  align-items: center;
  justify-content: space-around;
  z-index: 60;
  padding: 0 0.25rem;
}

@media (max-width: 991.98px) {
  .mobile-nav {
    display: flex;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 14px;
  transition: all 0.2s ease;
  flex: 1;
  text-align: center;
}

.mobile-nav-item i {
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
  color: var(--color-green);
  background: rgba(0, 155, 77, 0.12);
}

.mobile-nav-item.active i {
  transform: translateY(-1px);
}

/* Sidebar Nav Item */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
}

.sidebar-link.active,
.sidebar-link:hover {
  color: var(--color-green);
  background: rgba(0, 155, 77, 0.12);
}

/* Live Badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(239, 51, 64, 0.18);
  color: var(--color-red);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  border: 1px solid rgba(239, 51, 64, 0.3);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-red);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 51, 64, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(239, 51, 64, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 51, 64, 0); }
}

/* Splash Screen Overlay */
#splashScreen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splashScreen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Toast Alerts Container */
#toastContainer {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-msg {
  pointer-events: auto;
  background: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--color-green);
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Skeleton Loading State */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Buttons and Controls */
.btn-play-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-green), #007a3d);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px var(--shadow-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.btn-play-lg:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(0, 155, 77, 0.4);
}

.btn-play-lg:active {
  transform: scale(0.96);
}

.btn-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-circle:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--color-green);
}

/* Custom Volume Slider */
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-yellow);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Utilities */
.text-reggae-green { color: var(--color-green) !important; }
.text-reggae-yellow { color: var(--color-yellow) !important; }
.text-reggae-red { color: var(--color-red) !important; }

.bg-reggae-green { background-color: var(--color-green) !important; }
.bg-reggae-yellow { background-color: var(--color-yellow) !important; }
.bg-reggae-red { background-color: var(--color-red) !important; }

.pulse-red-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-red);
  box-shadow: 0 0 0 0 rgba(239, 51, 64, 0.7);
  animation: pulseRed 1.8s infinite;
}

@keyframes pulseRed {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 51, 64, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(239, 51, 64, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 51, 64, 0);
  }
}

/* Volume Popover & Mobile Volume Controls */
.mobile-volume-popover {
  width: 200px;
  position: absolute;
  bottom: 100%;
  right: 10px;
  margin-bottom: 12px;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px var(--shadow-glow);
  border: 1px solid var(--border-color);
  animation: popoverFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.volume-slider {
  accent-color: var(--color-green);
  cursor: pointer;
  height: 6px;
  border-radius: 3px;
}

.volume-preset-btn {
  padding: 4px 8px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  border-radius: 6px;
}

/* PWA Install Modal Styles */
.glass-modal {
  background: rgba(15, 15, 15, 0.96) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 155, 77, 0.15) !important;
}

.btn-reggae-install {
  background: linear-gradient(135deg, #009b4d 0%, #ffd100 100%) !important;
  color: #050505 !important;
  border: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-reggae-install:hover, .btn-reggae-install:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 155, 77, 0.4) !important;
  background: linear-gradient(135deg, #00b359 0%, #ffe033 100%) !important;
  color: #000 !important;
}

.text-white-90 {
  color: rgba(255, 255, 255, 0.92);
}

/* Mobile Polish Media Queries */
@media (max-width: 575.98px) {
  #toastContainer {
    top: 60px;
    right: 12px;
    left: 12px;
  }

  .toast-msg {
    width: 100%;
    font-size: 0.82rem;
    padding: 10px 14px;
  }

  .glass {
    border-radius: 1rem;
    padding: 1rem !important;
  }

  .btn-circle {
    width: 38px;
    height: 38px;
  }

  .btn-play-lg {
    width: 56px;
    height: 56px;
  }

  .app-header {
    padding: 0 0.75rem;
  }

  .app-header img {
    height: 32px;
  }
}

