/* Side Drawer & Backdrop */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 88vw);
  background: #141414;
  border-left: 1px solid var(--border);
  z-index: 210;
  padding: 20px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateX(104%);
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.75);
}

.side-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.drawer-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
}

.drawer-subtitle {
  font-size: 12px;
  color: var(--text-sub);
  margin: 0;
}

.drawer-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover {
  background: var(--surface-hover);
  color: var(--text-main);
}

.drawer-scroll-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  flex: 1;
  padding-left: 4px;
}

.drawer-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--spotify-green);
  margin: 0 0 8px;
  letter-spacing: 0.2px;
}

/* Settings Toggle Row */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.setting-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setting-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.setting-desc {
  font-size: 11px;
  color: var(--text-sub);
}

.switch-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: #333;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.25s ease;
  padding: 0;
}

.switch-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.switch-toggle.on {
  background: var(--spotify-green);
}

.switch-toggle.on::after {
  transform: translateX(20px);
}

/* Decade Grid */
.decade-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.decade-chip {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-elevated);
  border: 1.5px solid var(--border);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
}

.decade-chip.full-span {
  grid-column: span 2;
}

.decade-chip.selected {
  background: rgba(29, 185, 84, 0.14);
  border-color: var(--spotify-green);
  color: var(--spotify-green);
}

.genre-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.genre-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1.5px solid var(--border);
  color: var(--text-main);
  font-family: inherit;
  cursor: pointer;
  text-align: right;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.genre-option:hover {
  background: #202020;
  border-color: #3a3a3a;
}

.genre-option.selected {
  background: rgba(29, 185, 84, 0.12);
  border-color: var(--spotify-green);
}

.genre-option-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.genre-option-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.genre-option-desc {
  font-size: 11px;
  color: var(--text-sub);
}

.genre-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #555;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.genre-option.selected .genre-check {
  background: var(--spotify-green);
  border-color: var(--spotify-green);
}

.genre-check svg {
  width: 13px;
  height: 13px;
  fill: #000000;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.genre-option.selected .genre-check svg {
  opacity: 1;
  transform: scale(1);
}

.drawer-footer {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.drawer-apply-btn {
  width: 100%;
  background: var(--spotify-green);
  color: #000000;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-apply-btn:hover {
  background: var(--spotify-green-hover);
  transform: scale(1.01);
}
