/* DREAMWAVE FM — Component Styles */

/* ===== BUTTONS ===== */
.btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'VT323', monospace;
  transition: all 0.2s ease;
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}

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

.btn.active {
  color: var(--neon-pink);
  border-color: rgba(255, 113, 206, 0.5);
  background: rgba(255, 113, 206, 0.1);
}

.btn-play {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
  color: #000;
  font-weight: 600;
}

.btn-wide {
  grid-column: 1 / -1;
}

/* ===== CHIPS ===== */
.chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'VT323', monospace;
  transition: all 0.18s ease;
  border-radius: 3px;
  letter-spacing: 0.5px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip:hover {
  border-color: rgba(185, 103, 255, 0.5);
  color: rgba(185, 103, 255, 0.8);
  background: rgba(185, 103, 255, 0.05);
}

.chip.active {
  background: rgba(185, 103, 255, 0.15);
  border-color: var(--neon-purple);
  color: var(--neon-purple);
  box-shadow: 0 0 10px rgba(185, 103, 255, 0.2);
}

/* ===== CARDS ===== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  transition: all var(--transition-normal);
}

.card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 2, 54, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #0d0221;
  border: 1px solid var(--neon-purple);
  border-radius: 8px;
  padding: 32px 28px;
  width: 340px;
  max-width: 90vw;
  position: relative;
  box-shadow: 0 0 40px rgba(185, 103, 255, 0.3);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  font-family: inherit;
}

.modal-close:hover {
  color: var(--neon-pink);
}

.modal-title {
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--neon-purple);
  margin-bottom: 6px;
}

.modal-subtitle {
  text-align: center;
  color: #888;
  font-size: 14px;
  margin-bottom: 24px;
}

/* ===== AUTH MODAL ===== */
.auth-input {
  width: 100%;
  padding: 10px 12px;
  background: #1a0a3a;
  border: 1px solid #333;
  border-radius: 4px;
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 16px;
  margin-bottom: 10px;
  outline: none;
}

.auth-input:focus {
  border-color: var(--neon-purple);
}

.auth-btn {
  width: 100%;
  padding: 10px;
  background: var(--neon-purple);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: opacity 0.2s;
}

.auth-btn:hover {
  opacity: 0.8;
}

.auth-btn-github {
  background: #24292e;
}

.auth-divider {
  text-align: center;
  color: #555;
  font-size: 12px;
  margin: 8px 0;
}

.auth-error {
  color: #ff6b6b;
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
}

.auth-success {
  color: var(--neon-green);
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
}

/* ===== PROFILE DROPDOWN ===== */
.profile-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.profile-dropdown-btn {
  background: none;
  border: 1px solid rgba(185, 103, 255, 0.3);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  font-family: inherit;
}

.profile-dropdown-btn:hover {
  border-color: var(--neon-purple);
  background: rgba(185, 103, 255, 0.08);
}

.profile-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: rgba(8, 4, 28, 0.97);
  border: 1px solid rgba(185, 103, 255, 0.25);
  border-radius: 8px;
  min-width: 170px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 9999;
}

.profile-dropdown-menu.open {
  display: block;
}

.profile-dropdown-item {
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-dropdown-item:hover {
  background: rgba(185, 103, 255, 0.12);
  color: #fff;
}

.profile-dropdown-item.danger {
  color: #ff6b6b;
}

.profile-dropdown-item.danger:hover {
  background: rgba(255, 80, 80, 0.1);
}

.profile-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

/* ===== USER AVATAR ===== */
.user-avatar {
  position: fixed;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--neon-purple);
  overflow: hidden;
  cursor: pointer;
  z-index: 1000;
  background: #1a0a3a;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar:hover {
  border-color: var(--neon-pink);
}

/* ===== USER PROFILE MODAL ===== */
#userProfileModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(2, 2, 54, 0.92);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.profile-card {
  background: rgba(0, 0, 20, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 28px;
  width: 380px;
  max-width: 90vw;
  text-align: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--neon-purple);
  object-fit: cover;
  margin-bottom: 14px;
}

.profile-username {
  font-size: 22px;
  color: var(--neon-blue);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.profile-joined {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 18px;
}

.profile-stat {
  text-align: center;
}

.profile-stat-val {
  font-size: 20px;
  color: var(--neon-pink);
}

.profile-stat-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 1px;
}

.follow-btn {
  background: var(--neon-pink);
  border: none;
  color: #000;
  font-family: 'VT323', monospace;
  font-size: 14px;
  letter-spacing: 2px;
  padding: 10px 28px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.follow-btn:hover {
  opacity: 0.85;
  box-shadow: 0 0 14px rgba(255, 113, 206, 0.5);
}

.follow-btn.following {
  background: rgba(255, 255, 255, 0.1);
  color: var(--neon-blue);
  border: 1px solid rgba(1, 205, 254, 0.4);
}

/* ===== DISCOVER USERS MODAL ===== */
#discoverUsersModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(2, 2, 54, 0.92);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.discover-card {
  background: rgba(0, 0, 20, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 28px;
  width: 440px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}

.discover-card::-webkit-scrollbar {
  width: 4px;
}

.discover-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.discover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.discover-title {
  color: var(--neon-green);
  letter-spacing: 3px;
  font-size: 14px;
}

.discover-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
}

.user-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.user-list-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-list-info {
  flex: 1;
}

.user-list-name {
  font-size: 12px;
  color: var(--neon-blue);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-list-name:hover {
  text-decoration: underline;
}

.user-list-meta {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 2px;
}

.user-list-follow-btn {
  background: var(--neon-pink);
  border: none;
  color: #000;
  font-family: 'VT323', monospace;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.user-list-follow-btn:hover {
  opacity: 0.85;
  box-shadow: 0 0 10px rgba(255, 113, 206, 0.4);
}

.user-list-follow-btn.is-following {
  background: rgba(255, 255, 255, 0.1);
  color: var(--neon-blue);
  border: 1px solid rgba(1, 205, 254, 0.4);
}

/* ===== ACTIVITY MODAL ===== */
#activityModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(2, 2, 54, 0.92);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.activity-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-tab {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'VT323', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 8px 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.activity-tab:hover {
  color: rgba(255, 255, 255, 0.7);
}

.activity-tab.active {
  color: var(--neon-pink);
  border-bottom-color: var(--neon-pink);
}

.find-people-btn {
  background: rgba(1, 205, 254, 0.1);
  border: 1px solid rgba(1, 205, 254, 0.35);
  color: var(--neon-blue);
  font-family: 'VT323', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
}

.find-people-btn:hover {
  background: rgba(1, 205, 254, 0.2);
  box-shadow: 0 0 10px rgba(1, 205, 254, 0.3);
}

#activityFeedList::-webkit-scrollbar {
  width: 4px;
}

#activityFeedList::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.activity-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.activity-user {
  color: var(--neon-blue);
}

.activity-track {
  color: rgba(255, 255, 255, 0.75);
}

.activity-time {
  color: rgba(255, 255, 255, 0.3);
  float: right;
  font-size: 10px;
}

/* ===== SETTINGS MODAL ===== */
#settingsModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(2, 2, 54, 0.92);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* ===== STATS OVERLAY ===== */
#statsOverlay {
  display: none;
}

#statsOverlay.open {
  display: flex !important;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  z-index: 998;
  backdrop-filter: blur(4px);
}

.stats-modal {
  background: #0d0221;
  border: 1px solid var(--neon-purple);
  padding: 28px;
  border-radius: 4px;
  min-width: 300px;
  text-align: left;
  box-shadow: 0 0 30px rgba(185, 103, 255, 0.3);
}

.stats-modal h2 {
  color: var(--neon-pink);
  margin-bottom: 16px;
  font-size: 18px;
  font-family: 'Press Start 2P', cursive;
  text-shadow: 0 0 10px var(--neon-pink);
  letter-spacing: 2px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(185, 103, 255, 0.2);
  font-size: 15px;
}

.stat-row span:first-child {
  color: #aaa;
}

.stat-row span:last-child {
  color: var(--neon-blue);
}

.stats-close {
  margin-top: 16px;
  width: 100%;
  background: rgba(185, 103, 255, 0.2);
  border: 1px solid var(--neon-purple);
  color: var(--neon-purple);
  padding: 8px;
  font-family: 'VT323', monospace;
  font-size: 15px;
  cursor: pointer;
}

.stats-close:hover {
  background: rgba(185, 103, 255, 0.4);
}

/* ===== SLEEP TIMER OVERLAY ===== */
#sleepTimerOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

#sleepTimerOverlay.open {
  display: flex;
}

.sleep-menu {
  background: #0d0221;
  border: 1px solid var(--neon-purple);
  padding: 24px;
  border-radius: 4px;
  text-align: center;
  min-width: 280px;
  box-shadow: 0 0 30px rgba(185, 103, 255, 0.3);
}

.sleep-menu h3 {
  color: var(--neon-pink);
  margin-bottom: 16px;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  text-shadow: 0 0 10px var(--neon-pink);
  letter-spacing: 2px;
}

.sleep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#sleepTimerDisplay {
  text-align: center;
  font-size: 14px;
  color: var(--neon-blue);
  height: 20px;
  margin-top: 4px;
}

/* ===== KEYBOARD SHORTCUTS MODAL ===== */
.shortcuts-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(4px);
}

.shortcuts-overlay.open {
  display: flex;
}

.shortcuts-modal {
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 28px 36px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.shortcuts-modal h2 {
  font-family: 'Press Start 2P', cursive;
  font-size: 11px;
  color: var(--neon-pink);
  text-shadow: 0 0 10px var(--neon-pink);
  margin-bottom: 20px;
  letter-spacing: 2px;
  text-align: center;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #1a1a1a;
}

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

.shortcut-keys {
  display: flex;
  gap: 4px;
  align-items: center;
}

.shortcut-key {
  background: #222;
  border: 1px solid #444;
  border-bottom: 2px solid #555;
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 14px;
  padding: 2px 8px;
  border-radius: 4px;
}

.shortcut-label {
  color: #888;
  font-size: 15px;
}

.shortcuts-close-row {
  text-align: center;
  margin-top: 18px;
}

.shortcuts-close-btn {
  background: none;
  border: 1px solid #444;
  color: #666;
  font-family: 'VT323', monospace;
  font-size: 14px;
  padding: 6px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.shortcuts-close-btn:hover {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
}

/* ===== PLAYLIST TOAST ===== */
#playlistToast {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 20, 0.95);
  border: 1px solid var(--neon-pink);
  color: var(--neon-pink);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 12px;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 9500;
  pointer-events: none;
}

/* ===== ADD TO PLAYLIST MENU ===== */
#addToPlaylistMenu {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  max-height: 300px;
  overflow-y: auto;
}

.pl-menu-title {
  padding: 8px 14px;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pl-menu-item {
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}

.pl-menu-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.pl-menu-item.added {
  color: var(--neon-pink);
}

.pl-menu-item.new-pl {
  color: var(--neon-green);
}

.pl-menu-close {
  padding: 8px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pl-menu-close:hover {
  color: rgba(255, 255, 255, 0.6);
}