/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background-color: var(--color-skin-base);
  color: var(--color-skin-text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
  padding-bottom: 7rem; /* space for fixed player */
}

::selection {
  background-color: var(--color-skin-accent);
  color: #fff;
}

img { max-width: 100%; display: block; }

button { cursor: pointer; border: none; background: none; font-family: inherit; }

a { color: inherit; text-decoration: none; }

/* ============================================
   LAYOUT
   ============================================ */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Centered max-width container */
.container {
  max-width: 80rem; /* 1280px */
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px)  { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: color-mix(in srgb, var(--color-skin-base) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-skin-border);
  transition: background-color 0.3s, border-color 0.3s;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

/* Brand / Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-logo-icon {
  background-color: var(--color-skin-accent);
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: #fff;
  display: flex;
}

.nav-brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-skin-text);
  letter-spacing: -0.05em;
  text-transform: uppercase;
  line-height: 1.1;
}

.nav-brand-title .accent { color: var(--color-skin-accent); }

.nav-brand-sub {
  font-size: 0.625rem;
  color: var(--color-skin-text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Desktop nav links */
.nav-links {
  display: none;
  gap: 0.25rem;
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
}

/* Nav actions (theme + staff btn) */
.nav-actions {
  display: none;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .nav-actions { display: flex; }
}

/* Mobile nav row */
.navbar-mobile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--color-skin-border);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .navbar-mobile { display: none; }
}

.navbar-mobile-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  margin-right: 1rem;
}

.navbar-mobile-scroll::-webkit-scrollbar { display: none; }

.navbar-mobile-links {
  display: flex;
  gap: 1rem;
  min-width: max-content;
}

/* ============================================
   NAV ITEM
   ============================================ */
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: var(--color-skin-text-muted);
  font-size: 0.75rem;
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--color-skin-text);
  background-color: var(--color-skin-surface);
}

.nav-item--active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: var(--color-skin-accent);
  background-color: color-mix(in srgb, var(--color-skin-accent) 10%, transparent);
  font-weight: 700;
  font-size: 0.75rem;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .nav-item,
  .nav-item--active { font-size: 0.875rem; }
}

/* Staff button */
.btn-staff {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-skin-text-muted);
  border: 1px solid var(--color-skin-border);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  transition: color 0.2s, background-color 0.2s;
}

.btn-staff:hover {
  color: var(--color-skin-text);
  background-color: var(--color-skin-surface);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  flex: 1;
  padding-block: 2rem;
}

/* Fade-in animation on view change */
#app-view {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background-color: var(--color-skin-surface);
  border-top: 1px solid var(--color-skin-border);
  padding-top: 4rem;
  padding-bottom: 2rem;
  transition: background-color 0.3s;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--color-skin-text-muted);
  line-height: 1.6;
  margin-top: 0.75rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social-link {
  display: flex;
  background-color: var(--color-skin-muted);
  padding: 0.5rem;
  border-radius: 9999px;
  color: var(--color-skin-text);
  transition: background-color 0.2s, color 0.2s;
}

.footer-social-link:hover {
  background-color: var(--color-skin-accent);
  color: #fff;
}

.footer-nav-title {
  font-weight: 700;
  color: var(--color-skin-text);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-skin-text-muted);
}

.footer-nav-list button {
  color: inherit;
  transition: color 0.2s;
}

.footer-nav-list button:hover {
  color: var(--color-skin-accent);
}

.footer-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-skin-text-muted);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-contact-item svg {
  color: var(--color-skin-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-newsletter-input {
  width: 100%;
  background-color: var(--color-skin-base);
  border: 1px solid var(--color-skin-border);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--color-skin-text);
  margin-bottom: 0.5rem;
  outline: none;
  transition: border-color 0.2s;
}

.footer-newsletter-input:focus {
  border-color: var(--color-skin-accent);
}

.footer-bottom {
  border-top: 1px solid var(--color-skin-border);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--color-skin-text-muted);
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-skin-text-muted);
}

.footer-legal a:hover { color: var(--color-skin-text); }

/* ============================================
   PLAYER (fixed bottom bar)
   ============================================ */
#player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--color-skin-base) 0%, var(--color-skin-surface) 60%);
  border-top: 1px solid var(--color-skin-border);
  padding: 1rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
  z-index: 50;
  transition: background 0.3s;
}

.player-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .player-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.player-track {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 768px) { .player-track { width: 33%; } }

.player-album {
  width: 3rem;
  height: 3rem;
  border-radius: 0.25rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-skin-accent-secondary) 35%, black) 0%, var(--color-skin-accent) 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.player-album--playing {
  animation: pulse 2s infinite;
}

.player-track-info {
  overflow: hidden;
}

.player-title {
  display: block;
  font-weight: 700;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-skin-text);
}

.player-artist {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-skin-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
}

@media (min-width: 768px) { .player-controls { width: 33%; } }

.player-play-btn {
  width: 3.5rem;
  height: 3.5rem;
  background: transparent;
  color: var(--color-skin-text);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.1s;
}

.player-play-btn:hover { color: var(--color-skin-accent); transform: scale(1.1); }

.player-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.player-status-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-skin-text-muted);
}

.player-status-label--live {
  color: var(--color-skin-accent);
  animation: pulse 2s infinite;
}

.player-demo-note {
  font-size: 0.625rem;
  color: color-mix(in srgb, var(--color-skin-text-muted) 50%, transparent);
}

.player-volume {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  width: 100%;
}

@media (min-width: 768px) { .player-volume { width: 33%; } }

.player-mute-btn {
  color: var(--color-skin-text-muted);
  display: flex;
  transition: color 0.2s;
}

.player-mute-btn:hover { color: var(--color-skin-text); }

.player-volume-range {
  width: 6rem;
  height: 0.25rem;
  border-radius: 9999px;
  appearance: none;
  background-color: var(--color-skin-muted);
  cursor: pointer;
  accent-color: var(--color-skin-accent);
}

@media (min-width: 768px) { .player-volume-range { width: 8rem; } }

/* Equalizer animation */
.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 1.5rem;
  width: 2rem;
}

.eq-bar {
  width: 6px;
  background-color: var(--color-skin-accent);
  border-radius: 2px;
}

.eq-bar--1 { animation: eqBar 0.8s ease-in-out infinite alternate; }
.eq-bar--2 { animation: eqBar 0.6s ease-in-out infinite alternate 0.2s; background-color: var(--color-skin-accent-hover); }
.eq-bar--3 { animation: eqBar 1s ease-in-out infinite alternate 0.1s; background-color: var(--color-skin-warning); }

@keyframes eqBar {
  from { height: 4px; }
  to   { height: 24px; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
