/* Main Layout & Theme Global Elements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Custom Sleek Dark Scrollbars (No White OS Lines) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color, #eb2f5f);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Canvas & Ambient Gradients */
#nebula-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 10%, rgba(235, 47, 95, 0.08) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: -2;
}

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
}

/* Container */
.app-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 86px 20px 40px;
}

/* Announcement Banner Inside Container */
.global-announcement-banner {
  width: 100%;
  padding: 12px 20px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease;
}

/* Floating Navigation Bar */
.floating-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent-color);
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.nav-btn.active {
  color: #fff;
  background: var(--accent-color);
  box-shadow: 0 0 16px var(--accent-color);
}

.nav-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
}

/* Page Views */
.page-view {
  display: none;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header Title Section */
.header-title-section {
  text-align: center;
  margin-bottom: 24px;
}

.header-title-section h1 {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--text-main), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Clean, Minimalist Profile Strip with Safe Stacking Context */
.profile-strip {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
  gap: 12px;
}

.profile-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.profile-left:hover {
  background: rgba(255, 255, 255, 0.06);
}

.profile-tag {
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--accent-color);
  font-size: 0.82rem;
}

.profile-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Dropdown Menu Component - Always on Top */
.dropdown-wrap {
  position: relative;
  display: inline-block;
  z-index: 1000;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #141726 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: var(--radius-md);
  padding: 8px;
  width: 210px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 20px rgba(0, 0, 0, 0.8) !important;
  z-index: 99999 !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeIn 0.2s ease;
}

.dropdown-item {
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-color);
  transform: translateX(2px);
}

/* Buttons & Pills */
.btn-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-pill.primary {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
  box-shadow: 0 4px 14px rgba(235, 47, 95, 0.35);
}

.btn-pill.primary:hover {
  filter: brightness(1.1);
}

.btn-small {
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-small.vip {
  background: #f59e0b;
  color: #000;
}

.btn-small.danger, .btn-small.ban {
  background: #ef4444;
  color: #fff;
}

.btn-small.unban {
  background: #10b981;
  color: #fff;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-main);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-color);
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-color);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* PRO Floating Music Player Dock */
.pro-music-dock {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  background: linear-gradient(145deg, rgba(20, 24, 38, 0.96), rgba(12, 14, 22, 0.98));
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(251, 191, 36, 0.2);
  z-index: 9990;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.music-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.music-provider-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 16px 4px;
}

.music-provider-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.music-provider-btn.active {
  background: rgba(251, 191, 36, 0.2);
  border-color: #fbbf24;
  color: #fbbf24;
}

.music-track-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 16px;
  max-height: 140px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(251, 191, 36, 0.3) transparent;
}

.music-track-list::-webkit-scrollbar {
  width: 5px;
}

.music-track-list::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.3);
  border-radius: 99px;
}

.music-track-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: all 0.15s ease;
}

.music-track-item:hover, .music-track-item.active {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.music-track-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Community Polls Cards */
.poll-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

.poll-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
}

.poll-total-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.poll-question {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 14px;
}

.poll-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.poll-option-btn {
  position: relative;
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s ease;
}

.poll-option-btn:hover {
  border-color: var(--accent-color);
}

.poll-option-btn.voted {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.poll-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(235, 47, 95, 0.25), rgba(99, 102, 241, 0.25));
  z-index: 1;
  transition: width 0.4s ease;
}

.poll-option-btn.voted .poll-bar-fill {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.3), rgba(99, 102, 241, 0.3));
}

.poll-option-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.poll-option-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

.poll-option-pct {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.poll-footer {
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
}

/* Chat Header Tabs for DMs & Rooms */
.chat-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.chat-mode-tab {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-mode-tab.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

/* PRO Glowing Animated Chat Name Effects */
.glow-gold {
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.7), 0 0 20px rgba(251, 191, 36, 0.4);
}

.glow-rainbow {
  background: linear-gradient(90deg, #ff0077, #7928ca, #0070f3, #00dfd8, #7928ca, #ff0077);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowGlow 4s ease infinite;
  filter: drop-shadow(0 0 6px rgba(255, 0, 119, 0.6));
}

@keyframes rainbowGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.glow-cyan {
  color: #00f0ff !important;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.8), 0 0 22px rgba(0, 240, 255, 0.5);
}

.glow-fire {
  color: #ff4500 !important;
  text-shadow: 0 0 10px rgba(255, 69, 0, 0.8), 0 0 22px rgba(255, 140, 0, 0.6);
}

.glow-emerald {
  color: #10b981 !important;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.8), 0 0 22px rgba(16, 185, 129, 0.5);
}

.glow-purple {
  color: #a855f7 !important;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.8), 0 0 22px rgba(168, 85, 247, 0.5);
}

.custom-flair-badge {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(235, 47, 95, 0.2));
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  text-shadow: none;
}
