/* ═══════════════════════════════════════════════════════════════════════════
   AHENK WEB PLAYER - MODERN & PREMİUM STİL DOSYASI
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-main: #0a0b10;
  --bg-surface: #12141e;
  --bg-surface-elevated: #181b29;
  --bg-glass: rgba(18, 20, 30, 0.75);
  --bg-glass-hover: rgba(28, 32, 48, 0.85);
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(139, 92, 246, 0.35);
  
  --primary: #8b5cf6;
  --primary-glow: rgba(139, 92, 246, 0.45);
  --accent: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.4);
  --gradient-accent: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --player-height: 94px;
  --sidebar-width: 280px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-elevated: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px -5px var(--primary-glow);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 40%);
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ─── APP LAYOUT ─── */
.app-container {
  display: flex;
  height: calc(100vh - var(--player-height));
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  gap: 28px;
  flex-shrink: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 4px 8px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.brand-text h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Sidebar Nav */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  border: none;
  text-align: left;
  width: 100%;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  opacity: 0.8;
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: #fff;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-weight: 600;
}

.nav-item.active svg {
  opacity: 1;
  color: var(--primary);
}

.badge {
  margin-left: auto;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

/* Sidebar Path Info Box */
.path-info-card {
  margin-top: auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.path-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.path-info-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.path-info-body {
  font-size: 0.78rem;
  color: var(--text-secondary);
  word-break: break-all;
  font-family: monospace;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.path-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}

.path-action-btn:hover {
  background: rgba(139, 92, 246, 0.2);
}

/* ─── MAIN CONTENT ─── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
}

/* Top Header */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  position: sticky;
  top: 0;
  background: rgba(10, 11, 16, 0.85);
  backdrop-filter: blur(16px);
  z-index: 10;
  border-bottom: 1px solid var(--border-subtle);
  gap: 20px;
}

.search-box {
  position: relative;
  width: 380px;
  max-width: 100%;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px -3px var(--primary-glow);
}

.top-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.stat-pill b {
  color: var(--text-primary);
}

.icon-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-surface-elevated);
}

/* Content Area */
.content-body {
  padding: 28px 32px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Hero Section */
.hero-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-glow-blob {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: var(--gradient-accent);
  filter: blur(80px);
  opacity: 0.15;
  top: -50px;
  right: -50px;
  pointer-events: none;
}

.hero-text h2 {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.hero-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 520px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px -3px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -2px var(--primary-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Filter & View Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.filter-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab.active {
  background: var(--bg-surface-elevated);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
}

/* Tracks Table / List */
.tracks-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.track-row {
  display: grid;
  grid-template-columns: 48px 48px 1fr 140px 100px 90px;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  gap: 16px;
  border: 1px solid transparent;
}

.track-row:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-subtle);
}

.track-row.active {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
}

.track-num {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

.track-row:hover .track-num {
  display: none;
}

.track-play-hover {
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.track-row:hover .track-play-hover {
  display: flex;
}

.track-row.active .track-num {
  display: none;
}

.track-row.active .track-play-hover {
  display: flex;
  color: var(--primary);
}

/* Animated Soundwave Equalizer for active track */
.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.sound-bar {
  width: 3px;
  background: var(--primary);
  border-radius: 2px;
  animation: soundBarsAnim 1.2s ease-in-out infinite alternate;
}

.sound-bar:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.sound-bar:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.sound-bar:nth-child(3) { height: 40%; animation-delay: 0.2s; }
.sound-bar:nth-child(4) { height: 80%; animation-delay: 0.4s; }

@keyframes soundBarsAnim {
  0% { height: 20%; }
  100% { height: 100%; }
}

.track-cover {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.track-cover svg {
  width: 20px;
  height: 20px;
  opacity: 0.9;
}

.track-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.track-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-row.active .track-title {
  color: var(--primary);
}

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

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

.track-size {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  font-family: monospace;
}

.track-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn-track-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-track-action:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-track-action.liked {
  color: #ec4899;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  gap: 16px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 440px;
  line-height: 1.5;
}

.code-badge {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  color: var(--accent);
}

/* ─── BOTTOM PLAYER BAR ─── */
.player-bar {
  height: var(--player-height);
  background: rgba(18, 20, 30, 0.95);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-subtle);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  align-items: center;
  padding: 0 24px;
  z-index: 50;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

/* Player Left: Current Track */
.player-track {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.player-cover {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.player-cover.playing {
  animation: spinCover 14s linear infinite;
}

@keyframes spinCover {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.player-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.player-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* Player Center: Controls & Progress */
.player-controls-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.player-buttons {
  display: flex;
  align-items: center;
  gap: 18px;
}

.btn-ctrl {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border-radius: 50%;
  width: 36px;
  height: 36px;
}

.btn-ctrl:hover {
  color: #fff;
  transform: scale(1.1);
}

.btn-ctrl.active {
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
}

.btn-play-pause {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #0a0b10;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  border: none;
}

.btn-play-pause:hover {
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
}

.btn-play-pause svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Progress Slider */
.player-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.time-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: center;
}

.seek-slider-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  height: 16px;
  cursor: pointer;
}

.seek-track-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}

.seek-track-fill {
  height: 100%;
  background: var(--gradient-accent);
  width: 0%;
  border-radius: var(--radius-full);
  position: relative;
  transition: width 0.08s linear;
}

.seek-slider-container:hover .seek-track-bg {
  height: 6px;
}

/* Player Right: Volume & Extra */
.player-extra {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.volume-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 130px;
}

.volume-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.volume-slider:hover::-webkit-slider-thumb {
  transform: scale(1.2);
  background: var(--primary);
}

/* Canvas Mini Visualizer in Player Bar */
.mini-visualizer-canvas {
  width: 50px;
  height: 24px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
}

/* ─── FULLSCREEN VISUALIZER MODAL ─── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 16, 0.85);
  backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.visualizer-modal {
  width: 90%;
  max-width: 900px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  box-shadow: var(--shadow-elevated), var(--shadow-glow);
}

.visualizer-canvas {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-md);
  background: #06070a;
}

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

.modal-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: #fff;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }
  .track-row {
    grid-template-columns: 40px 44px 1fr 100px 70px;
  }
  .track-album {
    display: none;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .app-container {
    height: calc(100vh - var(--player-height));
  }
  .top-header {
    padding: 16px 20px;
  }
  .content-body {
    padding: 20px;
  }
  .hero-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .player-bar {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }
  .player-extra {
    display: none;
  }
  .track-row {
    grid-template-columns: 36px 1fr 60px;
    gap: 10px;
  }
  .track-num, .track-size {
    display: none;
  }
}
