* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

#globe-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Sidebar */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100vh;
  background: rgba(10, 10, 20, 0.88);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
}

.sidebar-header {
  position: relative;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 2px;
}

.sidebar-header::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: 0;
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.06) 0%, rgba(120, 80, 220, 0.04) 50%, transparent 100%);
  pointer-events: none;
}

.sidebar-header h1 {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 3px;
  position: relative;
  background: linear-gradient(135deg, #fff 0%, #7dd3fc 60%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 12px;
  color: #8899aa;
  margin-top: 6px;
  letter-spacing: 0.5px;
  position: relative;
}

.subtitle-count {
  font-size: 10px;
  color: #556677;
  margin-top: 3px;
  letter-spacing: 0.3px;
  position: relative;
}

#stats {
  margin-top: 10px;
  font-size: 11px;
  color: #778899;
  padding: 8px 10px;
  background: rgba(100, 200, 255, 0.03);
  border: 1px solid rgba(100, 200, 255, 0.06);
  border-radius: 8px;
}

#stats span[id^="stat-"] {
  color: #7dd3fc;
  font-weight: 600;
  font-size: 12px;
}

.sep {
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.1);
}

/* Explore button — floating center bottom */
.explore-btn {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  padding: 18px 52px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 40px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 4px;
  cursor: pointer;
  z-index: 20;
  transition: all 0.4s ease;
  backdrop-filter: blur(8px);
}

.explore-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 8px;
  box-shadow: 0 0 30px rgba(100, 200, 255, 0.15);
}

.explore-btn:active {
  transform: translateX(-50%) scale(0.97);
}

.tf-iss {
  position: relative;
}

.tf-iss.active {
  background: rgba(76, 175, 80, 0.15) !important;
  border-color: rgba(76, 175, 80, 0.35) !important;
  color: #81c784 !important;
}

/* Empty favorites guide */
.fav-login-hint:hover {
  color: #00bcd4;
  text-decoration: underline;
}
.fav-empty-guide {
  padding: 24px 16px;
  color: #556;
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
  letter-spacing: 0.3px;
}

#cam-list {
  margin-top: 12px;
  overflow-y: auto;
  flex: 1;
}

.cam-item {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.cam-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cam-item .cam-title {
  font-size: 12px;
  color: #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cam-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
}

.cam-item .cam-loc {
  font-size: 10px;
  color: #555;
}

.cam-item .cam-source {
  display: inline-block;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.cam-overflow {
  padding: 10px;
  color: #444;
  font-size: 11px;
  text-align: center;
}

.cam-loading {
  padding: 20px 10px;
  color: #555;
  font-size: 12px;
  text-align: center;
}

.cam-load-more {
  padding: 12px 10px;
  color: #555;
  font-size: 11px;
  text-align: center;
}

/* Webcam sources — unified cyan (#00bcd4) matching globe points & legend */
.cam-source.windy,
.cam-source.foto-webcam,
.cam-source.ny511,
.cam-source.digitraffic,
.cam-source.otc,
.cam-source.\35 11fl,
.cam-source.\35 11pa,
.cam-source.\35 11az,
.cam-source.\35 11ga,
.cam-source.\35 11la,
.cam-source.\35 11id,
.cam-source.\35 11ne,
.cam-source.singapore,
.cam-source.hongkong,
.cam-source.tfl,
.cam-source.drivebc,
.cam-source.on511,
.cam-source.ab511,
.cam-source.curated {
  background: rgba(0, 188, 212, 0.2);
  color: #00bcd4;
}

/* Radio — gold (#ffd700) matching globe points & legend */
.cam-source.radio {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
}

/* IPTV — orange-red (#ff5722) matching globe points & legend */
.cam-source.iptv {
  background: rgba(255, 87, 34, 0.2);
  color: #ff5722;
}

/* LIVE badge in cam list */
.live-badge {
  display: inline-block;
  background: #e53935;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 4px;
  letter-spacing: 0.5px;
  vertical-align: middle;
  animation: livePulse 2s ease-in-out infinite;
}

.tv-badge {
  display: inline-block;
  background: #ff5722;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 4px;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Preview panel type badges */
.preview-type-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.preview-type-badge.live {
  background: rgba(229, 57, 53, 0.25);
  color: #ef5350;
}

.preview-type-badge.snapshot {
  background: rgba(100, 200, 255, 0.15);
  color: #7dd3fc;
}

/* Favorites */
.cam-item.favorited {
  border-left: 2px solid #ffd700;
  background: rgba(255, 215, 0, 0.04);
}

.fav-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  padding: 0 8px;
  line-height: 1;
  transition: color 0.2s;
}

.fav-btn:hover {
  color: #ffd700;
}

.fav-btn.favorited {
  color: #ffd700;
}

.fav-count {
  display: inline-block;
  background: rgba(255, 215, 0, 0.25);
  color: #ffd700;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 4px;
}

/* Radio Player */
.radio-player {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.radio-favicon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}

.radio-info {
  text-align: center;
}

.radio-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.radio-tags {
  font-size: 11px;
  color: #888;
}

.radio-codec {
  font-size: 10px;
  color: #555;
  margin-top: 2px;
}

.radio-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.radio-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #ffd700;
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-play-btn:hover {
  background: rgba(255, 215, 0, 0.25);
}

.radio-volume {
  width: 100px;
  accent-color: #ffd700;
}

.radio-status {
  font-size: 11px;
  color: #666;
}

/* IPTV Player */
.iptv-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #9c27b0;
  background: rgba(156, 39, 176, 0.1);
  color: #ce93d8;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iptv-play-btn:hover {
  background: rgba(156, 39, 176, 0.25);
}

/* Play button loading state */
.radio-play-btn.loading,
.iptv-play-btn.loading,
.nearby-radio-play.loading {
  pointer-events: none;
  position: relative;
  color: transparent !important;
}

.radio-play-btn.loading::after,
.iptv-play-btn.loading::after,
.nearby-radio-play.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btn-spin 0.8s linear infinite;
}

.radio-play-btn.loading::after {
  border-top-color: #ffd700;
}
.iptv-play-btn.loading::after {
  border-top-color: #ce93d8;
}
.nearby-radio-play.loading::after {
  border-top-color: #ffd700;
  width: 12px;
  height: 12px;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.iptv-volume {
  width: 100px;
  accent-color: #9c27b0;
}

/* Admin link */
.admin-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  color: #444;
  text-decoration: none;
  transition: color 0.2s;
}

.admin-link:hover {
  color: #888;
}

.admin-link.hidden {
  display: none;
}

/* Legend */
.legend {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #666;
}

.legend-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Top-right filter panel */
#top-filters {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 15;
  background: rgba(10, 10, 20, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.tf-label {
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  min-width: 52px;
}

.tf-buttons {
  display: flex;
  gap: 4px;
}

.tf-btn {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #888;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tf-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
}

.tf-btn.active {
  background: rgba(100, 200, 255, 0.15);
  border-color: rgba(100, 200, 255, 0.4);
  color: #7dd3fc;
}

.tf-btn[data-media="camera"].active {
  background: rgba(33, 150, 243, 0.15);
  border-color: rgba(33, 150, 243, 0.4);
  color: #64b5f6;
}

.tf-btn[data-media="radio"].active {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.4);
  color: #ffd700;
}

.tf-btn[data-media="live"].active {
  background: rgba(229, 57, 53, 0.18);
  border-color: rgba(229, 57, 53, 0.5);
  color: #ef5350;
}

.tf-btn[data-media="tv"].active {
  background: rgba(156, 39, 176, 0.15);
  border-color: rgba(156, 39, 176, 0.4);
  color: #ce93d8;
}

/* Country button (replaces old select) */
.tf-country-btn {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ccc;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.tf-country-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.tf-country-btn.has-country {
  background: rgba(100, 200, 255, 0.12);
  border-color: rgba(100, 200, 255, 0.35);
  color: #7dd3fc;
}

/* Loading progress in sidebar */
#load-progress {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.load-step {
  font-size: 10px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 6px;
}

.load-step.hidden {
  display: none;
}

.load-step.done {
  color: #4caf50;
}

.load-step.done .load-spinner {
  display: none;
}

.load-step.done::before {
  content: "\2713";
  font-size: 10px;
  color: #4caf50;
}

.load-spinner {
  width: 8px;
  height: 8px;
  border: 1.5px solid rgba(255,255,255,0.1);
  border-top-color: #7dd3fc;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* Country modal */
.country-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.country-modal.hidden {
  display: none;
}

.country-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.country-modal-content {
  position: relative;
  width: 94%;
  max-width: 1100px;
  max-height: 92vh;
  background: rgba(12, 12, 24, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.country-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.country-modal-header h2 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.country-modal-close {
  background: none;
  border: none;
  color: #666;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.country-modal-close:hover {
  color: #fff;
}

.country-modal-search {
  padding: 8px 16px;
}

.country-modal-search input {
  width: 100%;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.country-modal-search input:focus {
  border-color: rgba(100, 200, 255, 0.5);
}

.country-modal-search input::placeholder {
  color: #555;
}

.country-grid {
  padding: 0 10px 10px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 3px;
}

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

.country-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.country-card {
  padding: 4px 2px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

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

.country-card.all-countries {
  grid-column: 1 / -1;
  background: rgba(100, 200, 255, 0.06);
  border-color: rgba(100, 200, 255, 0.15);
  padding: 5px;
}

.country-card.all-countries:hover {
  background: rgba(100, 200, 255, 0.12);
  border-color: rgba(100, 200, 255, 0.3);
}

/* Continent group header */
.continent-header {
  grid-column: 1 / -1;
  padding: 6px 8px 3px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
  letter-spacing: 1px;
}

.continent-header:first-of-type {
  margin-top: 0;
}

.continent-count {
  font-weight: 400;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  margin-left: 4px;
}

.country-card-name {
  font-size: 10px;
  color: #ddd;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Preview Panel */
#preview-panel {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 500px;
  max-height: 85vh;
  background: rgba(10, 10, 20, 0.93);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  z-index: 20;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-50%) translateX(30px); }
  to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

#preview-panel.hidden {
  display: none;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 12px;
}

#preview-close {
  background: none;
  border: none;
  color: #666;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

#preview-close:hover {
  color: #fff;
}

#preview-content {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0f;
  position: relative;
}

#preview-content img {
  width: 100%;
  display: block;
}

#preview-content iframe {
  width: 100%;
  height: 300px;
  border: none;
}

#preview-content video {
  width: 100%;
  max-height: 360px;
  background: #000;
}

.preview-loading {
  color: #555;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: #7dd3fc;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.preview-error {
  color: #e57373;
  font-size: 13px;
  padding: 30px;
  text-align: center;
}

#preview-info {
  padding: 10px 18px;
  font-size: 11px;
  color: #666;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.preview-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-source {
  color: #555;
  font-size: 10px;
}

.preview-coords {
  color: #444;
  font-size: 10px;
  margin-top: 2px;
  font-family: monospace;
}

/* Nearby Radios in camera popup */
.nearby-radios {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nearby-radios-title {
  font-size: 11px;
  font-weight: 600;
  color: #aaa;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.nearby-radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s;
  border-radius: 4px;
}

.nearby-radio-item:last-child {
  border-bottom: none;
}

.nearby-radio-item:hover {
  background: rgba(255, 215, 0, 0.04);
}

.nearby-radio-item.playing {
  background: rgba(255, 215, 0, 0.08);
}

.nearby-radio-item.playing .nearby-radio-name {
  color: #ffd700;
}

/* 播放失败的媒体项 - 灰色标记 */
.nearby-radio-item.stream-failed {
  opacity: 0.35;
}
.nearby-radio-item.stream-failed .nearby-radio-name {
  text-decoration: line-through;
  color: #666;
}
.nearby-radio-item.stream-failed .nearby-radio-play {
  opacity: 0.3;
  pointer-events: none;
}
.radio-player.stream-failed,
.preview-content-failed {
  opacity: 0.4;
}
/* 侧栏收藏列表中不可用的项 */
.cam-item.stream-failed {
  opacity: 0.35;
}
.cam-item.stream-failed .cam-name {
  color: #666;
  text-decoration: line-through;
}

.nearby-radio-name {
  flex: 1;
  font-size: 11px;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nearby-radio-dist {
  font-size: 9px;
  color: #555;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: monospace;
}

.nearby-radio-play {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.08);
  color: #ffd700;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}

.nearby-radio-play:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.6);
}

/* Scrollbar */
#cam-list::-webkit-scrollbar {
  width: 3px;
}

#cam-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

/* ========== Touch optimization ========== */
body {
  -webkit-tap-highlight-color: transparent;
}

.tf-btn,
.tf-country-btn,
.cam-item,
.fav-btn,
.explore-btn,
.country-card,
.nearby-radio-play,
.radio-play-btn,
.iptv-play-btn,
.atmosphere-play-btn,
.atmosphere-exit,
.user-btn,
.auth-submit-btn,
.paywall-btn,
.paywall-close,
.country-modal-close,
.up-btn,
.up-fav-del,
.up-fav-item-title,
#user-panel-close,
#preview-close,
#auth-modal-close {
  touch-action: manipulation;
}

/* ========== Reduced motion / low-end device optimization ========== */
@media (prefers-reduced-motion: reduce) {
  /* Disable all animations */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Replace backdrop-filter with solid backgrounds for performance */
  #sidebar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 10, 20, 0.96);
  }

  #top-filters {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 10, 20, 0.95);
  }

  #preview-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 10, 20, 0.97);
  }

  .explore-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(30, 30, 50, 0.9);
  }

  .country-modal-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, 0.8);
  }

  .country-modal-content {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(12, 12, 24, 0.99);
  }

  .auth-modal-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, 0.8);
  }

  .auth-modal-content {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(14, 14, 28, 0.99);
  }

  .paywall-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, 0.8);
  }

  .paywall-modal {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(14, 14, 28, 0.99);
  }

  .atmosphere-controls {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, 0.85);
  }

  .atmosphere-exit {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, 0.7);
  }
}

/* ========== Responsive: Tablet & small desktop (max-width: 768px) ========== */
@media (max-width: 768px) {
  #sidebar {
    width: 100%;
    height: auto;
    max-height: 30vh;
    top: auto;
    bottom: 0;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px;
  }

  .sidebar-header h1 { font-size: 18px; }

  #preview-panel {
    right: 8px;
    left: 8px;
    width: auto;
    top: 8px;
    transform: none;
    max-height: 45vh;
  }

  @keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  #cam-list { max-height: 12vh; }
  .legend { display: none; }

  /* top-filters: position above sidebar using bottom + sidebar height */
  #top-filters {
    top: auto;
    bottom: calc(30vh + 8px);
    right: 8px;
    left: 8px;
    gap: 6px;
    padding: 8px;
  }
  .tf-country-btn { width: 100%; text-align: left; }

  .country-modal-content {
    width: 95%;
    max-height: 85vh;
  }

  .country-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Explore button adjusts for bottom sidebar */
  .explore-btn {
    bottom: calc(30vh + 16px);
    padding: 14px 36px;
    font-size: 16px;
    letter-spacing: 3px;
  }

  /* Atmosphere mode controls: stack vertically on narrow screens */
  .atmosphere-controls-inner {
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* ========== Responsive: Small phones (max-width: 480px) ========== */
@media (max-width: 480px) {
  #sidebar {
    max-height: 28vh;
    padding: 10px 12px;
  }

  .sidebar-header h1 {
    font-size: 16px;
    letter-spacing: 2px;
  }

  .subtitle { font-size: 11px; }
  .subtitle-count { font-size: 9px; }

  #stats {
    font-size: 10px;
    padding: 6px 8px;
  }

  #cam-list { max-height: 10vh; }

  .cam-item { padding: 6px 8px; }
  .cam-item .cam-title { font-size: 11px; }
  .cam-item .cam-loc { font-size: 9px; }
  .cam-item .cam-source { font-size: 8px; }

  /* Preview panel: tighter on small screens */
  #preview-panel {
    right: 4px;
    left: 4px;
    top: 4px;
    max-height: 44vh;
    border-radius: 10px;
  }

  .preview-header { padding: 10px 14px; }
  .preview-header h3 { font-size: 13px; }
  #preview-info { padding: 8px 14px; font-size: 10px; }

  /* top-filters: above the sidebar */
  #top-filters {
    bottom: calc(28vh + 6px);
    right: 6px;
    left: 6px;
    padding: 6px 8px;
    gap: 5px;
    border-radius: 10px;
  }

  .tf-label {
    font-size: 9px;
    min-width: 40px;
    letter-spacing: 0.5px;
  }

  .tf-btn {
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 5px;
  }

  .tf-buttons {
    gap: 3px;
    flex-wrap: wrap;
  }

  .tf-country-btn { font-size: 11px; }

  /* Country modal: 2 columns on very small screens */
  .country-modal-content {
    width: 98%;
    max-height: 88vh;
    border-radius: 12px;
  }

  .country-modal-header { padding: 10px 14px 8px; }
  .country-modal-header h2 { font-size: 13px; }
  .country-modal-search { padding: 6px 12px; }
  .country-modal-search input { padding: 6px 10px; font-size: 12px; }

  .country-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    padding: 0 8px 8px;
  }

  .country-card { padding: 5px 3px; }
  .country-card-name { font-size: 10px; }
  .continent-header { font-size: 10px; padding: 5px 6px 2px; }

  /* Explore button: smaller on phones */
  .explore-btn {
    bottom: calc(28vh + 12px);
    padding: 12px 28px;
    font-size: 14px;
    letter-spacing: 2px;
    border-radius: 30px;
  }

  .explore-btn:hover {
    letter-spacing: 4px;
  }

  /* Radio player compact */
  .radio-player { padding: 16px; gap: 8px; }
  .radio-favicon { width: 48px; height: 48px; border-radius: 8px; }
  .radio-name { font-size: 13px; }
  .radio-play-btn { width: 42px; height: 42px; font-size: 16px; }
  .radio-volume { width: 80px; }

  /* Auth modal */
  .auth-modal-content { border-radius: 12px; }
  .auth-modal-header { padding: 14px 18px 10px; }
  .auth-modal-header h2 { font-size: 16px; }
  .auth-form { padding: 16px 18px 20px; gap: 10px; }
  .auth-form input { padding: 10px 14px; font-size: 13px; }

  /* Paywall modal */
  .paywall-modal { padding: 28px 24px 22px; border-radius: 12px; }
  .paywall-icon { font-size: 40px; }
  .paywall-title { font-size: 18px; }
  .paywall-usage { font-size: 13px; }
  .paywall-features { padding: 12px 16px; }

  /* Atmosphere mode */
  .atmosphere-controls { padding: 14px 16px; }
  .atmosphere-controls-inner {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  .atmosphere-radio-info { justify-content: center; }
  .atmosphere-playback { justify-content: center; }
  .atmosphere-location { justify-content: center; }
  .atmosphere-volume { width: 100%; }

  /* Nearby radios compact */
  .nearby-radio-name { font-size: 10px; }
  .nearby-radio-dist { font-size: 8px; }
  .nearby-radio-play { width: 22px; height: 22px; font-size: 9px; }
}

/* ========== Auth UI ========== */

/* User button in sidebar header */
#user-area {
  position: absolute;
  top: 12px;
  right: 0;
}

.user-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #889;
  font-size: 11px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-btn:hover {
  background: rgba(100, 200, 255, 0.1);
  border-color: rgba(100, 200, 255, 0.3);
  color: #aab;
}

.user-btn.logged-in {
  background: rgba(100, 200, 255, 0.12);
  border-color: rgba(100, 200, 255, 0.3);
  color: #7dd3fc;
}

/* Auth Modal */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal.hidden {
  display: none;
}

.auth-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.auth-modal-content {
  position: relative;
  width: 360px;
  max-width: 90vw;
  background: rgba(14, 14, 28, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  animation: modalFadeIn 0.2s ease-out;
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

#auth-modal-close {
  background: none;
  border: none;
  color: #666;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

#auth-modal-close:hover {
  color: #fff;
}

.auth-error {
  color: #ef5350;
  font-size: 12px;
  padding: 0 24px;
  min-height: 0;
  transition: all 0.2s;
}

.auth-error:not(:empty) {
  padding: 8px 24px;
  background: rgba(229, 57, 53, 0.08);
}

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

.auth-form.hidden {
  display: none;
}

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

.auth-form input:focus {
  border-color: rgba(100, 200, 255, 0.5);
  background: rgba(100, 200, 255, 0.04);
  box-shadow: 0 0 12px rgba(100, 200, 255, 0.08);
}

.auth-form input::placeholder {
  color: #556;
}

.auth-submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.2) 0%, rgba(120, 80, 220, 0.15) 100%);
  border: 1px solid rgba(100, 200, 255, 0.3);
  border-radius: 10px;
  color: #7dd3fc;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.3) 0%, rgba(120, 80, 220, 0.25) 100%);
  border-color: rgba(100, 200, 255, 0.5);
  color: #fff;
  box-shadow: 0 4px 20px rgba(100, 200, 255, 0.15);
}

.auth-success {
  color: #4caf50;
  font-size: 13px;
  text-align: center;
  min-height: 0;
  padding: 0 24px;
  transition: all 0.2s;
}

.auth-success:not(:empty) {
  padding: 8px 24px;
  background: rgba(76, 175, 80, 0.08);
}

.auth-hint {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
}

.auth-hint a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-hint a:hover {
  color: #00bcd4;
  text-decoration: underline;
}

.auth-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== Atmosphere Mode (Immersive) ========== */

.atmosphere-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 0;
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.12) 0%, rgba(160, 100, 240, 0.10) 100%);
  border: 1px solid rgba(100, 200, 255, 0.25);
  border-radius: 10px;
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.atmosphere-btn:hover {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.22) 0%, rgba(160, 100, 240, 0.18) 100%);
  border-color: rgba(100, 200, 255, 0.5);
  color: #fff;
  box-shadow: 0 0 20px rgba(100, 200, 255, 0.12);
}

.atmosphere-mode {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: atmosphereFadeIn 0.5s ease-out;
}

@keyframes atmosphereFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.atmosphere-media-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.atmosphere-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

iframe.atmosphere-media {
  border: none;
}

.atmosphere-error {
  color: #666;
  font-size: 16px;
  text-align: center;
  padding: 40px;
}

.atmosphere-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 28px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 310;
  pointer-events: none;
}

.atmosphere-controls.visible {
  opacity: 1;
  pointer-events: auto;
}

.atmosphere-controls-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.atmosphere-radio-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.atmosphere-radio-icon {
  font-size: 18px;
  flex-shrink: 0;
}

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

.atmosphere-playback {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.atmosphere-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.6);
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.atmosphere-play-btn:hover {
  background: rgba(255, 215, 0, 0.25);
  border-color: #ffd700;
}

.atmosphere-volume {
  width: 90px;
  accent-color: #ffd700;
}

.atmosphere-location {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.atmosphere-loc-icon {
  font-size: 14px;
  flex-shrink: 0;
}

#atmo-loc-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.atmosphere-exit {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 320;
  line-height: 1;
}

.atmosphere-exit:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* ========== Paywall Modal ========== */

.paywall-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paywall-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.paywall-modal {
  position: relative;
  width: 400px;
  max-width: 90vw;
  background: rgba(14, 14, 28, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 36px 32px 28px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  animation: modalFadeIn 0.2s ease-out;
}

.paywall-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #666;
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.paywall-close:hover {
  color: #fff;
}

.paywall-icon {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1;
}

.paywall-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.paywall-usage {
  font-size: 14px;
  color: #999;
  margin-bottom: 20px;
}

.paywall-usage strong {
  color: #ef5350;
}

.paywall-features {
  text-align: left;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.paywall-features h3 {
  font-size: 13px;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 10px;
}

.paywall-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.paywall-features li {
  font-size: 13px;
  color: #aaa;
  padding: 4px 0;
  line-height: 1.5;
}

.paywall-btn {
  display: inline-block;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(255, 180, 50, 0.25) 0%, rgba(255, 120, 50, 0.2) 100%);
  border: 1px solid rgba(255, 180, 50, 0.4);
  border-radius: 10px;
  color: #ffb732;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.paywall-btn:hover {
  background: linear-gradient(135deg, rgba(255, 180, 50, 0.4) 0%, rgba(255, 120, 50, 0.35) 100%);
  border-color: rgba(255, 180, 50, 0.6);
  color: #fff;
  box-shadow: 0 4px 24px rgba(255, 150, 50, 0.2);
}

.paywall-register {
  margin-top: 16px;
  font-size: 12px;
  color: #666;
}

.paywall-register a {
  color: #7dd3fc;
  text-decoration: none;
  transition: color 0.2s;
}

.paywall-register a:hover {
  color: #a78bfa;
}

/* ========== User Panel (right slide-in) ========== */
.user-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  height: 100vh;
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}
.user-panel.hidden {
  display: none;
}

.user-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.user-panel-header h2 {
  margin: 0;
  font-size: 18px;
  color: #fff;
  font-weight: 600;
}
.user-panel-header button {
  background: none;
  border: none;
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}
.user-panel-header button:hover { color: #fff; }

.user-panel-body {
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

.up-section {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.up-section-title {
  font-size: 14px;
  color: #aaa;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* Account info */
.up-info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}
.up-label { color: #888; }
.up-info-row span:last-child { color: #ddd; }

/* Favorites list */
.up-fav-count {
  background: rgba(0, 188, 212, 0.2);
  color: #00bcd4;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  margin-left: 6px;
  vertical-align: middle;
}
.up-fav-list {
  max-height: 300px;
  overflow-y: auto;
}
.up-fav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: #ccc;
}
.up-fav-item:last-child { border-bottom: none; }
.up-fav-item-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s;
}
.up-fav-item-title:hover { color: #00bcd4; }
.up-fav-del {
  background: none;
  border: none;
  color: #666;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  margin-left: 8px;
  transition: color 0.15s;
}
.up-fav-del:hover { color: #ff5252; }
.up-fav-empty {
  color: #666;
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}

/* Password form */
.up-pwd-form input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.up-pwd-form input:focus {
  outline: none;
  border-color: #00bcd4;
}

.up-btn {
  width: 100%;
  padding: 10px;
  background: #00bcd4;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.up-btn:hover { background: #00a5bb; }
.up-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.up-logout-section {
  padding-top: 20px;
}
.up-logout-btn {
  background: transparent;
  border: 1px solid rgba(255, 82, 82, 0.4);
  color: #ff5252;
}
.up-logout-btn:hover {
  background: rgba(255, 82, 82, 0.1);
  border-color: #ff5252;
}

.up-msg {
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
  min-height: 18px;
}
.up-msg.success { color: #4caf50; }
.up-msg.error { color: #ff5252; }

/* Mobile: user panel full width */
@media (max-width: 768px) {
  .user-panel { width: 100%; }
}

/* Reduced motion for user panel */
@media (prefers-reduced-motion: reduce) {
  .user-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(20, 20, 30, 0.98);
  }
}
