@import url('https://fonts.googleapis.com/css2?family=Parkinsans:wght@400;500;600;700&display=swap');

:root {
  --bg: #090e0e;
  --surface: #0f1c1c;
  --surface2: #0b1616;
  --surface3: #122020;
  --accent: #1a7a4a;
  --accent-hover: #229060;
  --accent-dim: rgba(26, 122, 74, 0.12);
  --text: #d4d4d4;
  --text-muted: #5a8080;
  --text-dim: #2e4f4f;
  --border: #172e2e;
  --border-light: #224444;
  --player-height: 78px;
  --nav-height: 68px;
  --radius: 8px;
  --radius-sm: 5px;
  --radius-lg: 10px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --transition: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Parkinsans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: calc(var(--player-height) + 20px);
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

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

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

input,
textarea,
select {
  font-family: 'Parkinsans', inherit;
}

::selection {
  background-color: #1a4a4a;
  color: white;
}

.hidden {
  display: none !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 16px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-center {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
}

.nav-search-wrap {
  position: relative;
  width: 100%;
}

.nav-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.8rem;
  pointer-events: none;
}

.nav-search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  padding: 7px 14px 7px 30px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.nav-search-input:focus {
  border-color: var(--accent);
}

.nav-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  z-index: 200;
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
}

.search-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px 4px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.1s;
}

.search-result-item:hover {
  background: var(--surface);
}

.search-result-pfp,
.search-result-cover {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface2, var(--surface));
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-result-cover {
  border-radius: 6px;
}

.search-result-pfp img,
.search-result-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-pfp-placeholder,
.search-cover-placeholder {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-plays {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-empty {
  padding: 16px 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.logo:hover {
  color: var(--accent-hover);
}

#auth-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.nav-user:hover .nav-user-name {
  color: var(--text);
}

.nav-user img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.nav-pfp-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--text-dim);
}

.nav-user-name {
  color: var(--text);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Parkinsans', inherit;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dim);
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-secondary:hover {
  color: var(--text);
  background: var(--surface2);
  border-color: var(--border-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface2);
  border-color: var(--border-light);
}

.btn-danger {
  background: transparent;
  color: #e57070;
  border-color: #5a2020;
}

.btn-danger:hover {
  background: rgba(180, 30, 0, 0.2);
  color: #ff8888;
  border-color: #8b2020;
}

.btn-google {
  background: #fff;
  color: #333;
  font-weight: 600;
  border-color: transparent;
  gap: 10px;
}

.btn-google:hover {
  background: #f0f0f0;
  color: #111;
  transform: scale(1.02);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.78rem;
}

.hero {
  padding: 40px 0 28px;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #d4d4d4;
}

.hero p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding-bottom: 40px;
}

.track-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color var(--transition);
  cursor: pointer;
}

.track-card:hover {
  border-color: var(--border-light);
}

.track-card.playing {
  border-color: var(--accent);
}

.track-card-cover {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface2);
  overflow: hidden;
}

.track-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-dim);
  background: var(--surface2);
}

.track-card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.track-card:hover .track-card-play-overlay {
  opacity: 1;
}

.track-card.playing .track-card-play-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.3);
}

.play-overlay-btn {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.track-card-body {
  padding: 12px 12px 10px;
}

.track-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  color: #d4d4d4;
}

.track-card-artist {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-card-artist-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  text-decoration: none;
}

.track-card-artist-link:hover {
  color: var(--text);
}

.track-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.track-card-plays {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}

.track-card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
}

.track-card:hover .track-card-actions {
  opacity: 1;
}

.track-card-action-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  transition: all var(--transition);
  border: 1px solid var(--border);
  text-decoration: none;
}

.track-card-action-btn:hover {
  color: var(--text);
  background: var(--surface3);
  border-color: var(--border-light);
}

.track-card-action-btn.delete-btn:hover {
  color: #ff6666;
  border-color: #5a2020;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.25;
  display: block;
}

.empty-state h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.empty-state p {
  font-size: 0.9rem;
}

.player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-height);
  background: rgba(12, 22, 22, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  z-index: 200;
  box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.4);
}

.player-cover {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface2);
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-info {
  flex-shrink: 0;
  min-width: 0;
  width: 155px;
}

.player-title {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #d4d4d4;
}

.player-artist {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
}
.player-artist a {
  color: var(--text-muted);
  text-decoration: none;
}
.player-artist a:hover {
  color: var(--text);
  text-decoration: underline;
}
.player-feat {
  color: var(--text-muted);
  margin-left: 3px;
}
.player-feat a {
  color: var(--text-muted);
  text-decoration: none;
}
.player-feat a:hover {
  color: var(--text);
  text-decoration: underline;
}

.player-controls {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition), background var(--transition);
  background: transparent;
  border: none;
  cursor: pointer;
}

.ctrl-btn:hover {
  color: var(--text);
  background: var(--surface2);
}

.ctrl-btn.play-btn {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff;
}

.ctrl-btn.play-btn:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: scale(1.05);
}

.player-progress {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.player-progress span {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  width: 36px;
}

#time-total {
  text-align: right;
}

.progress-bar {
  flex: 1;
  height: 52px;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  display: none;
}

.player-volume {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

#volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 88px;
  height: 4px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  background: #1a2e2a;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  transition: transform 0.1s;
}

#volume-slider:hover::-webkit-slider-thumb {
  transform: scale(1.15);
}

#volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

#volume-slider::-moz-range-progress {
  background: var(--accent);
  border-radius: 3px;
}

#volume-slider::-moz-range-track {
  background: #1a2e2a;
  border-radius: 3px;
}

.upload-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.upload-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: 'Parkinsans', inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.upload-tab:hover {
  color: var(--text);
}

.upload-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.album-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}

.album-track-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.album-track-num {
  font-size: 0.78rem;
  color: var(--text-dim);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.album-track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.album-track-title-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: 'Parkinsans', inherit;
  font-size: 0.875rem;
  padding: 2px 0;
  outline: none;
  width: 100%;
  transition: border-color var(--transition);
}

.album-track-title-input:focus {
  border-bottom-color: var(--accent);
}

.album-track-filename {
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-track-remove {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  font-size: 0.8rem;
  transition: color var(--transition);
  flex-shrink: 0;
}

.album-track-remove:hover {
  color: #ff6666;
}

.album-tracklist {
  padding-bottom: 60px;
}

.album-tracklist-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.album-tracklist-list {
  list-style: none;
}

.album-tracklist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity var(--transition);
}

.album-tracklist-item:last-child {
  border-bottom: none;
}

.album-tracklist-item:hover {
  opacity: 0.75;
}

.album-tracklist-item.playing .album-tracklist-title {
  color: var(--accent);
}

.album-tracklist-num {
  font-size: 0.78rem;
  color: var(--text-dim);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.album-tracklist-info {
  flex: 1;
  min-width: 0;
}

.album-tracklist-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-tracklist-plays {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.upload-form {
  max-width: 600px;
  padding-bottom: 60px;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text);
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  border-color: var(--border-light);
  box-shadow: 0 0 8px rgba(45, 92, 92, 0.4);
}

.form-group input[type="text"]::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
  font-style: italic;
}

.form-group textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.6;
}

.file-drop {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--surface);
  overflow: hidden;
}

.file-drop:hover,
.file-drop.dragover {
  border-color: var(--border-light);
  background: rgba(12, 22, 22, 0.4);
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-drop-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.file-icon {
  font-size: 1.75rem;
  color: var(--text-dim);
}

.file-drop-label span:not(.file-icon) {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.file-drop.has-file {
  border-color: var(--border-light);
  border-style: solid;
}

.file-drop.has-file .file-drop-label span:not(.file-icon) {
  color: var(--text);
  font-weight: 500;
}

.cover-preview {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.upload-progress {
  margin-bottom: 18px;
}

.upload-bar {
  height: 5px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 7px;
}

.upload-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

#upload-status {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.track-hero {
  padding: 36px 0 28px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.track-hero-cover {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface2);
  box-shadow: var(--shadow);
}

.track-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-hero-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--text-dim);
  background: var(--surface2);
}

.track-hero-info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.track-hero-artist {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.track-hero-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.2;
  color: #d4d4d4;
}

.track-hero-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 18px;
  white-space: pre-line;
}

.track-hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.track-hero-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.track-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.track-player {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.track-player-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.track-player-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.track-player-progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.track-player-bar {
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  cursor: pointer;
  transition: height var(--transition);
}

.track-player-bar:hover {
  height: 6px;
}

.track-player-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
}

.track-player-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.analytics-section {
  padding-bottom: 60px;
}

.analytics-section h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.analytics-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.analytics-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.analytics-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 5px;
}

.analytics-card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.analytics-chart-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.analytics-chart-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-muted);
}

.analytics-chart-container canvas {
  width: 100% !important;
  display: block;
}

.recent-plays {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.recent-plays-header {
  padding: 14px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.recent-plays-list {
  list-style: none;
}

.recent-play-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  transition: background var(--transition);
}

.recent-play-item:last-child {
  border-bottom: none;
}

.recent-play-item:hover {
  background: var(--surface2);
}

.recent-play-time {
  color: var(--text-muted);
}

.recent-play-ip {
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.error-msg {
  background: rgba(180, 30, 0, 0.12);
  border: 1px solid rgba(180, 30, 0, 0.3);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: #ff8877;
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.success-msg {
  background: rgba(30, 65, 65, 0.4);
  border: 1px solid #2d5c5c;
  border-radius: var(--radius);
  padding: 10px 14px;
  color: #7dcfbf;
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-bottom: 0;
  background: var(--bg);
}

.login-box {
  text-align: center;
  padding: 44px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 360px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.login-logo {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #d4d4d4;
}

.login-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.login-box .error-msg {
  text-align: left;
  margin-bottom: 16px;
}

.profile-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  padding-bottom: 60px;
  max-width: 700px;
}

.profile-pfp-section {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-pfp-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface2);
  border: 2px solid var(--border);
}

.profile-pfp-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-dim);
}

.profile-pfp-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pfp-change-btn {
  position: relative;
  overflow: hidden;
  font-size: 0.78rem;
  padding: 6px 12px;
  cursor: pointer;
}

.pfp-preview-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.profile-form {
  flex: 1;
  min-width: 0;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: #152e2e;
  border-radius: 10px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background-color: #1e3e3e;
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
  }

  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .tracks-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
  }

  .track-hero {
    flex-direction: column;
    gap: 18px;
  }

  .track-hero-cover {
    width: 150px;
    height: 150px;
  }

  .track-hero-title {
    font-size: 1.4rem;
  }

  .player {
    padding: 0 12px;
    gap: 10px;
  }

  .player-info {
    width: 110px;
  }

  .player-volume {
    display: none;
  }

  .profile-layout {
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .tracks-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .player-cover {
    display: none;
  }

  .player-info {
    width: 90px;
  }
}

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 36px 0 32px;
}

.user-profile-pfp-wrap {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface2);
  border: 2px solid var(--border);
}

.user-profile-pfp {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-pfp-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-dim);
}

.user-profile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.user-profile-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.user-profile-handle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.user-profile-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.user-profile-listeners {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.leaderboard-section {
  margin-bottom: 24px;
}

.leaderboard-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.leaderboard-list {
  list-style: none;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity var(--transition);
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.leaderboard-item:hover {
  opacity: 0.75;
}

.leaderboard-rank {
  font-size: 0.78rem;
  color: var(--text-dim);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.leaderboard-cover {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leaderboard-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-cover-placeholder {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.leaderboard-info {
  flex: 1;
  min-width: 0;
}

.leaderboard-track-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-plays {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

/* Profile page tabs */
.profile-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.profile-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: 'Parkinsans', inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-tab:hover {
  color: var(--text);
}

.profile-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Featured artists input */
.featured-input-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: var(--input-bg, var(--surface));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  min-height: 42px;
  cursor: text;
}

.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2, var(--card-bg));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px 2px 10px;
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
}

.featured-tag-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0 0 0 2px;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.featured-tag-remove:hover {
  color: var(--text);
}

.featured-text-input {
  flex: 1;
  min-width: 140px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  padding: 2px 0;
}

.featured-text-input::placeholder {
  color: var(--text-dim, var(--text-muted));
}

.featured-status {
  font-size: 0.8rem;
  margin-top: 5px;
  min-height: 1.2em;
}

/* Loop button active state */
.ctrl-btn.loop-active {
  color: var(--accent);
}

/* Featured artist line on track cards */
.verified-badge {
  display: inline-flex;
  align-items: center;
  position: relative;
  margin-left: 5px;
  vertical-align: middle;
  cursor: default;
}
.verified-badge img {
  width: 15px;
  height: 15px;
  display: block;
}
.verified-badge::after {
  content: 'official artist';
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.88);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 9999;
}
.verified-badge:hover::after {
  opacity: 1;
}

.track-card-feat {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.track-card-feat a {
  color: var(--text-muted);
  text-decoration: none;
}

.track-card-feat a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Featured on track hero page */
.track-hero-feat {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.track-hero-feat a {
  color: var(--text-muted);
  text-decoration: none;
}

.track-hero-feat a:hover {
  color: var(--text);
  text-decoration: underline;
}
