@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@500&display=swap');

:root {
  --bg-base: #06080d;
  --surface: #0f141e;
  --surface-elevated: #161d2b;
  --surface-highlight: #1e2638;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.04);
  --border-focus: rgba(66, 133, 244, 0.5);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --accent-1: #4285F4;
  --accent-2: #8A3FFC;
  --accent-3: #E341CA;
  --gemini-gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
  --gemini-gradient-soft: linear-gradient(135deg, rgba(66, 133, 244, 0.1), rgba(138, 63, 252, 0.1), rgba(227, 65, 202, 0.1));
  
  --discord: #5865F2;
  --discord-hover: #4752C4;
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.1);
  --success: #10b981;
  
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --shadow-sm: 0 4px 6px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px rgba(138, 63, 252, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  position: relative;
  background-color: var(--bg-base);
  background-image: 
    linear-gradient(rgba(66, 133, 244, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 133, 244, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0;
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@keyframes pan-sci-fi-grid {
  0% { background-position: 0 0; }
  100% { background-position: 400px 400px; }
}

/* Animated Ambient Background */
body::before, body::after {
  content: '';
  position: fixed;
  width: 70vw; height: 70vh;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.18;
  pointer-events: none;
}
body::before {
  top: -20vh; left: -10vw;
  background: radial-gradient(circle, var(--accent-1) 0%, var(--accent-2) 50%, transparent 80%);
}
body::after {
  bottom: -20vh; right: -10vw;
  background: radial-gradient(circle, var(--accent-3) 0%, var(--accent-2) 50%, transparent 80%);
}

/* Base Layout */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(6, 8, 13, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-text {
  position: relative;
  display: inline-block;
  background: var(--gemini-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: neon-pulse 6s ease-in-out infinite;
}

@keyframes neon-pulse {
  0%, 50%, 100% {
    filter: brightness(1) drop-shadow(0 0 0 rgba(66, 133, 244, 0)) drop-shadow(0 0 0 rgba(138, 63, 252, 0)) drop-shadow(0 0 0 rgba(227, 65, 202, 0));
  }
  75% {
    filter: brightness(1.4) drop-shadow(0 0 8px var(--accent-1)) drop-shadow(0 0 15px var(--accent-2)) drop-shadow(0 0 25px var(--accent-3));
  }
}

.beta-badge {
  font-size: 0.55em;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--gemini-gradient-soft);
  color: var(--accent-1);
  border: 1px solid rgba(66, 133, 244, 0.3);
  padding: 1px 6px;
  border-radius: 99px;
  vertical-align: middle;
  -webkit-text-fill-color: initial;
  display: inline-block;
  animation: beta-float 5s ease-in-out infinite;
  transform-origin: center;
}

@keyframes beta-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  30% {
    transform: translateY(-2px) rotate(4deg);
  }
  70% {
    transform: translateY(1px) rotate(-2deg);
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
}
.user-profile img {
  width: 32px; height: 32px;
  border-radius: 50%;
}
.user-profile span {
  font-weight: 500;
  font-size: 0.875rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--surface-highlight);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}
.btn:hover:not(:disabled) {
  background: var(--surface-elevated);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}
.btn:active:not(:disabled) {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-base);
  border: none;
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) {
  background: #e2e8f0;
  box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}

.btn-discord {
  background: var(--discord);
  color: white;
  border: none;
  font-weight: 600;
}
.btn-discord:hover:not(:disabled) {
  background: var(--discord-hover);
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.btn-danger {
  background: var(--danger-soft);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.2);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
}

/* Main Container */
.container {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  animation: fade-in 0.4s ease-out;
}

/* Guest Hero (Public) */
.guest-hero {
  position: relative;
  text-align: center;
  padding: 4rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.heartbeat-container {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
  pointer-events: none;
  overflow: hidden;
}

.heartbeat-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 400px;
  transform: translateY(-50%);
  transform-origin: center;
  animation: heartbeat-pulse 8s infinite linear, random-amplitude 20s infinite ease-in-out;
  will-change: transform, opacity;
}

.heartbeat-line path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: dash 20s linear infinite;
  will-change: stroke-dashoffset;
}

@keyframes random-amplitude {
  0%   { transform: translateY(-50%) scaleY(1); }
  15%  { transform: translateY(-50%) scaleY(1.3); }
  30%  { transform: translateY(-50%) scaleY(0.7); }
  45%  { transform: translateY(-50%) scaleY(1.5); }
  60%  { transform: translateY(-50%) scaleY(0.85); }
  75%  { transform: translateY(-50%) scaleY(1.2); }
  90%  { transform: translateY(-50%) scaleY(0.6); }
  100% { transform: translateY(-50%) scaleY(1); }
}

@keyframes dash {
  0% { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: -1000; }
}

@keyframes heartbeat-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

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

.guest-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  line-height: 1.1;
}
.guest-hero p {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
}
.guest-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Compact Command Grid (Public) */
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gemini-gradient);
}

.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.cmd-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 1;
  box-shadow: inset 0 0 0 0 rgba(138, 63, 252, 0); /* Base for explosion */
  border: none; /* Removed border to use pseudo-element border */
  overflow: hidden;
}

/* The solid card body that sits on top of the glowing border */
.cmd-card::before {
  content: '';
  position: absolute;
  inset: 1px;
  background: var(--surface);
  border-radius: calc(var(--radius-md) - 1px);
  z-index: -1;
  transition: background 0.4s ease;
}

/* The continuous majestic spinning line */
.cmd-card::after {
  content: '';
  position: absolute;
  inset: -100%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0%,
    transparent 70%,
    var(--accent-1) 85%,
    var(--accent-3) 100%
  );
  z-index: -2;
  animation: spin-border 15s linear infinite;
  opacity: 0.5;
  transition: opacity 0.6s ease;
}

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

@media (hover: hover) {
  .cmd-grid:hover .cmd-card:not(:hover)::after {
    animation-play-state: paused;
    opacity: 0.1;
  }
}

/* The Hover "Explosion" */
.cmd-card:hover {
  transform: translateY(-4px) scale(1.02);
  animation: card-explosion 0.8s ease-out forwards;
}

.cmd-card:hover::before {
  background: var(--surface-elevated);
}

.cmd-card:hover::after {
  opacity: 1;
  animation: spin-border 8s linear infinite; /* speeds up on hover */
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0%,
    var(--accent-2) 40%,
    var(--accent-1) 60%,
    var(--accent-3) 100%
  );
}

@keyframes card-explosion {
  0% { box-shadow: inset 0 0 50px 20px rgba(138, 63, 252, 0.5), 0 0 0 rgba(0,0,0,0); }
  100% { box-shadow: inset 0 0 0 0 rgba(138, 63, 252, 0), 0 20px 40px -10px rgba(138, 63, 252, 0.4); }
}

.cmd-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.cmd-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #a6ffcb;
  background: rgba(166, 255, 203, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}
.cmd-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.cmd-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  flex: 1;
}

/* Dashboard Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 6rem;
}

.guild-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
}
.guild-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}
.guild-btn:hover {
  background: var(--surface-highlight);
}
.guild-btn.active {
  background: var(--gemini-gradient-soft);
  box-shadow: inset 2px 0 0 var(--accent-1);
}
.guild-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
}
.guild-icon-fallback {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-highlight);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.875rem;
}
.guild-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.guild-name {
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guild-access {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tab-btn:hover {
  color: var(--text-main);
  background: var(--surface);
}
.tab-btn-copy {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.tab-btn-label {
  display: block;
}
.tab-btn-meta {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.tab-btn.active {
  color: var(--text-main);
  background: var(--surface-elevated);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.tab-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Main Content Area */
.tab-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 500px;
  box-shadow: var(--shadow-lg);
  animation: tab-enter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes tab-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.tab-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.tab-header p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}
.tab-body {
  padding: 2rem;
  flex: 1;
}

/* Overview Stats Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.stat-box {
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  background: var(--gemini-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.stat-value-plain {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  color: var(--text-main);
  font-size: 1.45rem;
  line-height: 1.2;
}

.panel-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.compact-stack {
  gap: 1rem;
}

.panel-grid {
  display: grid;
  gap: 1.5rem;
}

.panel-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.feature-card,
.panel-section-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  min-height: 100%;
}

.feature-card-head,
.panel-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.panel-section-head {
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1.15rem;
}

.feature-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-1);
  font-weight: 700;
}

.feature-card h3,
.panel-section-head h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature-card p,
.panel-section-head p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.feature-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-main);
  font-size: 0.84rem;
}

.feature-detail-list span,
.detail-note {
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.84rem;
}

.detail-note {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.feature-card-footer {
  margin-top: auto;
}

.panel-section-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-pill-neutral {
  color: var(--accent-1);
  border-color: rgba(66, 133, 244, 0.25);
  background: rgba(66, 133, 244, 0.09);
}

.action-tile {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.action-tile h3 {
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}

.action-tile p {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.action-tile-danger {
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.18);
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}
.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: -0.25rem;
}

.form-control {
  width: 100%;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  transition: all 0.2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15);
  background: var(--surface-highlight);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.2s;
}
.toggle-label:hover {
  border-color: rgba(255,255,255,0.2);
}
.toggle-label input {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent-2);
}

.form-actions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
}

/* Member Search component */
.member-search-wrap {
  position: relative;
}
.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0; right: 0;
  background: var(--surface-highlight);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 250px;
  overflow-y: auto;
  z-index: 20;
  box-shadow: var(--shadow-lg);
}
.search-item {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: rgba(255,255,255,0.05); }
.search-item img {
  width: 28px; height: 28px;
  border-radius: 6px;
}
.search-item-info {
  display: flex;
  flex-direction: column;
}
.search-item-name { font-weight: 600; font-size: 0.875rem; }
.search-item-id { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-mono); }

/* Leaderboard List */
.lb-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.lb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.lb-user {
  font-weight: 600;
  font-size: 0.875rem;
}
.lb-score {
  font-family: var(--font-mono);
  color: var(--accent-3);
  font-weight: 600;
}

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state h3 {
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1000;
}
.toast {
  background: var(--surface-highlight);
  border: 1px solid var(--border);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  animation: slide-left 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

@keyframes slide-left {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 1rem;
  }
  .tab-nav {
    flex-direction: row;
  }
  .tab-btn {
    white-space: nowrap;
  }
  .guild-card {
    min-width: 200px;
  }
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface-highlight);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: bold;
  cursor: help;
  position: relative;
  margin-left: 0.5rem;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.tooltip-icon:hover {
  background: var(--accent-1);
  color: #fff;
  border-color: var(--accent-1);
}

.tooltip-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
  z-index: 100;
}

.tooltip-icon:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mode-switcher {
  display: flex;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.25rem;
  gap: 0.25rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mode-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.4rem 1.25rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-sans);
}

.mode-btn.active {
  background: var(--surface-highlight);
  color: var(--text-main);
  box-shadow: var(--shadow-sm), inset 0 1px 1px rgba(255,255,255,0.1);
}

.mode-btn:hover:not(.active) {
  color: var(--text-main);
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-light);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .navbar {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  .brand {
    width: 100%;
    justify-content: center;
    order: 1;
  }
  .nav-actions {
    width: 100%;
    justify-content: center;
    order: 2;
  }
  .mode-switcher {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }
  .container {
    padding: 1rem;
  }
  .guest-hero h1 {
    font-size: 2.25rem;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .tooltip-icon::after {
    /* Hide the tooltip on tiny screens to avoid breaking layout, or make it smaller */
    width: 150px;
    font-size: 10px;
    white-space: normal;
    text-align: center;
  }

  .navbar {
    backdrop-filter: none;
    background: var(--bg-base);
  }

  .cmd-card::after {
    animation: none !important;
    opacity: 0.3;
  }

  .brand-text {
    animation: none !important;
    filter: drop-shadow(0 0 5px var(--accent-1));
  }
}

/* Fancy Counters UI */
.stat-glow-box {
  position: relative;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  text-align: center;
  min-width: 160px;
  overflow: visible;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  z-index: 1;
}

.stat-glow-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(138, 63, 252, 0.12) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: -1;
  border-radius: inherit;
}

.stat-glow-box:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow-lg), 0 6px 20px rgba(66, 133, 244, 0.12);
  border-color: rgba(138, 63, 252, 0.3);
}

.stat-glow-box:hover::before {
  opacity: 1;
}

.stat-glow-value {
  font-size: 2.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: var(--gemini-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 0.25rem;
  filter: drop-shadow(0 2px 6px rgba(138, 63, 252, 0.2));
}

.stat-glow-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.2;
}

.stat-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  pointer-events: none;
  z-index: 100;
  animation: explode-particle 3s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes explode-particle {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0) rotate(var(--rot)); opacity: 0; }
}

.hero-actions-wrapper {
  max-width: 460px;
  margin: 2.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}

.hero-grid-2.single-btn {
  grid-template-columns: 1fr;
}

.hero-grid-2 .btn {
  width: 100%;
  height: 100%;
  padding: 1rem 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.hero-grid-2 .stat-glow-box {
  min-width: 0;
  width: 100%;
  padding: 1.5rem 1rem;
}
