:root {
  color-scheme: dark;
  --glass: rgba(15, 23, 42, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --electric: #3b82f6;
  font-family: "Space Grotesk", "Rubik", system-ui, sans-serif;
}

#bubbleCanvas {
  mix-blend-mode: screen;
  opacity: 0.8;
  z-index: 0;
}

.intro-screen {
  background: radial-gradient(circle, rgba(15, 23, 42, 1) 0%, #000 70%);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.intro-title .neon {
  position: relative;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.75), 0 0 20px rgba(59, 130, 246, 0.6),
    0 0 30px rgba(59, 130, 246, 0.4);
}

.content-shell {
  position: relative;
  z-index: 1;
}

.glass-panel {
  background: rgba(5, 10, 18, 0.65);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  box-shadow: 0 25px 70px rgba(2, 6, 23, 0.55);
  padding: 1.75rem;
  backdrop-filter: blur(25px);
  position: relative;
}

.liquid-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(7, 9, 18, 0.85));
  border-radius: 1.75rem;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(25px);
  box-shadow: 0 35px 60px rgba(3, 7, 18, 0.75);
  padding: 2rem;
}

.field {
  width: 100%;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.85rem 1rem;
  color: #f8fafc;
  font-size: 1rem;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.field:focus {
  outline: none;
  border: 1px solid var(--electric);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.45);
  background: rgba(15, 23, 42, 0.6);
}

.tab-button {
  padding: 0.4rem 1.3rem;
  border-radius: 999px;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  background: transparent;
  color: rgba(226, 232, 240, 0.7);
  transition: all 0.3s ease;
}

.tab-button.active {
  background: rgba(59, 130, 246, 0.25);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
}

.admin-btn {
  width: 100%;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(59, 130, 246, 0.15);
  color: #e0f2fe;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.admin-btn:hover {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.chat-panel .room-tab {
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5f5;
  transition: all 0.3s ease;
}

.room-tab.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.6);
  color: #fff;
}

.chat-window {
  max-height: 220px;
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

.chat-window p {
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.8rem;
  background: rgba(99, 102, 241, 0.12);
}

.sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(5, 10, 18, 0.8), rgba(2, 6, 23, 0.8));
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 1rem 0;
}

.custom-name-effect {
  background: linear-gradient(120deg, #3b82f6, #93c5fd, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: namePulse 3s ease-in-out infinite;
  font-weight: 700;
}

.custom-name.badge {
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.75rem 1rem;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}

.sidebar .glass-panel > .custom-name {
  width: 100%;
}

.activity-stream-item {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px dashed rgba(59, 130, 246, 0.25);
  font-size: 0.75rem;
  color: #e2e8f0;
}

.sidebar-room {
  border-radius: 0.8rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(15, 23, 42, 0.6);
  font-size: 0.78rem;
  color: #cbd5f5;
}

.sidebar-room.active {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.8);
  color: #fff;
}

.glass-panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(59, 130, 246, 0.12);
  pointer-events: none;
}

@keyframes namePulse {
  0% {
    filter: drop-shadow(0 0 5px rgba(14, 165, 233, 0.8));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.9));
  }
  100% {
    filter: drop-shadow(0 0 5px rgba(14, 165, 233, 0.6));
  }
}
