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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: #0a0a0a;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
}

/* Header */
header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.75rem 0;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.85);
  z-index: 100;
  backdrop-filter: blur(24px) saturate(180%);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  cursor: default;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, #888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  color: #666;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
  cursor: pointer;
  user-select: none;
  position: relative;
  padding: 0.5rem 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #fff, #888);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover,
nav a.active {
  color: #fff;
}

nav a.active::after {
  width: 100%;
}

/* Buttons */
.btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 0.875rem 2rem;
  font-size: 0.813rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.1);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.05);
}

/* Main Content */
main {
  padding: 5rem 0;
  min-height: calc(100vh - 200px);
}

h1 {
  font-size: 4.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -4px;
  line-height: 0.95;
  background: linear-gradient(135deg, #fff 0%, #999 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -2.5px;
  line-height: 1.1;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

.subtitle {
  color: #666;
  font-size: 1.125rem;
  margin-bottom: 4.5rem;
  font-weight: 400;
  letter-spacing: 0.25px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  transition: left 0.6s;
}

.stat-card:hover::before {
  left: 100%;
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.stat-label {
  color: #666;
  font-size: 0.688rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.stat-value {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -3px;
  transition: color 0.3s ease;
  background: linear-gradient(135deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #fff 0%, #888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Tracks List */
.tracks-list {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.track-item {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 2rem;
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.track-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, #fff, #666);
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.track-item:hover::before {
  height: 100%;
}

.track-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
  padding-left: 2rem;
}

.track-number {
  color: #333;
  font-size: 1.125rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

.track-item:hover .track-number {
  color: #666;
}

.track-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  letter-spacing: -0.25px;
}

.track-artist {
  color: #666;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.25px;
}

.track-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #666;
  cursor: pointer;
  padding: 0.625rem 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: inherit;
  border-radius: 2px;
}

.icon-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.icon-btn.delete:hover {
  color: #ff4444;
  border-color: rgba(255, 68, 68, 0.4);
  background: rgba(255, 68, 68, 0.08);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(16px);
}

.modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4rem;
  max-width: 600px;
  width: 100%;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.8);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 3rem;
}

.modal-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #fff 0%, #888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.close-btn {
  background: none;
  border: none;
  color: #444;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 200;
}

.close-btn:hover {
  transform: rotate(90deg);
  color: #fff;
}

/* Form Elements */
.form-group {
  margin-bottom: 2rem;
}

label {
  display: block;
  color: #666;
  font-size: 0.688rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.875rem;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 1.125rem 1.5rem;
  font-size: 0.938rem;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.02);
}

input:read-only {
  color: #555;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.01);
}

input::placeholder,
textarea::placeholder {
  color: #333;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

small {
  font-size: 0.813rem;
  color: #555;
  letter-spacing: 0.25px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 6rem 2rem;
  color: #666;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 2rem;
  opacity: 0.2;
  font-weight: 800;
  letter-spacing: -3px;
}

.empty-state h3 {
  font-size: 1.75rem;
  margin-bottom: 0.875rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: -1px;
}

.empty-state p {
  margin-bottom: 0;
  font-size: 0.938rem;
  color: #555;
  letter-spacing: 0.25px;
}

/* Auth Screens */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
  pointer-events: none;
}

.auth-box {
  max-width: 480px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4rem;
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 2px;
  position: relative;
  z-index: 1;
}

.auth-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
}

.auth-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  color: #666;
  margin-bottom: 3rem;
  font-size: 0.938rem;
  letter-spacing: 0.5px;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* Responsive Design - ENHANCED FOR MOBILE */
@media (max-width: 1024px) {
  .container {
    padding: 0 2rem;
  }

  h1 {
    font-size: 3.5rem;
    letter-spacing: -3px;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }

  /* Header adjustments */
  header {
    padding: 1.25rem 0;
  }

  .logo {
    font-size: 1.25rem;
  }

  .header-content {
    gap: 1rem;
    flex-wrap: wrap;
  }

  /* Navigation for mobile */
  nav {
    gap: 1rem;
    width: 100%;
    justify-content: space-between;
  }

  nav a {
    font-size: 0.75rem;
    padding: 0.375rem 0;
  }

  /* Show all nav links on mobile */
  nav a:not(.active) {
    display: inline-block;
  }

  /* Button adjustments */
  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
  }

  /* Typography */
  h1 {
    font-size: 2.5rem;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
  }

  h2 {
    font-size: 1.75rem;
    letter-spacing: -1.5px;
  }

  .subtitle {
    font-size: 1rem;
    margin-bottom: 3rem;
  }

  /* Main content */
  main {
    padding: 3rem 0;
  }

  /* Stats grid */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 3rem;
  }

  .stat-card {
    padding: 2rem 1.5rem;
  }

  .stat-value {
    font-size: 2.5rem;
    letter-spacing: -2px;
  }

  /* Section headers */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
  }

  .section-title {
    font-size: 1.75rem;
    letter-spacing: -1.5px;
  }

  /* Track items */
  .track-item {
    grid-template-columns: 2rem 1fr;
    gap: 1rem;
    padding: 1.5rem 1rem;
  }

  .track-item:hover {
    padding-left: 1.25rem;
  }

  .track-number {
    font-size: 0.875rem;
  }

  .track-info h3 {
    font-size: 0.938rem;
    margin-bottom: 0.25rem;
  }

  .track-artist {
    font-size: 0.813rem;
  }

  /* Move actions below track info */
  .track-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .icon-btn {
    font-size: 0.688rem;
    padding: 0.5rem 1rem;
    letter-spacing: 0.5px;
  }

  /* Modal adjustments */
  .modal {
    padding: 1rem;
  }

  .modal-content {
    padding: 2.5rem 1.75rem;
  }

  .modal-title {
    font-size: 1.75rem;
    letter-spacing: -1.5px;
  }

  .modal-header {
    margin-bottom: 2rem;
  }

  .close-btn {
    font-size: 2rem;
  }

  /* Auth screens */
  .auth-box {
    padding: 2.5rem 1.75rem;
  }

  .auth-title {
    font-size: 2.25rem;
    letter-spacing: -1.5px;
  }

  .auth-subtitle {
    font-size: 0.875rem;
    margin-bottom: 2.5rem;
  }

  /* Form elements */
  input,
  textarea,
  select {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
  }

  label {
    font-size: 0.625rem;
    margin-bottom: 0.75rem;
  }

  small {
    font-size: 0.75rem;
  }

  /* Empty state */
  .empty-state {
    padding: 4rem 1.5rem;
  }

  .empty-state-icon {
    font-size: 3rem;
  }

  .empty-state h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  /* Even smaller text */
  h1 {
    font-size: 2rem;
    letter-spacing: -1.5px;
  }

  h2 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.875rem;
  }

  /* Navigation stacked */
  nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  nav a {
    width: 100%;
  }

  /* Stats */
  .stat-value {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.625rem;
  }

  /* Track items even more compact */
  .track-item {
    padding: 1.25rem 0.75rem;
    gap: 0.75rem;
  }

  .track-number {
    font-size: 0.813rem;
  }

  .track-info h3 {
    font-size: 0.875rem;
  }

  .icon-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.625rem;
  }

  /* Auth and modal even more compact */
  .auth-box,
  .modal-content {
    padding: 2rem 1.5rem;
  }

  .auth-title,
  .modal-title {
    font-size: 2rem;
  }

  input,
  textarea,
  select {
    padding: 0.875rem 1rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
  }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
  main {
    padding: 2rem 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .empty-state {
    padding: 3rem 1.5rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .icon-btn {
    min-height: 44px;
    min-width: 44px;
  }

  nav a {
    padding: 0.75rem 0;
  }

  input,
  textarea,
  select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: 3px;
}

/* Selection */
::selection {
  background: rgba(255, 255, 255, 0.99);
  color: #000;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #1a1a1a;
  border-radius: 5px;
  border: 2px solid #0a0a0a;
}

::-webkit-scrollbar-thumb:hover {
  background: #2a2a2a;
}

/* Mobile scrollbar (smaller) */
@media (max-width: 768px) {
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
}