:root {
  /* Spotify Layout with Deep Burgundy / Koyu Bordo Theme */
  --bg-base: #120306;
  --bg-gradient: linear-gradient(180deg, #2a0812 0%, #150408 300px, #0e0204 100%);
  --bg-sidebar: #130408;
  --bg-card: #1f070e;
  --bg-card-hover: #2e0b16;
  --bg-card-active: #3c0f1e;
  --bordo-primary: #a31538;
  --bordo-hover: #c41c46;
  --bordo-glow: rgba(196, 28, 70, 0.35);
  --bordo-pill: #451020;
  --bordo-light: #f06292;
  --text-main: #ffffff;
  --text-sub: #b39a9f;
  --text-muted: #7d656b;
  --spotify-green: #1db954;
  --border-subtle: rgba(255, 255, 255, 0.07);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Circular", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-base);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* App Main Grid: Topbar + 3 Columns + Bottom Player */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* Top Bar (Spotify Style) */
.spotify-topbar {
  height: 64px;
  background: #110306;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 280px;
}

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

.brand-icon-box {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--bordo-primary), #e91e63);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 0 14px var(--bordo-glow);
}

.brand-text {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.nav-history-btns {
  display: flex;
  gap: 6px;
}

.nav-round-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.nav-round-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Center Search Container with Dropdown Suggestions */
.topbar-center {
  flex: 1;
  max-width: 540px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-btn-pill {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1f070e;
  border: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.home-btn-pill:hover {
  background: var(--bordo-primary);
  transform: scale(1.05);
}

.search-pill-box {
  flex: 1;
  height: 44px;
  background: #1f070e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  transition: all 0.2s;
}

.search-pill-box:focus-within {
  border-color: var(--bordo-primary);
  box-shadow: 0 0 14px var(--bordo-glow);
  background: #2a0a14;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  margin-left: 10px;
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* Search Suggestions Dropdown (Compact, Non-intrusive) */
.search-suggestions-dropdown {
  position: absolute;
  top: 50px;
  left: 56px;
  right: 0;
  background: #200810;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  z-index: 1000;
  display: none;
}

.search-suggestions-dropdown.active {
  display: block;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  color: #ddd;
  transition: background 0.15s;
}

.suggestion-item:hover {
  background: var(--bordo-primary);
  color: #fff;
}

/* Topbar Right Actions */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.device-connect-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(163, 21, 56, 0.2);
  border: 1px solid var(--bordo-primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  color: #ff80ab;
  cursor: pointer;
  transition: all 0.2s;
}

.device-connect-btn:hover {
  background: var(--bordo-primary);
  color: #fff;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 8px #00e676;
  animation: liveBlink 1.2s infinite;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
}

/* Main 3-Column Content */
.main-wrapper {
  flex: 1;
  display: flex;
  overflow: hidden;
  padding: 10px;
  gap: 10px;
}

/* Left Sidebar ("Kitaplığın") */
.left-sidebar {
  width: 320px;
  background: var(--bg-sidebar);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  flex-shrink: 0;
}

.library-header {
  padding: 18px 20px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.library-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.btn-add-playlist {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-add-playlist:hover {
  background: var(--bordo-primary);
}

.filter-chips {
  display: flex;
  gap: 8px;
  padding: 4px 16px 12px;
  overflow-x: auto;
}

.chip {
  background: var(--bordo-pill);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.chip.active, .chip:hover {
  background: var(--bordo-primary);
}

.library-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.playlist-item:hover, .playlist-item.active {
  background: var(--bg-card-hover);
}

.playlist-icon {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.playlist-meta {
  flex: 1;
  min-width: 0;
}

.playlist-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-desc {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Center Main Pane */
.center-content {
  flex: 1;
  background: var(--bg-gradient);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Quick Access 2x4 Grid */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.quick-card {
  display: flex;
  align-items: center;
  background: rgba(36, 10, 19, 0.8);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.quick-card:hover {
  background: rgba(58, 15, 30, 0.95);
  transform: translateY(-2px);
}

.quick-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  flex-shrink: 0;
}

.quick-title {
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.quick-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bordo-primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.quick-card:hover .quick-play-btn {
  opacity: 1;
  transform: scale(1.08);
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.see-all-link {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.see-all-link:hover {
  color: #fff;
}

/* Song Card Grid (Spotify Style Card) */
.card-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.shelf-card {
  background: var(--bg-card);
  padding: 14px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s;
  position: relative;
}

.shelf-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(163, 21, 56, 0.4);
}

.shelf-thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.shelf-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shelf-play-floating {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bordo-primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s;
}

.shelf-card:hover .shelf-play-floating {
  opacity: 1;
  transform: translateY(0);
}

.shelf-play-floating:hover {
  background: var(--bordo-hover);
  transform: scale(1.08);
}

.shelf-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shelf-card-artist {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right Sidebar (Now Playing View - Matches Screenshot!) */
.right-sidebar {
  width: 320px;
  background: var(--bg-sidebar);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.now-playing-header {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.large-album-art {
  width: 100%;
  padding-top: 100%;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  background: #1f070e;
}

.large-album-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-main-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.track-headline {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.track-subline {
  font-size: 14px;
  color: var(--text-sub);
  margin-top: 4px;
}

.verified-badge {
  color: var(--spotify-green);
  margin-left: 6px;
}

.artist-bio-card {
  background: var(--bg-card);
  padding: 16px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-follow {
  align-self: flex-start;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-follow:hover {
  border-color: #fff;
  transform: scale(1.05);
}

.phone-sync-card {
  background: linear-gradient(135deg, rgba(163, 21, 56, 0.35), rgba(36, 10, 19, 0.8));
  border: 1px solid var(--bordo-primary);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Bottom Persistent Player Bar (Spotify Exact) */
.bottom-player-bar {
  height: 88px;
  background: #110306;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  z-index: 100;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 25%;
  min-width: 200px;
}

.bar-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  background: #240a13;
}

.bar-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bar-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-artist {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 50%;
  max-width: 650px;
}

.player-controls-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.p-btn {
  background: none;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

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

.play-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #000;
}

.play-circle-btn:hover {
  background: var(--bordo-primary);
  color: #fff;
  transform: scale(1.08);
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.timer-label {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 35px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.time-slider {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: height 0.15s;
}

.time-slider:hover {
  height: 6px;
}

.time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.player-right {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 25%;
  justify-content: flex-end;
}

.volume-slider-bar {
  width: 90px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.volume-slider-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
}

.btn-remote-stream {
  background: var(--bordo-primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-remote-stream:hover {
  background: var(--bordo-hover);
  box-shadow: 0 0 12px var(--bordo-glow);
}

/* Responsive adjustments */
@media (max-width: 1100px) {
  .right-sidebar { display: none; }
}

@media (max-width: 768px) {
  .left-sidebar { display: none; }
  .player-left { width: 40%; }
  .player-center { width: 60%; }
  .player-right { display: none; }
}

/* =========================================================
   MANDATORY AUTH MODAL & GOOGLE SIGN-IN STYLES
   ========================================================= */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 2, 4, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.auth-modal-card {
  background: #19050b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 34px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(163, 21, 56, 0.25);
  display: flex;
  flex-direction: column;
  position: relative;
  animation: modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 22px;
}

.auth-logo {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  box-shadow: 0 6px 20px var(--bordo-glow);
  margin-bottom: 12px;
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 4px;
}

.auth-google-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-google-signin {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  color: #202124;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
}

.btn-google-signin:hover {
  background: #f1f3f4;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider span {
  padding: 0 10px;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab-btn.active {
  background: var(--bordo-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--bordo-glow);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  background: #110306;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}

.auth-form input:focus {
  border-color: var(--bordo-primary);
  box-shadow: 0 0 10px var(--bordo-glow);
  background: #19050b;
}

.btn-auth-submit {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--bordo-primary), #c41c46);
  border: none;
  border-radius: 24px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 4px 14px var(--bordo-glow);
  transition: all 0.2s;
}

.btn-auth-submit:hover {
  background: linear-gradient(135deg, var(--bordo-hover), #e91e63);
  box-shadow: 0 6px 18px rgba(233, 30, 99, 0.5);
}

.auth-error-box {
  background: rgba(229, 57, 53, 0.2);
  border: 1px solid rgba(229, 57, 53, 0.5);
  color: #ff8a80;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
}

.user-profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px 4px 6px;
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}

.user-profile-chip:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--bordo-primary);
}

.user-avatar-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name-text {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
