:root {
  color-scheme: dark;
  --bg-dark: #0a0f0a;
  --bg-darker: #050805;
  --glass-bg: rgba(0, 20, 0, 0.65);
  --glass-border: rgba(0, 255, 0, 0.3);
  --glass-highlight: rgba(0, 255, 0, 0.1);
  --neon-green: #0f0;
  --neon-dim: #0a8f0a;
  --text-main: #b3ffb3;
  --text-muted: #6f9e6f;
  --card-bg: rgba(10, 20, 10, 0.75);
}

body {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  background: linear-gradient(135deg, #030803 0%, #0a1a0a 100%);
  color: var(--text-main);
  backdrop-filter: blur(2px);
}

a {
  color: #2eff2e;
  text-decoration: none;
  transition: text-shadow 0.2s ease;
}
a:hover {
  text-shadow: 0 0 4px #0f0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: visible;
  z-index: 1000;
}
.topbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.08), transparent);
  animation: liquidShine 8s infinite linear;
  pointer-events: none;
}

.topbar nav {
  position: relative;
  z-index: 1;
}
@keyframes liquidShine {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(50%); }
}

.topbar nav {
  display: flex;
  gap: 12px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-link img {
  border-radius: 8px;
  border: 1px solid #2f6f2f;
}
.notif summary {
  cursor: pointer;
}
.notif {
  position: relative;
  z-index: 1100;
}
.notif .card {
  position: absolute;
  right: 8px;
  top: 46px;
  width: 320px;
  z-index: 1200;
  max-height: 60vh;
  overflow: auto;
}
.top-avatar {
  width: 30px;
  height: 30px;
  border: 1px solid #2f6f2f;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(0, 40, 0, 0.5);
}
.top-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

main {
  padding: 16px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: rgba(0, 255, 0, 0.6);
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.2);
}

.narrow {
  max-width: 420px;
  margin: 30px auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.chat-item, .row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed #2a5a2a;
  padding: 8px 0;
}

input, textarea, button, select {
  width: 100%;
  margin: 6px 0;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: rgba(0, 10, 0, 0.85);
  backdrop-filter: blur(4px);
  color: var(--text-main);
  font-family: monospace;
  padding: 8px;
  box-sizing: border-box;
  transition: all 0.2s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #0f0;
  box-shadow: 0 0 6px #0f0;
}
button {
  cursor: pointer;
  width: auto;
  background: linear-gradient(135deg, #0a200a, #051005);
  border-color: #2f6f2f;
  font-weight: bold;
  letter-spacing: 0.5px;
}
button::before {
  content: "🔹 ";
}
button:hover {
  background: #0f3a0f;
  border-color: #0f0;
  box-shadow: 0 0 6px #0f0;
}

.inline {
  display: inline-flex;
  gap: 6px;
  width: auto;
  align-items: center;
}

.tag {
  background: rgba(0, 50, 0, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
  border: 1px solid #2a6e2a;
}

.messages {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px;
  margin: 10px 0;
  background: rgba(0, 5, 0, 0.5);
  backdrop-filter: blur(4px);
}

.msg {
  padding: 8px;
  border-bottom: 1px solid #1a3a1a;
  position: relative;
}
.msg.system {
  border-left: 3px solid #2eff2e;
  background: rgba(0, 255, 0, 0.08);
}

.muted {
  color: var(--text-muted);
  font-size: 12px;
}

.inline-img {
  max-width: 260px;
  border-radius: 10px;
  margin-top: 6px;
  border: 1px solid #1f6f1f;
}

.flash-wrap {
  padding: 0 16px;
}
.flash {
  background: #2a1a1a;
  border-left: 4px solid #ff3333;
  margin-top: 8px;
  border-radius: 8px;
  padding: 8px;
}

.poll {
  border: 1px solid #2f6a2f;
  border-radius: 12px;
  padding: 8px;
  margin: 10px 0;
  background: rgba(0, 10, 0, 0.6);
}

.voice-panel {
  border: 1px solid #2f6a2f;
  border-radius: 14px;
  padding: 10px;
  margin: 10px 0;
  background: rgba(0, 10, 0, 0.6);
  backdrop-filter: blur(5px);
}

.voice-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.voice-users {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voice-user {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dashed #2a6a2a;
  padding-bottom: 8px;
}

.voice-user-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.voice-user-main a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.voice-name {
  font-weight: 600;
  color: #b3ffb3;
}

.voice-badge {
  background: #1a3a1a;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
  border: 1px solid #3e9e3e;
}

.voice-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #0f0;
}

.voice-avatar-emoji {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 50, 0, 0.6);
  border: 1px solid #2f9e2f;
}

.voice-record {
  margin: 6px 0 2px;
}

.voice-mute-btn {
  padding: 6px 10px;
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.profile-card[style*="background-image"] {
  position: relative;
  isolation: isolate;
}
.profile-card[style*="background-image"]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(5, 8, 5, 0.72);
  z-index: 0;
  pointer-events: none;
}
.profile-card[style*="background-image"] > * {
  position: relative;
  z-index: 1;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.profile-title {
  margin: 0;
  font-size: 1.35rem;
}

.profile-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--glass-border, #2f6f2f);
  flex-shrink: 0;
}

.profile-avatar-emoji {
  font-size: 2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--glass-border, #2f6f2f);
  background: rgba(0, 30, 0, 0.45);
}

/* Additional liquid glass touches */
::-webkit-scrollbar {
  width: 8px;
  background: #0a0f0a;
}
::-webkit-scrollbar-track {
  background: #0a1a0a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: #1f6f1f;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2eff2e;
  box-shadow: 0 0 4px #0f0;
}
