/**
 * Studio X — Design System & Application Styling
 * Brand Colors: Oxford Blue (#002147), Hooker's Green (#49796B)
 */

:root {
  /* Brand Identity Tokens */
  --sx-oxford-blue: #002147;
  --sx-oxford-blue-dark: #001630;
  --sx-oxford-blue-light: #0d3568;
  --sx-hookers-green: #49796B;
  --sx-hookers-green-dark: #375d52;
  --sx-hookers-green-light: #629889;
  --sx-hookers-green-glow: rgba(73, 121, 107, 0.35);

  /* Neutrals */
  --sx-white: #FFFFFF;
  --sx-bg-light: #F5F7FA;
  --sx-bg-card: #FFFFFF;
  --sx-bg-dark: #081525;
  --sx-bg-dark-card: #0e2036;
  --sx-bg-dark-elevated: #152b47;
  --sx-text-main: #202938;
  --sx-text-muted: #667085;
  --sx-text-light: #F5F7FA;
  --sx-text-light-muted: #94a3b8;
  --sx-border: #D9E1E8;
  --sx-border-dark: #1b3350;

  /* Status Colors */
  --sx-success: #10B981;
  --sx-warning: #F59E0B;
  --sx-danger: #EF4444;
  --sx-info: #0284C7;

  /* Radii & Shadows */
  --sx-radius-sm: 6px;
  --sx-radius-md: 10px;
  --sx-radius-lg: 16px;
  --sx-radius-xl: 24px;
  --sx-radius-full: 9999px;

  --sx-shadow-sm: 0 1px 3px rgba(0, 33, 71, 0.08);
  --sx-shadow-md: 0 4px 12px rgba(0, 33, 71, 0.1);
  --sx-shadow-lg: 0 12px 28px rgba(0, 33, 71, 0.14);
  --sx-shadow-player: 0 -4px 20px rgba(0, 15, 35, 0.4);

  /* Transitions */
  --sx-transition-fast: 0.15s ease-in-out;
  --sx-transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Typography */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--sx-text-main);
  background-color: var(--sx-bg-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 96px; /* Space for sticky global audio player */
}

a {
  color: var(--sx-hookers-green);
  text-decoration: none;
  transition: color var(--sx-transition-fast);
}
a:hover {
  color: var(--sx-hookers-green-dark);
}

/* Navbar */
.sx-navbar {
  background-color: var(--sx-oxford-blue);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  padding: 0.75rem 1rem;
}
.sx-navbar .navbar-brand img {
  height: 40px;
  width: auto;
}
.sx-navbar .nav-link {
  color: #d1dced;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--sx-radius-sm);
  transition: all var(--sx-transition-fast);
}
.sx-navbar .nav-link:hover,
.sx-navbar .nav-link.active {
  color: var(--sx-white);
  background-color: rgba(73, 121, 107, 0.2);
}
.sx-navbar .nav-link.active {
  border-bottom: 2px solid var(--sx-hookers-green);
}

/* Hero Section */
.sx-hero {
  background: radial-gradient(circle at 80% 20%, #0d2e54 0%, var(--sx-oxford-blue) 45%, var(--sx-bg-dark) 100%);
  color: var(--sx-white);
  padding: 4.5rem 1rem 3.5rem;
  position: relative;
  overflow: hidden;
}
.sx-hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(73, 121, 107, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.sx-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.sx-hero-accent {
  color: var(--sx-hookers-green-light);
}
.sx-hero-subtitle {
  color: #cad8e8;
  font-size: 1.15rem;
  max-width: 580px;
}

/* Buttons */
.btn-sx-primary {
  background-color: var(--sx-hookers-green);
  border-color: var(--sx-hookers-green);
  color: var(--sx-white);
  font-weight: 600;
  padding: 0.55rem 1.35rem;
  border-radius: var(--sx-radius-md);
  box-shadow: 0 2px 6px var(--sx-hookers-green-glow);
  transition: all var(--sx-transition-fast);
}
.btn-sx-primary:hover,
.btn-sx-primary:focus {
  background-color: var(--sx-hookers-green-dark);
  border-color: var(--sx-hookers-green-dark);
  color: var(--sx-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--sx-hookers-green-glow);
}
.btn-sx-outline {
  border: 1.5px solid var(--sx-hookers-green);
  color: var(--sx-hookers-green);
  background: transparent;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: var(--sx-radius-md);
  transition: all var(--sx-transition-fast);
}
.btn-sx-outline:hover {
  background: var(--sx-hookers-green);
  color: var(--sx-white);
}
.btn-sx-dark {
  background-color: var(--sx-oxford-blue);
  color: var(--sx-white);
  border: none;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: var(--sx-radius-md);
}
.btn-sx-dark:hover {
  background-color: var(--sx-oxford-blue-light);
  color: var(--sx-white);
}

/* Badges & Tags */
.sx-badge-genre {
  background-color: rgba(73, 121, 107, 0.12);
  color: var(--sx-hookers-green);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3em 0.7em;
  border-radius: var(--sx-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid rgba(73, 121, 107, 0.25);
}
.sx-badge-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25em 0.6em;
  border-radius: var(--sx-radius-sm);
}

/* Cards & Grid */
.sx-card {
  background-color: var(--sx-bg-card);
  border: 1px solid var(--sx-border);
  border-radius: var(--sx-radius-lg);
  box-shadow: var(--sx-shadow-sm);
  transition: transform var(--sx-transition-normal), box-shadow var(--sx-transition-normal);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.sx-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sx-shadow-md);
}

/* Track Card Spec */
.sx-track-card .artwork-container {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--sx-bg-dark);
}
.sx-track-card .artwork-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.sx-track-card:hover .artwork-img {
  transform: scale(1.05);
}
.sx-track-card .overlay-play {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 33, 71, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--sx-transition-fast);
}
.sx-track-card:hover .overlay-play,
.sx-track-card.is-active .overlay-play {
  opacity: 1;
}
.play-btn-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--sx-hookers-green);
  color: var(--sx-white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.play-btn-circle:hover {
  transform: scale(1.1);
  background-color: var(--sx-hookers-green-light);
}

.sx-track-card .track-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sx-track-card .track-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sx-track-card .track-artist {
  color: var(--sx-text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sx-track-card .track-stats {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid var(--sx-border);
  font-size: 0.8rem;
  color: var(--sx-text-muted);
}

/* Like Button */
.btn-like {
  background: none;
  border: none;
  color: var(--sx-text-muted);
  font-size: 0.85rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--sx-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: color var(--sx-transition-fast), transform var(--sx-transition-fast);
}
.btn-like:hover {
  color: #e11d48;
  transform: scale(1.05);
}
.btn-like.liked {
  color: #e11d48;
  font-weight: 700;
}
.btn-like.liked svg {
  fill: #e11d48;
}

/* Fixed Global Audio Player */
.sx-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 84px;
  background-color: var(--sx-bg-dark);
  border-top: 1px solid var(--sx-border-dark);
  box-shadow: var(--sx-shadow-player);
  z-index: 1040;
  color: var(--sx-white);
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sx-player-bar .player-track-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 25%;
  min-width: 180px;
}
.sx-player-bar .player-cover {
  width: 52px;
  height: 52px;
  border-radius: var(--sx-radius-sm);
  object-fit: cover;
  background-color: #1a2f4a;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.sx-player-bar .player-meta {
  overflow: hidden;
}
.sx-player-bar .player-title {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #FFFFFF;
}
.sx-player-bar .player-artist {
  font-size: 0.775rem;
  color: var(--sx-text-light-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sx-player-controls-center {
  flex: 1;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.player-buttons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.btn-player-action {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  transition: color var(--sx-transition-fast);
}
.btn-player-action:hover {
  color: #FFFFFF;
}
.btn-player-main {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--sx-hookers-green);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform var(--sx-transition-fast), background-color var(--sx-transition-fast);
}
.btn-player-main:hover {
  background-color: var(--sx-hookers-green-light);
  transform: scale(1.06);
}

.player-progress-bar-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.time-stamp {
  font-size: 0.725rem;
  color: var(--sx-text-light-muted);
  min-width: 36px;
  font-variant-numeric: tabular-nums;
}
.sx-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: #1b3350;
  outline: none;
  cursor: pointer;
}
.sx-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--sx-hookers-green);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(73, 121, 107, 0.7);
  transition: transform 0.15s ease;
}
.sx-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.sx-player-volume-wrap {
  width: 20%;
  min-width: 130px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}
.volume-slider {
  max-width: 90px;
}

/* Forms & Inputs */
.sx-form-card {
  background-color: #FFFFFF;
  border: 1px solid var(--sx-border);
  border-radius: var(--sx-radius-lg);
  padding: 2.25rem;
  box-shadow: var(--sx-shadow-md);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--sx-hookers-green);
  box-shadow: 0 0 0 0.25rem var(--sx-hookers-green-glow);
}
.form-label {
  font-weight: 600;
  color: var(--sx-oxford-blue);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

/* Lyrics Section Presentation */
.lyrics-section-card {
  background-color: #FFFFFF;
  border-radius: var(--sx-radius-lg);
  border: 1px solid var(--sx-border);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--sx-shadow-sm);
}
.lyrics-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sx-hookers-green);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.lyrics-text-content {
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--sx-text-main);
  white-space: pre-wrap;
}

/* Lyrics Reader Presentation with optional background */
.lyrics-view-wrapper {
  position: relative;
  background-color: var(--sx-bg-dark);
  border-radius: var(--sx-radius-lg);
  overflow: hidden;
  color: #FFFFFF;
  box-shadow: var(--sx-shadow-lg);
}
.lyrics-bg-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  filter: blur(8px) brightness(0.25);
  transform: scale(1.05);
}
.lyrics-content-container {
  position: relative;
  z-index: 2;
  padding: 3rem 2rem;
  max-width: 760px;
  margin: 0 auto;
}

/* Admin / Studio Tables */
.sx-table-card {
  background: #FFFFFF;
  border: 1px solid var(--sx-border);
  border-radius: var(--sx-radius-lg);
  box-shadow: var(--sx-shadow-sm);
  overflow: hidden;
}
.sx-table thead th {
  background-color: #f8fafc;
  color: var(--sx-oxford-blue);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--sx-border);
  padding: 0.85rem 1rem;
}
.sx-table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--sx-border);
  font-size: 0.925rem;
}
.sx-table tbody tr:hover {
  background-color: #f8fbfd;
}

/* Pagination */
.pagination .page-link {
  color: var(--sx-oxford-blue);
  border-color: var(--sx-border);
  font-weight: 600;
  padding: 0.45rem 0.9rem;
}
.pagination .page-item.active .page-link {
  background-color: var(--sx-hookers-green);
  border-color: var(--sx-hookers-green);
  color: #FFFFFF;
}
.pagination .page-link:hover {
  background-color: rgba(73, 121, 107, 0.1);
  color: var(--sx-hookers-green-dark);
}

/* Stats Counter Box */
.sx-stat-box {
  background: #FFFFFF;
  border: 1px solid var(--sx-border);
  border-radius: var(--sx-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--sx-shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.sx-stat-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--sx-radius-md);
  background-color: rgba(73, 121, 107, 0.15);
  color: var(--sx-hookers-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.sx-stat-num {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--sx-oxford-blue);
  line-height: 1;
}
.sx-stat-label {
  color: var(--sx-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Flash alerts */
.alert-sx-success {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.alert-sx-danger {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sx-player-bar {
    height: 110px;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
  }
  .sx-player-bar .player-track-info {
    width: 60%;
  }
  .sx-player-volume-wrap {
    display: none;
  }
  .sx-player-controls-center {
    width: 100%;
    order: 2;
  }
  body {
    padding-bottom: 120px;
  }
  .sx-hero {
    padding: 2.75rem 1rem 2rem;
  }
  .sx-hero-title {
    font-size: 2rem;
  }
}
