/* ═══════════════════════════════════════════
   Cyori Dashboard v5.0 — Modern Glass
   ═══════════════════════════════════════════ */

.dash-layout {
  display: flex;
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 80px);
}

.dash-sidebar {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- Glass Card --- */
.glass-panel {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

/* --- Player Card --- */
.player-card {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.player-art {
  width: 280px;
  min-height: 280px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.03);
}

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

.player-art .art-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--gold-dim);
  background: linear-gradient(135deg, rgba(212,175,55,0.05), rgba(255,255,255,0.02));
}

.player-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  min-width: 0;
}

.player-info .track-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-info .track-artist {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0;
}

/* --- Progress --- */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-wrap .time {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  min-width: 40px;
}

.progress-bar-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

.progress-bar-track .fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-dim));
  transition: width 0.3s ease;
  position: relative;
}

.progress-bar-track .fill::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.progress-bar-track:hover .fill::after {
  opacity: 1;
}

/* --- Controls --- */
.controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ctrl-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctrl-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.05);
}

.ctrl-btn:active {
  transform: scale(0.95);
}

.ctrl-btn.play-btn {
  width: 56px;
  height: 56px;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dim));
  color: #000;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.ctrl-btn.play-btn:hover {
  box-shadow: 0 6px 30px rgba(212, 175, 55, 0.5);
  transform: scale(1.06);
}

.ctrl-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ctrl-tag:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

.ctrl-tag.active {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.08);
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-wrap i {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-primary);
  cursor: pointer;
}

/* --- Queue --- */
.queue-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.queue-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.queue-panel .panel-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.queue-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.queue-list::-webkit-scrollbar {
  width: 4px;
}

.queue-list::-webkit-scrollbar-track {
  background: transparent;
}

.queue-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  transition: all 0.2s;
  cursor: pointer;
}

.queue-item:hover {
  background: rgba(255,255,255,0.05);
}

.queue-item .qi-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
}

.queue-item .qi-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-item .qi-info {
  flex: 1;
  min-width: 0;
}

.queue-item .qi-info .qi-title {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item .qi-info .qi-artist {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.queue-item .qi-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}

.queue-item:hover .qi-actions {
  opacity: 1;
}

/* --- Recommended --- */
.rec-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.rec-grid::-webkit-scrollbar {
  width: 4px;
}

.rec-grid::-webkit-scrollbar-track {
  background: transparent;
}

.rec-grid::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
}

.rec-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  transition: all 0.2s;
  cursor: pointer;
}

.rec-card:hover {
  background: rgba(255,255,255,0.06);
}

.rec-card .rec-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
}

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

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

.rec-card .rec-info .rec-title {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-card .rec-info .rec-artist {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Tabs --- */
.dash-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  padding: 4px;
  border-radius: 12px;
  width: fit-content;
}

.dash-tab {
  padding: 8px 20px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

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

.dash-tab.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.08);
}

/* --- Sidebar --- */
.guild-select {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guild-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.guild-option:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.06);
}

.guild-option.active {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.06);
}

.guild-option .g-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}

.guild-option .g-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guild-option .g-name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Favorites / Collection --- */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.collection-item {
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.2s;
  cursor: pointer;
}

.collection-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
}

.collection-item .ci-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.04);
}

.collection-item .ci-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-item .ci-title {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collection-item .ci-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- System Stats --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 20px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-primary);
}

.stat-card .stat-bar {
  height: 3px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}

.stat-card .stat-bar .fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-dim));
  transition: width 0.5s ease;
}

/* --- Lyrics --- */
.lyrics-wrap {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.lyrics-wrap .lyrics-title {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.lyrics-wrap .lyrics-artist {
  color: var(--gold-dim);
  font-size: 1rem;
  margin-bottom: 24px;
}

.lyrics-wrap .lyrics-body {
  font-size: 1.05rem;
  line-height: 1.9;
  white-space: pre-wrap;
  color: var(--text-primary);
  padding: 32px;
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  min-height: 200px;
}

/* --- Search --- */
.search-bar-modern {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 4px 4px 4px 16px;
  transition: all 0.2s;
}

.search-bar-modern:focus-within {
  border-color: var(--gold-primary);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
}

.search-bar-modern input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  padding: 12px 0;
}

.search-bar-modern button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dim));
  color: #000;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.search-bar-modern button:hover {
  transform: scale(1.05);
}

/* --- Login Wall --- */
.login-wall-modern {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px;
}

.login-wall-modern .login-box {
  max-width: 400px;
}

.login-wall-modern .login-box h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.login-wall-modern .login-box p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.now-playing-pulse {
  animation: pulse 1.5s ease infinite;
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .player-card {
    flex-direction: column;
  }
  .player-art {
    width: 100%;
    min-height: 200px;
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .dash-layout {
    flex-direction: column;
    padding: 16px;
  }
  .dash-sidebar {
    width: 100%;
  }
  .controls-row {
    gap: 8px;
  }
  .player-info .track-title {
    font-size: 1.2rem;
  }
}
