/* Profile & Stats Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.profile-modal {
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  max-height: 88dvh;
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-backdrop.open .profile-modal {
  transform: translateY(0) scale(1);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  padding: 16px 18px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.wallet-summary-card {
  background: linear-gradient(135deg, rgba(56, 217, 255, 0.14) 0%, rgba(109, 40, 217, 0.1) 100%);
  border: 1px solid rgba(56, 217, 255, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wallet-summary-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wallet-summary-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
}

.wallet-summary-val {
  font-size: 20px;
  font-weight: 800;
  color: #8bf0ff;
  direction: ltr;
  text-align: right;
}

.wallet-summary-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 11px;
  color: var(--text-sub);
}

.wallet-summary-meta strong {
  color: var(--text-main);
  direction: ltr;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.kpi-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.kpi-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--spotify-green);
}

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

.stats-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stats-sec-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stats-sec-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-sub);
}

.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.stat-bar-label {
  width: 78px;
  color: var(--text-sub);
  font-weight: 600;
  flex-shrink: 0;
}

.stat-bar-track {
  flex: 1;
  height: 8px;
  background: #222;
  border-radius: 999px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: var(--spotify-green);
  border-radius: 999px;
  width: 0%;
  transition: width 0.4s ease;
}

.stat-bar-count {
  width: 34px;
  text-align: left;
  font-weight: 700;
  color: var(--text-main);
  font-size: 12px;
}

/* Interactive Playable Gallery of Won Songs */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.gallery-item {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.gallery-item-main {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
}

.gallery-item:hover {
  background: #222222;
  border-color: #3e3e3e;
  transform: translateY(-1px);
}

.gallery-item.playing,
.gallery-item.selected-card {
  background: rgba(29, 185, 84, 0.12);
  border-color: var(--spotify-green);
  box-shadow: 0 0 14px rgba(29, 185, 84, 0.24);
}

.gallery-spotify-link {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--spotify-green);
  color: #000000;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.15s ease;
}

.gallery-item.selected-card .gallery-spotify-link,
.gallery-item.playing .gallery-spotify-link {
  display: inline-flex;
}

.gallery-spotify-link:hover {
  background: var(--spotify-green-hover);
  transform: scale(1.02);
}

.gallery-spotify-link svg {
  width: 14px;
  height: 14px;
  fill: #000000;
  flex-shrink: 0;
}

.gallery-thumb-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #222;
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.gallery-item:hover .gallery-play-overlay,
.gallery-item.playing .gallery-play-overlay {
  opacity: 1;
}

.gallery-play-overlay svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.8));
}

.gallery-item.playing .gallery-play-overlay svg {
  fill: var(--spotify-green);
}

.gallery-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.gallery-song-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-item.playing .gallery-song-title {
  color: var(--spotify-green);
}

.gallery-song-artist {
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.gallery-time-pill {
  font-size: 10px;
  font-weight: 700;
  color: #000;
  background: var(--spotify-green);
  padding: 1px 6px;
  border-radius: 999px;
  direction: ltr;
}

.empty-gallery-msg {
  grid-column: span 2;
  text-align: center;
  padding: 18px 10px;
  color: var(--text-muted);
  font-size: 12px;
  background: var(--surface-elevated);
  border-radius: 12px;
  border: 1px dashed var(--border);
}

/* Auth & Guest Lock Styles */
.auth-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: #101010;
  padding: 4px;
  border-radius: 10px;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.auth-tab.active {
  background: var(--spotify-green);
  color: #000000;
}

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

.auth-form.active {
  display: flex;
}

.auth-input {
  width: 100%;
  background: #101010;
  border: 1px solid #303030;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 16px;
}

.auth-input:focus {
  outline: none;
  border-color: var(--spotify-green);
}

.auth-submit-btn {
  width: 100%;
  background: var(--spotify-green);
  color: #000000;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s ease;
}

.auth-submit-btn:hover {
  background: var(--spotify-green-hover);
}

.auth-msg {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  min-height: 16px;
  line-height: 1.35;
}

.auth-msg.error {
  color: #ff5c6c;
}

.auth-msg.success {
  color: var(--spotify-green);
}

.username-live-hint {
  font-size: 11px;
  font-weight: 600;
  padding: 0 4px;
  min-height: 15px;
  margin-top: -3px;
  transition: color 0.18s ease;
}

.username-live-hint.valid {
  color: var(--spotify-green);
}

.username-live-hint.invalid {
  color: #ff5c6c;
}

.auth-input.input-valid {
  border-color: var(--spotify-green);
}

.auth-input.input-invalid {
  border-color: var(--danger);
}

.simulated-email-box {
  display: none;
  background: rgba(29, 185, 84, 0.1);
  border: 1px dashed var(--spotify-green);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 11px;
  color: var(--text-main);
  line-height: 1.4;
}

.simulated-email-box.visible {
  display: block;
}

.logged-user-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: rgba(29, 185, 84, 0.1);
  border: 1px solid rgba(29, 185, 84, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
}

.logged-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.logout-btn {
  background: #242424;
  color: var(--text-main);
  border: 1px solid #3d3d3d;
  border-radius: 999px;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.logout-btn:hover {
  border-color: var(--danger);
  color: #ff6b7a;
}

.stats-lock-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stats-lock-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.stats-lock-wrapper.guest-locked .stats-lock-content {
  filter: blur(7px);
  opacity: 0.42;
  pointer-events: none;
  user-select: none;
}

.guest-lock-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
}

.stats-lock-wrapper.guest-locked .guest-lock-overlay {
  display: flex;
}

.guest-lock-card {
  background: rgba(18, 18, 18, 0.94);
  border: 1px solid var(--spotify-green);
  border-radius: 14px;
  padding: 16px 14px;
  max-width: 290px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

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

.guest-lock-desc {
  font-size: 12px;
  color: var(--text-sub);
  margin: 0;
  line-height: 1.4;
}

/* Profile Modal Avatar */
.profile-modal-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* Crystal Shop */
.shop-tabs {
  display: flex;
  gap: 6px;
  background: #101010;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.shop-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.shop-tab.active {
  background: var(--spotify-green);
  color: #000000;
}

.shop-msg {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  min-height: 16px;
  margin: -8px 0;
  line-height: 1.35;
}

.shop-msg:empty {
  display: none;
}

.shop-msg.error {
  color: #ff5c6c;
}

.shop-msg.success {
  color: var(--spotify-green);
}

.shop-grid {
  display: grid;
  gap: 10px;
}

.shop-grid.avatars {
  grid-template-columns: repeat(3, 1fr);
}

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

.shop-item {
  background: var(--surface-elevated);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-main);
  transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.shop-item:hover {
  background: #222222;
  border-color: #3e3e3e;
  transform: translateY(-2px);
}

.shop-item:active {
  transform: scale(0.96);
}

.shop-item.equipped {
  border-color: var(--spotify-green);
  background: rgba(29, 185, 84, 0.1);
  box-shadow: 0 0 14px rgba(29, 185, 84, 0.22);
}

.shop-avatar-preview {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.14);
}

.shop-bg-preview {
  width: 100%;
  height: 56px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.shop-item-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  line-height: 1.2;
}

.shop-item-action {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(56, 217, 255, 0.14);
  color: #8bf0ff;
  border: 1px solid rgba(56, 217, 255, 0.35);
  white-space: nowrap;
}

.shop-item-action.is-owned {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.18);
}

.shop-item-action.is-equipped {
  background: var(--spotify-green);
  color: #000000;
  border-color: var(--spotify-green);
}

.shop-item-action.is-previewing {
  background: rgba(139, 240, 255, 0.22);
  color: #8bf0ff;
  border-color: #56e0ff;
}

.shop-item.previewing {
  border-color: #56e0ff;
  background: rgba(56, 217, 255, 0.1);
  box-shadow: 0 0 14px rgba(56, 217, 255, 0.28);
}

/* Shop Live Preview Panel */
.shop-preview-panel {
  background: var(--surface-elevated);
  border: 1.5px solid rgba(86, 224, 255, 0.45);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.shop-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shop-preview-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.shop-preview-badge {
  font-size: 10px;
  font-weight: 800;
  color: #000000;
  background: #56e0ff;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.shop-preview-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-preview-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #222222;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shop-preview-close:hover {
  color: var(--text-main);
  border-color: #444;
}

.shop-preview-stage {
  position: relative;
  height: 92px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.shop-preview-mock-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 14, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 12px 5px 6px;
}

.shop-preview-mock-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.shop-preview-mock-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.shop-preview-mock-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--spotify-green);
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding-right: 2px;
  box-shadow: 0 4px 16px rgba(29, 185, 84, 0.45);
}

.shop-preview-actions {
  display: flex;
  gap: 8px;
}

.shop-preview-btn {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease, opacity 0.18s ease;
}

.shop-preview-btn:active {
  transform: scale(0.96);
}

.shop-preview-btn.primary {
  background: var(--spotify-green);
  color: #000000;
}

.shop-preview-btn.primary:hover {
  background: var(--spotify-green-hover);
}

.shop-preview-btn.primary.is-equipped {
  background: rgba(29, 185, 84, 0.18);
  color: var(--spotify-green);
  border: 1px solid rgba(29, 185, 84, 0.4);
  cursor: default;
}

.shop-preview-btn.peek {
  background: rgba(86, 224, 255, 0.14);
  color: #8bf0ff;
  border: 1px solid rgba(86, 224, 255, 0.4);
}

.shop-preview-btn.peek:hover {
  background: rgba(86, 224, 255, 0.24);
}

/* Floating Peek Banner on Real Game Screen */
.shop-peek-banner {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(-140%);
  z-index: 360;
  width: calc(100% - 24px);
  max-width: 440px;
  background: rgba(16, 16, 16, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(86, 224, 255, 0.55);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.shop-peek-banner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.shop-peek-label {
  font-size: 12px;
  font-weight: 800;
  color: #8bf0ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-peek-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.shop-peek-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 11px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.shop-peek-btn.primary {
  background: var(--spotify-green);
  color: #000000;
}

.shop-peek-btn.secondary {
  background: #262626;
  color: var(--text-main);
  border: 1px solid #3c3c3c;
}

.shop-peek-btn.close {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 92, 108, 0.16);
  color: #ff6b7a;
}

/* Profile Favorites & Edit Profile */
.profile-favorites-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-favorites-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.edit-profile-btn {
  background: rgba(29, 185, 84, 0.14);
  color: var(--spotify-green);
  border: 1px solid rgba(29, 185, 84, 0.35);
  border-radius: 999px;
  padding: 4px 11px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s ease;
}

.edit-profile-btn:hover {
  background: rgba(29, 185, 84, 0.24);
}

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

.favorites-view {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #101010;
  border: 1px solid #242424;
  border-radius: 10px;
  padding: 8px 10px;
}

.fav-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  white-space: nowrap;
}

.fav-value {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fav-value.is-empty {
  font-weight: 500;
  color: var(--text-muted);
  font-style: italic;
}

.favorites-edit-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.fav-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
}

.fav-search-box {
  position: relative;
  width: 100%;
}

.fav-search-input {
  padding-left: 34px;
  font-size: 14px;
}

.fav-search-input.is-selected {
  border-color: var(--spotify-green);
  background: rgba(29, 185, 84, 0.08);
}

.fav-search-input.is-unpicked {
  border-color: rgba(245, 197, 24, 0.55);
}

.fav-clear-btn {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-sub);
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fav-clear-btn:hover {
  background: rgba(255, 92, 108, 0.22);
  color: #ff6b7a;
}

.fav-suggestions-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  background: #1a1a1a;
  border: 1px solid #353535;
  border-radius: 10px;
  max-height: 185px;
  overflow-y: auto;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.85);
}

.fav-suggestion-row {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 9px 11px;
  text-align: right;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fav-suggestion-row:last-child {
  border-bottom: none;
}

.fav-suggestion-row:hover {
  background: rgba(29, 185, 84, 0.14);
}

.fav-suggestion-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

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

.fav-form-error {
  font-size: 11.5px;
  font-weight: 700;
  color: #ff5c6c;
  text-align: center;
}

.fav-form-error:empty {
  display: none;
}

.fav-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.fav-form-actions .auth-submit-btn {
  flex: 1;
}

.fav-saved-msg {
  font-size: 11px;
  font-weight: 700;
  color: var(--spotify-green);
  text-align: center;
}

.fav-saved-msg:empty {
  display: none;
}

/* VIP Custom Upload Card in Shop */
.shop-item.vip-custom {
  grid-column: 1 / -1;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(184, 138, 0, 0.16) 0%, rgba(142, 45, 226, 0.14) 100%);
  border-color: rgba(255, 210, 80, 0.45);
}

.shop-item.vip-custom:hover {
  border-color: rgba(255, 210, 80, 0.8);
  background: linear-gradient(135deg, rgba(184, 138, 0, 0.22) 0%, rgba(142, 45, 226, 0.2) 100%);
}

.shop-vip-badge {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  color: #140e00;
  background: linear-gradient(135deg, #ffe259, #ffa751);
  padding: 2px 8px;
  border-radius: 999px;
}

.shop-vip-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-vip-bg-thumb {
  width: 64px;
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.shop-vip-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.shop-vip-info .shop-item-name {
  text-align: right;
  font-size: 13px;
}

.shop-vip-sub {
  font-size: 11px;
  color: var(--text-sub);
  text-align: right;
  line-height: 1.3;
}

.shop-preview-actions {
  flex-wrap: wrap;
}

.shop-preview-btn.change-photo {
  flex: 1 1 100%;
  background: #242424;
  color: var(--text-main);
  border: 1px solid #3c3c3c;
}

/* Daily Quests & Achievement Badges */
.quests-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quest-row {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.quest-row.is-ready {
  border-color: var(--spotify-green);
  background: rgba(29, 185, 84, 0.1);
}

.quest-row.is-claimed {
  opacity: 0.65;
}

.quest-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quest-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.quest-status-pill {
  font-size: 10.5px;
  font-weight: 800;
  color: #8bf0ff;
  white-space: nowrap;
}

.quest-status-pill.claimed {
  color: var(--spotify-green);
}

.quest-claim-btn {
  border: none;
  border-radius: 999px;
  padding: 5px 11px;
  background: var(--spotify-green);
  color: #000;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.quest-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #9d4edd, #38d9ff);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.badge-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.badge-card.unlocked {
  border-color: rgba(251, 191, 36, 0.55);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), rgba(147, 51, 234, 0.12));
}

.badge-card.locked {
  opacity: 0.42;
  filter: grayscale(0.85);
}

.badge-icon {
  font-size: 22px;
  line-height: 1;
}

.badge-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-main);
}

/* Profile Sub-Views & Bottom Nav Buttons */
.profile-subview {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.profile-subview.active {
  display: flex;
}

.profile-subnav-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-top: 4px;
}

.profile-subnav-btn {
  border: 1px solid rgba(192, 132, 252, 0.38);
  border-radius: 14px;
  padding: 12px 10px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(31, 21, 62, 0.92));
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.profile-subnav-btn:hover {
  border-color: #c084fc;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.36), rgba(46, 32, 88, 0.96));
}

.profile-subnav-btn:active {
  transform: scale(0.96);
}

.profile-subview-back {
  align-self: flex-start;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  background: var(--surface-elevated);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Streak Info Modal */
.streak-modal-card {
  max-width: 360px;
}

.streak-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.streak-info-box {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.streak-info-box.highlight {
  border-color: rgba(255, 165, 0, 0.55);
  background: linear-gradient(135deg, rgba(255, 115, 0, 0.16), rgba(255, 200, 0, 0.1));
}

.streak-info-val {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  direction: ltr;
}

.streak-info-label {
  font-size: 11px;
  color: var(--text-sub);
  font-weight: 600;
}

.streak-modal-hint {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffd54a;
  line-height: 1.4;
}
