:root {
  --bg-primary: #060614;
  --bg-secondary: #0f0b23;
  --bg-elevated: rgba(36, 24, 77, 0.8);
  --bg-blur: rgba(15, 11, 35, 0.72);
  --brand-gradient: linear-gradient(135deg, #a855f7, #facc15);
  --accent: #c084fc;
  --accent-strong: #fbbf24;
  --text-primary: #f5f5ff;
  --text-secondary: #d4d4f7;
  --text-muted: #9ca3c9;
  --border-soft: rgba(168, 85, 247, 0.25);
  --glow: 0 0 35px rgba(168, 85, 247, 0.45);
  --shadow-elevated: 0 18px 45px rgba(8, 7, 17, 0.55);
  font-size: 16px;
}

body.theme-light {
  --bg-primary: #f7f6ff;
  --bg-secondary: #ffffff;
  --bg-elevated: rgba(255, 255, 255, 0.82);
  --bg-blur: rgba(248, 246, 255, 0.72);
  --brand-gradient: linear-gradient(135deg, #6366f1, #a855f7);
  --accent: #7c3aed;
  --accent-strong: #ec4899;
  --text-primary: #1f1147;
  --text-secondary: #3c2c78;
  --text-muted: #7a6ab5;
  --border-soft: rgba(99, 102, 241, 0.25);
  --glow: 0 0 28px rgba(99, 102, 241, 0.28);
  --shadow-elevated: 0 18px 45px rgba(120, 113, 198, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, rgba(40, 27, 83, 0.5), transparent 50%), var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

body.theme-light {
  background: radial-gradient(circle at top, rgba(234, 229, 255, 0.85), transparent 55%), var(--bg-primary);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(6, 5, 16, 0.92);
  backdrop-filter: blur(18px);
  z-index: 2000;
}

.auth-card {
  width: min(420px, 100%);
  background: rgba(15, 11, 35, 0.95);
  border-radius: 26px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid rgba(168, 85, 247, 0.25);
  box-shadow: 0 32px 65px rgba(8, 7, 17, 0.65);
  position: relative;
}

.auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.auth-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.auth-card h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
}

.auth-subtitle {
  margin: 0 0 1.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.auth-feedback {
  margin-bottom: 1.2rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  background: rgba(14, 18, 35, 0.78);
  color: #bfdbfe;
  font-size: 0.9rem;
}

.auth-feedback[hidden] {
  display: none;
}

.auth-feedback.error {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.auth-feedback.success {
  border-color: rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-form label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-form input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 9, 27, 0.85);
  color: #fff;
  font-size: 0.95rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.cta.full {
  width: 100%;
  justify-content: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.4rem 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.google-login {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 9, 27, 0.9);
  color: #fff;
  font-weight: 500;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: transform 0.3s ease, border 0.3s ease;
}

.google-login:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.google-login img {
  width: 22px;
  height: 22px;
}

.app-shell {
  backdrop-filter: saturate(140%) blur(18px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3.5vw;
  background: rgba(7, 6, 18, 0.95);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(20px);
  /* Instagram-style: always visible, no hiding */
  transform: translateY(0) !important;
  transition: background 0.3s ease;
}

/* Navbar hiding removed - Instagram style always visible */

.login-btn {
  color: #10b981;
  transition: all 0.2s ease;
}

.login-btn:hover {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  transform: translateY(-1px);
}

.logout-btn {
  color: #ef4444;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  transform: translateY(-1px);
}

/* Bad word popup */
.bad-word-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.popup-content {
  background: var(--bg-primary);
  border: 1px solid var(--border-soft);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.popup-content h3 {
  color: #ef4444;
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
}

.popup-content p {
  color: var(--text-primary);
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

.popup-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popup-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

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

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.connection-status.connected {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.connection-status.connecting {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

.connection-status.warning {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

.connection-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.status-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.status-indicator.connected {
  background: #22c55e;
  box-shadow: 0 0 0.5rem rgba(34, 197, 94, 0.3);
}

.status-indicator.connecting {
  background: #fbbf24;
  animation: pulse 1.5s ease-in-out infinite;
}

.status-indicator.warning {
  background: #fbbf24;
  animation: pulse 1s ease-in-out infinite;
}

.status-indicator.error {
  background: #ef4444;
  animation: pulse 0.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Retry button styles */
.retry-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
}

.retry-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(180deg);
}

.retry-btn svg {
  width: 16px;
  height: 16px;
}

.auth-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 0.75rem;
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
}

.loading-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(168, 85, 247, 0.2);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 17, 35, 0.7);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.45);
}

.icon-btn.primary {
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.4);
}

.theme-toggle {
  overflow: hidden;
}

.theme-toggle .theme-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .moon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6) rotate(-12deg);
}

.theme-toggle .theme-icon path {
  fill: currentColor;
}

.icon-btn.notification .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f43f5e;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.35);
}

.top-nav .nav-session {
  margin-left: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.nav-session strong {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.4rem calc(env(safe-area-inset-bottom) + 0.85rem);
  background: rgba(9, 8, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -24px 55px rgba(6, 4, 20, 0.5);
  backdrop-filter: blur(24px);
  z-index: 999;
}

.bottom-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 72px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  cursor: pointer;
  gap: 0.35rem;
  transition: color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.bottom-link .icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: rgba(168, 85, 247, 0.08);
  backdrop-filter: blur(8px);
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.22));
}

.bottom-link .icon svg {
  width: 22px;
  height: 22px;
  fill: rgba(255, 255, 255, 0.65);
  transition: fill 0.25s ease;
}

.bottom-link .label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: currentColor;
}

.bottom-link .label span:first-child {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.bottom-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: rgba(168, 85, 247, 0.18);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: -1;
}

.bottom-link.active,
.bottom-link:hover {
  color: #fff;
  transform: translateY(-4px);
}

.bottom-link.active .icon svg,
.bottom-link:hover .icon svg {
  fill: #f9fafb;
}

.bottom-link.active::after,
.bottom-link:hover::after {
  opacity: 1;
  transform: scale(1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.6));
}

.brand-name {
  font-size: 1.05rem;
}




.cta {
  cursor: pointer;
  background: rgba(15, 11, 35, 0.7);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
}


main {
  flex: 1;
  padding: 5rem 3.5vw 5rem;
  position: relative;
  margin-top: 0;
  overflow-y: auto;
  height: calc(100vh - 5rem);
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

.panel {
  margin-bottom: 4rem;
  padding: 2.5rem;
  background: var(--bg-blur);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  box-shadow: var(--shadow-elevated);
}

.home-panel {
  background: linear-gradient(145deg, rgba(8, 7, 22, 0.92), rgba(20, 10, 40, 0.92));
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.8rem;
}

.hero-tagline {
  color: var(--text-secondary);
  max-width: 32rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.cta.primary {
  background: var(--brand-gradient);
  border: none;
  color: #120a2a;
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.45);
}

.cta.secondary {
  background: transparent;
}

.cta.tertiary {
  background: rgba(250, 204, 21, 0.14);
  border-color: rgba(250, 204, 21, 0.4);
  color: #fde68a;
}

.live-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  margin: 0;
}

.live-stats dt {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-stats dd {
  margin: 0.3rem 0 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.orbit {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.18), transparent 60%);
  animation: spin 18s linear infinite;
  box-shadow: 0 24px 60px rgba(120, 69, 255, 0.28);
}

.orbit::before {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(79, 70, 229, 0.18), transparent 70%);
  filter: blur(18px);
  opacity: 0.8;
}

.orbit::after {
  content: '';
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  border: 1px dashed rgba(250, 204, 21, 0.2);
  opacity: 0.4;
}

.orbit-card {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 140px;
  padding: 0.7rem 1rem;
  background: linear-gradient(140deg, rgba(67, 56, 202, 0.85), rgba(236, 72, 153, 0.82));
  border-radius: 14px;
  border: 1px solid rgba(250, 204, 21, 0.25);
  box-shadow: var(--shadow-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  --angle: 0deg;
  --orbit-radius: 140px;
  --orbit-speed: 18s;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--orbit-radius)));
  animation: orbit-card-spin var(--orbit-speed) linear infinite;
}

.orbit-card span {
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.02em;
  transform: rotate(calc(-1 * var(--angle)));
  animation: orbit-card-counter var(--orbit-speed) linear infinite;
}

.orbit-card:nth-child(1) { --angle: 0deg; }
.orbit-card:nth-child(2) { --angle: 90deg; }
.orbit-card:nth-child(3) { --angle: 180deg; }
.orbit-card:nth-child(4) { --angle: 270deg; }

.orbit-card:nth-child(2),
.orbit-card:nth-child(4) {
  --orbit-speed: 22s;
}

.pulse {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4), transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

.home-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 2.5rem;
}

.feed {
  background: rgba(10, 8, 26, 0.85);
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 1.8rem;
  box-shadow: var(--shadow-elevated);
}

.feed header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.feed h2 {
  margin: 0;
}

.feed-filters {
  display: flex;
  gap: 0.5rem;
}

.filter {
  background: rgba(14, 13, 30, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.filter.active {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #151022;
}

.feed-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.2rem;
}

.feed-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  background: rgba(17, 14, 35, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 18px;
  padding: 1rem 1.2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feed-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.22);
}

.feed-card .badge {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge.news { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
.badge.event { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
.badge.alert { background: rgba(248, 113, 113, 0.18); color: #fca5a5; }

.feed-card strong {
  font-size: 1rem;
}

.feed-card time {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.feed-card button {
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  padding: 0.35rem 0.9rem;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s ease;
}

.feed-card button:hover {
  background: rgba(168, 85, 247, 0.15);
}

.secondary {
  display: grid;
  gap: 1.5rem;
}

.secondary section {
  background: rgba(16, 12, 32, 0.75);
  border-radius: 18px;
  padding: 1.5rem;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.secondary h3 {
  margin: 0 0 1rem;
}

#events-list,
.stage-queue,
.status-list,
.menu-list,
.buzz-list,
.timeline,
.badge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.live-events li,
.pulse-list li,
.stage-queue li,
.status-list li,
.buzz-list li,
.timeline li {
  background: rgba(10, 9, 24, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.live-events time {
  font-size: 0.8rem;
  color: var(--accent);
}


.section-header {
  margin-bottom: 1.8rem;
}

.section-header h2 {
  margin: 0 0 0.6rem;
  font-size: 2rem;
  letter-spacing: 0.04em;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 40rem;
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 1.8rem;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.three-col {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: rgba(12, 9, 25, 0.85);
  border-radius: 20px;
  padding: 1.8rem;
  border: 1px solid rgba(99, 102, 241, 0.25);
  box-shadow: var(--shadow-elevated);
}

.vibe-meter {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  justify-content: center;
}

.vibe-bar {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: rgba(24, 19, 45, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.3);
  overflow: hidden;
}

.vibe-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #fde68a, #f97316);
  width: 42%;
  transition: width 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.status-list li {
  position: relative;
  padding-left: 2.6rem;
}

.status-list li::before {
  content: attr(data-status);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.65);
}

.status-list li.busy::before { background: #f97316; box-shadow: 0 0 12px rgba(249, 115, 22, 0.6); }
.status-list li.full::before { background: #ef4444; box-shadow: 0 0 12px rgba(239, 68, 68, 0.6); }
.status-list li.buzzing::before { background: #facc15; box-shadow: 0 0 12px rgba(250, 204, 21, 0.6); }
.status-list li.calm::before { background: #60a5fa; box-shadow: 0 0 12px rgba(96, 165, 250, 0.55); }


.queue-status {
  display: grid;
  gap: 1rem;
}

.queue-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  background: rgba(8, 6, 18, 0.88);
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.queue-card strong {
  font-size: 1rem;
}

.queue-card span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.profile-card {
  background: rgba(12, 9, 25, 0.9);
  border-radius: 22px;
  padding: 2rem;
  border: 1px solid rgba(250, 204, 21, 0.25);
  box-shadow: 0 20px 45px rgba(250, 204, 21, 0.15);
}

.profile-header {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--brand-gradient);
  display: grid;
  place-items: center;
  color: #120d2a;
  font-weight: 700;
  font-size: 1.4rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 600;
}

.profile-timeline,
.profile-groups {
  background: rgba(12, 9, 25, 0.8);
  border-radius: 20px;
  padding: 1.8rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: var(--shadow-elevated);
}

.timeline li {
  position: relative;
  padding-left: 1.5rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.2rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.7);
}

.badge-list li {
  background: rgba(15, 10, 34, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-weight: 500;
}

.chat-panel {
  margin-top: 2.5rem;
  background: rgba(11, 8, 24, 0.92);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 22px;
  box-shadow: 0 24px 55px rgba(8, 7, 20, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.6rem 1rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.chat-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.chat-header span {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.chat-locked {
  margin: 0 1.6rem 0.8rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(79, 70, 229, 0.12);
  color: #c7d2fe;
  font-size: 0.9rem;
}

.chat-panel:not(.locked) .chat-locked {
  display: none;
}

.chat-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.6rem;
  max-height: 420px;
}

.chat-messages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

.chat-load-more {
  align-self: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 255, 0.4);
  background: rgba(15, 16, 40, 0.8);
  color: #c7d2fe;
  font-size: 0.78rem;
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease;
}

.chat-load-more:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 255, 0.65);
}

.chat-message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.chat-message.mine {
  align-items: flex-end;
}

.chat-bubble {
  max-width: min(420px, 80%);
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(65, 57, 114, 0.75);
  border: 1px solid rgba(148, 163, 255, 0.35);
  box-shadow: 0 16px 35px rgba(15, 13, 35, 0.45);
  word-break: break-word;
  line-height: 1.45;
}

.chat-text {
  margin: 0;
}

.chat-message.mine .chat-bubble {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(236, 72, 153, 0.85));
  border-color: transparent;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.chat-attachments {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.chat-attachments img,
.chat-attachments video {
  max-width: 220px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 255, 0.25);
  box-shadow: 0 12px 28px rgba(14, 14, 35, 0.45);
}

.chat-attachments a {
  color: #93c5fd;
  text-decoration: none;
  font-size: 0.85rem;
}

.chat-composer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.6rem 1.4rem;
  border-top: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(8, 6, 20, 0.85);
}

.chat-composer textarea {
  resize: none;
  border: none;
  background: rgba(16, 14, 35, 0.9);
  color: var(--text-primary);
  border-radius: 16px;
  padding: 0.8rem 1rem;
  min-height: 44px;
  max-height: 120px;
  line-height: 1.4;
  font-family: inherit;
}

.chat-composer textarea:focus {
  outline: 2px solid rgba(129, 140, 248, 0.8);
  outline-offset: 2px;
}

.file-attach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px dashed rgba(129, 140, 248, 0.5);
  background: rgba(14, 13, 35, 0.9);
  color: #a5b4fc;
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease;
}

.file-attach input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.file-attach svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.file-attach:hover {
  transform: translateY(-1px);
  border-color: rgba(129, 140, 248, 0.8);
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.attachment-count {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.2);
  color: #c7d2fe;
  font-size: 0.75rem;
}

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 35px rgba(124, 58, 237, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.send-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(124, 58, 237, 0.45);
}

.chat-panel.locked .chat-composer,
.chat-panel.locked .chat-body {
  opacity: 0.55;
  pointer-events: none;
}

.site-footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
}

body.theme-light .theme-toggle .sun {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6) rotate(12deg);
}

body.theme-light .theme-toggle .moon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

body.theme-light .auth-overlay {
  background: rgba(248, 246, 255, 0.92);
  color: var(--text-primary);
}

body.theme-light .auth-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(129, 140, 248, 0.2);
  box-shadow: 0 32px 60px rgba(148, 163, 255, 0.25);
}

body.theme-light .auth-close {
  background: rgba(124, 58, 237, 0.1);
  color: var(--text-primary);
}

body.theme-light .auth-close:hover {
  background: rgba(124, 58, 237, 0.18);
}

body.theme-light .auth-divider {
  color: rgba(63, 56, 110, 0.4);
}

body.theme-light .auth-form input {
  border-color: rgba(129, 140, 248, 0.25);
  background: rgba(244, 243, 255, 0.95);
  color: var(--text-primary);
}

body.theme-light .auth-form input:focus {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

body.theme-light .app-shell {
  backdrop-filter: saturate(130%) blur(18px);
}

body.theme-light .top-nav {
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(99, 102, 241, 0.18);
  box-shadow: 0 12px 32px rgba(148, 163, 255, 0.18);
}

body.theme-light .nav-session {
  color: var(--text-secondary);
}

body.theme-light .nav-session strong {
  color: var(--text-primary);
}

body.theme-light .icon-btn {
  border-color: rgba(99, 102, 241, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-secondary);
  box-shadow: 0 10px 24px rgba(148, 163, 255, 0.18);
}

body.theme-light .icon-btn:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

body.theme-light .icon-btn.primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 16px 30px rgba(99, 102, 241, 0.32);
  color: #fff;
}

body.theme-light .theme-toggle {
  color: var(--text-secondary);
}

body.theme-light .brand-name {
  color: var(--text-primary);
}

body.theme-light .home-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(232, 228, 255, 0.92));
}

body.theme-light .pulse {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35), transparent 70%);
}

body.theme-light .orbit {
  background: radial-gradient(circle at center, rgba(124, 58, 237, 0.16), transparent 60%);
  box-shadow: 0 24px 60px rgba(124, 58, 237, 0.2);
  border-color: rgba(99, 102, 241, 0.25);
}

body.theme-light .orbit::after {
  border-color: rgba(99, 102, 241, 0.2);
}

body.theme-light .orbit-card {
  background: linear-gradient(140deg, rgba(99, 102, 241, 0.85), rgba(236, 72, 153, 0.78));
  border-color: rgba(236, 72, 153, 0.3);
}

body.theme-light .panel {
  box-shadow: 0 20px 45px rgba(148, 163, 255, 0.16);
}

body.theme-light .feed {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 255, 0.25);
  box-shadow: 0 18px 40px rgba(148, 163, 255, 0.16);
}

body.theme-light .feed-card {
  background: rgba(244, 243, 255, 0.96);
  border: 1px solid rgba(148, 163, 255, 0.28);
  box-shadow: 0 22px 40px rgba(148, 163, 255, 0.22);
}

body.theme-light .feed-card button {
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--accent);
}

body.theme-light .feed-card button:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #fff;
}

body.theme-light .filter {
  background: rgba(236, 234, 255, 0.9);
  border-color: rgba(148, 163, 255, 0.25);
  color: var(--text-secondary);
}

body.theme-light .filter.active {
  color: #fff;
}

body.theme-light .badge.news { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; }
body.theme-light .badge.event { background: rgba(16, 185, 129, 0.15); color: #047857; }
body.theme-light .badge.alert { background: rgba(248, 113, 113, 0.18); color: #b91c1c; }

body.theme-light .secondary section,
body.theme-light .card,
body.theme-light .profile-timeline,
body.theme-light .profile-groups,
body.theme-light .badge-list li,
body.theme-light .queue-card,
body.theme-light .live-events li,
body.theme-light .pulse-list li,
body.theme-light .stage-queue li,
body.theme-light .status-list li,
body.theme-light .buzz-list li,
body.theme-light .timeline li {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 255, 0.25);
  box-shadow: 0 18px 36px rgba(148, 163, 255, 0.12);
  color: var(--text-primary);
}

body.theme-light .vibe-bar {
  background: rgba(229, 226, 255, 0.9);
  border: 1px solid rgba(148, 163, 255, 0.35);
}

body.theme-light .profile-card {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(250, 204, 21, 0.35);
  box-shadow: 0 24px 52px rgba(250, 204, 21, 0.2);
  color: var(--text-primary);
}

body.theme-light .chat-panel {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(148, 163, 255, 0.25);
  box-shadow: 0 24px 48px rgba(148, 163, 255, 0.18);
}

body.theme-light .chat-header {
  border-bottom: 1px solid rgba(148, 163, 255, 0.25);
}

body.theme-light .chat-locked {
  background: rgba(236, 234, 255, 0.92);
  color: var(--text-secondary);
}

body.theme-light .chat-load-more {
  background: rgba(236, 233, 255, 0.95);
  color: #4338ca;
  border: 1px solid rgba(148, 163, 255, 0.4);
}

body.theme-light .chat-bubble {
  background: rgba(243, 240, 255, 0.95);
  border: 1px solid rgba(148, 163, 255, 0.4);
  box-shadow: 0 18px 35px rgba(148, 163, 255, 0.2);
  color: var(--text-primary);
}

body.theme-light .chat-message.mine .chat-bubble {
  color: #fff;
}

body.theme-light .chat-meta {
  color: #6b5ea6;
}

body.theme-light .chat-attachments img,
body.theme-light .chat-attachments video {
  border-color: rgba(148, 163, 255, 0.35);
  box-shadow: 0 12px 26px rgba(148, 163, 255, 0.2);
}

body.theme-light .chat-attachments a {
  color: #4f46e5;
}

body.theme-light .chat-composer {
  background: rgba(243, 240, 255, 0.96);
  border-top: 1px solid rgba(148, 163, 255, 0.25);
}

body.theme-light .chat-composer textarea {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
}

body.theme-light .file-attach {
  border-color: rgba(148, 163, 255, 0.45);
  background: rgba(237, 233, 255, 0.9);
  color: #4f46e5;
}

body.theme-light .attachment-count {
  background: rgba(99, 102, 241, 0.16);
  color: #4338ca;
}

body.theme-light .send-btn {
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.3);
}

body.theme-light .bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 255, 0.25);
  box-shadow: 0 -24px 50px rgba(148, 163, 255, 0.2);
}

body.theme-light .bottom-link {
  color: rgba(71, 63, 120, 0.75);
}

body.theme-light .bottom-link .icon {
  background: rgba(124, 58, 237, 0.12);
  box-shadow: 0 8px 16px rgba(124, 58, 237, 0.12);
}

body.theme-light .bottom-link .icon svg {
  fill: rgba(71, 63, 120, 0.75);
}

body.theme-light .bottom-link.active,
body.theme-light .bottom-link:hover {
  color: var(--accent);
}

body.theme-light .bottom-link .label span:first-child {
  color: rgba(71, 63, 120, 0.55);
}

body.theme-light .bottom-link::after {
  background: rgba(124, 58, 237, 0.16);
}

body.theme-light .bottom-link.active .icon svg,
body.theme-light .bottom-link:hover .icon svg {
  fill: var(--accent);
}

body.theme-light .bottom-link.active::after {
  background: var(--accent);
}

body.theme-light .site-footer {
  color: rgba(71, 63, 120, 0.6);
}

@media (max-width: 1080px) {
  .top-nav {
    gap: 1rem;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .live-stats {
    justify-items: center;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 15px;
  }

  .top-nav {
    padding: 0.9rem 1.2rem;
    flex-direction: column;
    gap: 0.6rem;
  }

  .nav-actions {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .top-nav .nav-session {
    margin-left: 0;
    font-size: 0.85rem;
  }

  main {
    padding: 2rem 1.2rem 7.5rem;
  }

  .panel {
    padding: 1.6rem;
  }

  .bottom-nav {
    left: 0;
    transform: none;
    width: 100%;
    border-radius: 18px 18px 0 0;
    padding: 0.55rem 1.2rem calc(0.55rem + env(safe-area-inset-bottom));
    gap: 0.45rem;
  }

  .bottom-link {
    width: 64px;
    height: 60px;
  }

  .bottom-link .icon {
    width: 30px;
    height: 30px;
  }

  .bottom-link .label {
    font-size: 0.6rem;
  }

  .chat-body {
    max-height: 320px;
    padding: 0.8rem 1.1rem;
  }

  .chat-composer {
    padding: 0.75rem 1.1rem 1rem;
  }

  .file-attach,
  .send-btn {
    width: 38px;
    height: 38px;
  }

  /* Enhanced mobile responsiveness */
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-tagline {
    font-size: 0.95rem;
  }

  .auth-card {
    margin: 1rem;
    padding: 1.5rem;
  }

  .chat-bubble {
    max-width: 85%;
  }

  .orbit {
    width: 250px;
    height: 250px;
  }

  .orbit-card {
    min-width: 120px;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }
}

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

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

@keyframes orbit-card-spin {
  from {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--orbit-radius)));
  }
  to {
    transform: translate(-50%, -50%) rotate(calc(var(--angle) + 360deg)) translateY(calc(-1 * var(--orbit-radius)));
  }
}

@keyframes orbit-card-counter {
  from {
    transform: rotate(calc(-1 * var(--angle)));
  }
  to {
    transform: rotate(calc(-1 * (var(--angle) + 360deg)));
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(0.95); opacity: 0.65; }
  50% { transform: scale(1.08); opacity: 1; }
}
.auth-overlay.hidden {
  display: none !important;
}

.app-shell.auth-locked {
  filter: blur(10px);
  pointer-events: none;
  user-select: none;
}

@media (max-width: 768px) {
  main {
    padding: 1.8rem 1.2rem 7rem;
  }

  .panel {
    padding: 1.8rem 1.4rem;
    margin-bottom: 2.8rem;
  }

  .hero {
    gap: 1.8rem;
  }

  .home-grid {
    display: grid;
    gap: 1.8rem;
  }

  .auth-card {
    padding: 1.8rem;
  }

  .bottom-nav {
    width: 100%;
    left: 0;
    border-radius: 18px 18px 0 0;
    padding: 0.75rem 1rem calc(env(safe-area-inset-bottom) + 0.75rem);
  }

  .bottom-link {
    width: 70px;
    height: 64px;
  }

  .bottom-link .icon {
    width: 32px;
    height: 32px;
  }
}

@media (min-width: 1024px) {
  .app-shell {
    max-width: 1180px;
    margin: 0 auto;
  }

  .bottom-nav {
    width: 100%;
  }

  .bottom-link {
    width: 86px;
    height: 78px;
  }

  /* Enhanced laptop/desktop experience */
  .hero {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
  }

  .home-grid {
    grid-template-columns: 1.4fr 0.8fr;
    gap: 3rem;
  }

  .chat-body {
    max-height: 500px;
  }

  .orbit {
    width: 400px;
    height: 400px;
  }

  .orbit-card {
    min-width: 160px;
    padding: 1rem 1.2rem;
  }

  .panel {
    padding: 3rem;
  }

  .top-nav {
    padding: 1.2rem 4vw;
  }
}

@media (min-width: 1440px) {
  .app-shell {
    max-width: 1400px;
  }

  .hero h1 {
    font-size: 4.2rem;
  }

  .hero-tagline {
    font-size: 1.1rem;
  }

  .orbit {
    width: 450px;
    height: 450px;
  }

  .chat-body {
    max-height: 600px;
  }
}
