@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Tajawal:wght@400;500;700;900&display=swap');

:root {
  --bg-deep: #060511;
  --bg-surface: rgba(18, 14, 38, 0.75);
  --bg-surface-elevated: rgba(28, 22, 58, 0.85);
  --border-neon: rgba(139, 92, 246, 0.35);
  
  /* Character Neon Accents */
  --neon-judge: #f59e0b;       /* الحافوزليق: كهرماني ذهبي */
  --neon-judge-glow: rgba(245, 158, 11, 0.4);
  --neon-shumqmaq: #06b6d4;    /* شمقمق: أزرق سماوي نيون */
  --neon-shumqmaq-glow: rgba(6, 182, 212, 0.4);
  --neon-aaout: #ec4899;       /* العاعاعوط: فوشيا ووردي مجنون */
  --neon-aaout-glow: rgba(236, 72, 153, 0.4);
  --neon-defendant: #10b981;   /* المتهم: أخضر زمردي */
  --neon-defendant-glow: rgba(16, 185, 129, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-purple: #8b5cf6;
  --accent-magenta: #d946ef;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
  position: relative;
}

/* Background Canvas & Ambient Nebulae */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.cosmic-nebula {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  animation: floatNebula 18s ease-in-out infinite alternate;
}

.nebula-1 {
  top: -10%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7928ca 0%, transparent 70%);
}

.nebula-2 {
  bottom: -15%;
  right: 5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #0070f3 0%, transparent 70%);
  animation-delay: -9s;
}

.nebula-3 {
  top: 40%;
  left: 45%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #f43f5e 0%, transparent 70%);
  opacity: 0.2;
}

@keyframes floatNebula {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* App Wrapper */
.app-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

/* Header Navbar */
.cosmic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-neon);
  border-radius: 20px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(139, 92, 246, 0.15);
  margin-bottom: 1.25rem;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px var(--neon-judge));
  animation: pulseGavel 3s infinite ease-in-out;
}

@keyframes pulseGavel {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(-8deg) scale(1.1); }
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24 0%, #ec4899 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Buttons Styling */
.btn-cosmic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  text-decoration: none;
}

.btn-cosmic:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.btn-audio {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

.btn-audio.active {
  background: rgba(139, 92, 246, 0.35);
  border-color: #a78bfa;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
  color: #fff;
}

/* Audio equalizer bars animation */
.equalizer-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.equalizer-bar {
  width: 3px;
  background-color: currentColor;
  border-radius: 2px;
  height: 4px;
  transition: height 0.2s;
}

.btn-audio.active .equalizer-bar:nth-child(1) { animation: eqBounce 0.8s infinite ease-in-out alternate; }
.btn-audio.active .equalizer-bar:nth-child(2) { animation: eqBounce 1.1s infinite 0.2s ease-in-out alternate; }
.btn-audio.active .equalizer-bar:nth-child(3) { animation: eqBounce 0.7s infinite 0.4s ease-in-out alternate; }

@keyframes eqBounce {
  0% { height: 3px; }
  100% { height: 14px; }
}

/* Hero / Welcome Screen */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
  margin: auto 0;
  gap: 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 30px;
  color: #fbbf24;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.25;
  max-width: 850px;
}

.hero-title span {
  background: linear-gradient(135deg, #fbbf24 10%, #f43f5e 50%, #a855f7 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 35px rgba(244, 63, 94, 0.4);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.7;
}

/* Character Showcase Grid */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  width: 100%;
  margin: 1rem 0;
}

.character-card {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.character-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, #8b5cf6);
  box-shadow: 0 0 12px var(--card-accent, #8b5cf6);
}

.character-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--card-accent);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.8), 0 0 25px var(--card-glow);
}

.card-judge {
  --card-accent: var(--neon-judge);
  --card-glow: var(--neon-judge-glow);
}

.card-shumqmaq {
  --card-accent: var(--neon-shumqmaq);
  --card-glow: var(--neon-shumqmaq-glow);
}

.card-aaout {
  --card-accent: var(--neon-aaout);
  --card-glow: var(--neon-aaout-glow);
}

.avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--card-accent), transparent 70%);
  box-shadow: 0 0 20px var(--card-glow);
}

.character-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: #0b091a;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.character-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.character-role {
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--card-accent);
  font-weight: 700;
}

.character-bio {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.character-weakness {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px dashed var(--card-accent);
  color: #f1f5f9;
  text-align: center;
  width: 100%;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}

.character-card:hover .character-weakness {
  background: rgba(0, 0, 0, 0.65);
  border-style: solid;
  color: #fff;
  box-shadow: 0 0 12px var(--card-glow);
}

/* PROMINENT NEON START BUTTON */
.btn-neon-start {
  position: relative;
  padding: 1.1rem 2.8rem;
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 50%, #8b5cf6 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.6), 0 0 65px rgba(236, 72, 153, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  animation: neonPulse 2.5s infinite;
}

.btn-neon-start:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.8), 0 0 90px rgba(236, 72, 153, 0.6);
}

.btn-neon-start:active {
  transform: translateY(1px) scale(0.98);
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.5), 0 0 45px rgba(236, 72, 153, 0.35);
  }
  50% {
    box-shadow: 0 0 45px rgba(245, 158, 11, 0.8), 0 0 75px rgba(236, 72, 153, 0.6);
  }
}

/* ============================================================= */
/* Active Trial View (Chatroom & Courtroom)                      */
/* ============================================================= */
.trial-screen {
  display: none;
  flex-direction: column;
  flex: 1;
  gap: 1rem;
}

.trial-screen.active {
  display: flex;
}

/* Case Highlight Banner */
.case-banner {
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.15);
  position: relative;
  overflow: hidden;
}

.case-banner::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  background: var(--neon-judge);
  box-shadow: 0 0 10px var(--neon-judge);
}

.case-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.case-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-back-home {
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  transition: all 0.2s ease;
}

.btn-back-home:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: #a78bfa;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

/* Ongoing Trial Card on Welcome Screen */
.ongoing-trial-card {
  width: 100%;
  max-width: 850px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 20px;
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.7), 0 0 25px rgba(245, 158, 11, 0.2);
  animation: glowPulseCard 3s infinite alternate;
  flex-wrap: wrap;
}

@keyframes glowPulseCard {
  0% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.2); }
  100% { box-shadow: 0 0 35px rgba(245, 158, 11, 0.45), 0 0 20px rgba(139, 92, 246, 0.3); }
}

.ongoing-trial-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
}

.ongoing-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
  padding: 0.15rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.ongoing-trial-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.ongoing-trial-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.case-id-badge {
  font-size: 0.8rem;
  padding: 0.2rem 0.65rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-weight: 800;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.case-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: #38bdf8;
  font-weight: 700;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.case-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.case-accusation-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  border-right: 3px solid #f43f5e;
  font-size: 0.92rem;
  color: #f1f5f9;
  line-height: 1.6;
}

.accusation-label {
  color: #f43f5e;
  font-weight: 800;
  margin-left: 0.4rem;
}

/* Court Sentiment / Hope Meter */
.court-sentiment-row {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: all 0.3s ease;
}

.sentiment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.sentiment-icon {
  font-size: 1rem;
}

.sentiment-label {
  font-weight: 700;
  color: #94a3b8;
}

.sentiment-text {
  font-weight: 700;
  color: #38bdf8;
  transition: color 0.3s ease;
}

.sentiment-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.sentiment-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease, box-shadow 0.4s ease;
}

.sentiment-bar.sentiment-innocent {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.sentiment-bar.sentiment-neutral {
  background: linear-gradient(90deg, #06b6d4, #38bdf8);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.sentiment-bar.sentiment-guilty {
  background: linear-gradient(90deg, #ef4444, #f97316);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

/* Individual Character Satisfaction Meters */
.satisfaction-section-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #cbd5e1;
  margin-top: 0.15rem;
}

.character-satisfaction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
}

.judge-sat-card {
  background: rgba(13, 10, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.judge-sat-card:hover {
  transform: translateY(-2px);
}

.judge-sat-hafouzleeq {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.08);
}
.judge-sat-hafouzleeq:hover {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.18);
}

.judge-sat-shumqmaq {
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.08);
}
.judge-sat-shumqmaq:hover {
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.18);
}

.judge-sat-aaout {
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.08);
}
.judge-sat-aaout:hover {
  border-color: rgba(236, 72, 153, 0.55);
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.18);
}

.sat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sat-judge-info {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sat-judge-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: #090616;
}

.judge-sat-hafouzleeq .sat-judge-avatar { border-color: var(--neon-judge); }
.judge-sat-shumqmaq .sat-judge-avatar { border-color: var(--neon-shumqmaq); }
.judge-sat-aaout .sat-judge-avatar { border-color: var(--neon-aaout); }

.sat-judge-name {
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.judge-sat-hafouzleeq .sat-judge-name { color: #fef08a; }
.judge-sat-shumqmaq .sat-judge-name { color: #a5f3fc; }
.judge-sat-aaout .sat-judge-name { color: #fbcfe8; }

.sat-judge-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.sat-percentage-pill {
  font-size: 0.82rem;
  font-weight: 900;
  font-family: monospace, sans-serif;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: all 0.3s ease;
}

.sat-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.sat-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.4s ease, box-shadow 0.4s ease;
}

.sat-bar-fill.fill-hafouzleeq {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.sat-bar-fill.fill-shumqmaq {
  background: linear-gradient(90deg, #06b6d4, #22d3ee);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.sat-bar-fill.fill-aaout {
  background: linear-gradient(90deg, #ec4899, #f472b6);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.sat-mood-box {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sat-mood-emoji {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sat-mood-text {
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Chat Messages Container */
.chat-container {
  flex: 1;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-neon);
  border-radius: 20px;
  padding: 1.25rem;
  overflow-y: auto;
  max-height: 58vh;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

/* Custom Scrollbar */
.chat-container::-webkit-scrollbar {
  width: 6px;
}
.chat-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.chat-container::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
  border-radius: 4px;
}
.chat-container::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.7);
}

/* Message Item */
.chat-message {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(12px);
  animation: messageEnter 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes messageEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message.msg-judge {
  --msg-accent: var(--neon-judge);
  --msg-bg: rgba(245, 158, 11, 0.08);
  --msg-border: rgba(245, 158, 11, 0.35);
  --msg-glow: var(--neon-judge-glow);
}

.chat-message.msg-advisor1 {
  --msg-accent: var(--neon-shumqmaq);
  --msg-bg: rgba(6, 182, 212, 0.08);
  --msg-border: rgba(6, 182, 212, 0.35);
  --msg-glow: var(--neon-shumqmaq-glow);
}

.chat-message.msg-advisor2 {
  --msg-accent: var(--neon-aaout);
  --msg-bg: rgba(236, 72, 153, 0.08);
  --msg-border: rgba(236, 72, 153, 0.35);
  --msg-glow: var(--neon-aaout-glow);
}

.chat-message.msg-lawyer {
  --msg-accent: #38bdf8;
  --msg-bg: rgba(56, 189, 248, 0.1);
  --msg-border: rgba(56, 189, 248, 0.4);
  --msg-glow: rgba(56, 189, 248, 0.45);
}

.chat-message.msg-defendant {
  flex-direction: row-reverse;
  --msg-accent: var(--neon-defendant);
  --msg-bg: rgba(16, 185, 129, 0.12);
  --msg-border: rgba(16, 185, 129, 0.4);
  --msg-glow: var(--neon-defendant-glow);
}

.msg-avatar-wrapper.msg-avatar-defendant {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  border: 2px solid #10b981;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.6);
  width: 48px;
  height: 48px;
}

.defendant-avatar-icon {
  font-size: 1.55rem;
  line-height: 1;
  user-select: none;
}

.msg-avatar-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--msg-glow);
}

.msg-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--msg-accent);
  background-color: #0d0b24;
}

.msg-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 82%;
}

.msg-sender-info {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
}

.chat-message.msg-defendant .msg-sender-info {
  justify-content: flex-end;
}

.msg-sender-name {
  font-weight: 800;
  color: var(--msg-accent);
}

.msg-sender-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.msg-bubble {
  background: var(--msg-bg);
  border: 1px solid var(--msg-border);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  border-top-right-radius: 4px;
  padding: 0.85rem 1.15rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #f8fafc;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  word-break: break-word;
}

.chat-message.msg-defendant .msg-bubble {
  border-top-right-radius: 16px;
  border-top-left-radius: 4px;
  background: var(--msg-bg);
}

/* Typing / Deliberating Indicator */
.typing-indicator {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  width: fit-content;
  font-size: 0.85rem;
  color: #c4b5fd;
}

.typing-indicator.active {
  display: flex;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #c4b5fd;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

/* Defense Input Controls */
.input-panel {
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-neon);
  border-radius: 18px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.7);
}

.quick-defense-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.quick-defense-chips::-webkit-scrollbar {
  height: 3px;
}
.quick-defense-chips::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

.defense-chip {
  flex-shrink: 0;
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
}

.defense-chip:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #fff;
  transform: translateY(-1px);
}

.input-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-end;
}

.defense-textarea {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.95rem;
  resize: none;
  min-height: 48px;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.defense-textarea:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.defense-textarea::placeholder {
  color: #64748b;
}

.btn-send {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  padding: 0 1.25rem;
  height: 48px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  transition: all 0.2s;
}

.btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
}

.btn-gavel-demand {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  padding: 0 1rem;
  height: 48px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-gavel-demand:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
}

.btn-lawyer-demand {
  background: linear-gradient(135deg, #4f46e5 0%, #0284c7 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  padding: 0 1rem;
  height: 48px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-lawyer-demand:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #4338ca 0%, #0369a1 100%);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.7);
  border-color: #38bdf8;
}

.btn-lawyer-demand:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
  transform: none;
  box-shadow: none;
}

.lawyer-round-badge {
  background: rgba(0, 0, 0, 0.45);
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 900;
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* ============================================================= */
/* Grand Verdict Modal / Announcement                           */
/* ============================================================= */
.verdict-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 2, 10, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s forwards;
}

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

.verdict-modal {
  background: linear-gradient(145deg, rgba(28, 20, 50, 0.95), rgba(15, 10, 30, 0.98));
  border: 2px solid var(--neon-judge);
  border-radius: 28px;
  max-width: 650px;
  width: 100%;
  padding: 2.25rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.5), 0 20px 40px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: hidden;
  animation: modalScale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalScale {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.gavel-icon-giant {
  font-size: 4rem;
  filter: drop-shadow(0 0 20px var(--neon-judge));
  animation: gavelStrikeAnim 0.6s ease-in-out;
}

@keyframes gavelStrikeAnim {
  0% { transform: rotate(-45deg) scale(0.6); }
  50% { transform: rotate(15deg) scale(1.3); }
  100% { transform: rotate(0deg) scale(1); }
}

.verdict-stamp {
  display: inline-block;
  padding: 0.5rem 1.75rem;
  border: 3px dashed #ef4444;
  color: #ef4444;
  font-size: 1.6rem;
  font-weight: 900;
  border-radius: 12px;
  transform: rotate(-4deg);
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.verdict-stamp.innocent {
  border-color: #10b981;
  color: #34d399;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
  transform: rotate(3deg);
}

.verdict-modal.victory {
  border-color: #10b981;
  box-shadow: 0 0 65px rgba(16, 185, 129, 0.55), 0 20px 45px rgba(0, 0, 0, 0.9);
}

.verdict-penalty-box.victory {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.penalty-label.victory {
  color: #34d399;
}

.verdict-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fbbf24;
}

.verdict-penalty-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  padding: 1.25rem;
  width: 100%;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #f1f5f9;
}

.penalty-label {
  display: block;
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.verdict-actions {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* Screen Shake Effect */
.shake-screen {
  animation: screenShakeAnim 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes screenShakeAnim {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* ============================================================= */
/* Archives / Criminal History Modal                            */
/* ============================================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 2, 10, 0.85);
  backdrop-filter: blur(12px);
  z-index: 90;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.archive-modal {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-neon);
  border-radius: 24px;
  max-width: 750px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fbbf24;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #fff;
}

.archive-list {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.archive-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.2s;
}

.archive-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.archive-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.archive-case-title {
  font-weight: 800;
  color: #fff;
  font-size: 1rem;
}

.archive-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.archive-accusation {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.archive-penalty {
  font-size: 0.85rem;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  border-right: 2px solid #ef4444;
}

.archive-penalty.archive-penalty-win {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border-right-color: #10b981;
}

.archive-card.archive-card-win {
  border-color: rgba(16, 185, 129, 0.35);
}

.archive-outcome-badge {
  font-size: 0.72rem;
  padding: 0.12rem 0.5rem;
  border-radius: 8px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.archive-outcome-badge.badge-innocent {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.archive-outcome-badge.badge-guilty {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.archive-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================================= */
/* Floating Settings Modal & Audio Controls                     */
/* ============================================================= */
.settings-floating-window {
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-neon);
  border-radius: 24px;
  max-width: 540px;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(139, 92, 246, 0.25);
  overflow: hidden;
  animation: modalScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.settings-title-icon {
  font-size: 1.75rem;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
}

.settings-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.settings-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.settings-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.setting-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all 0.25s ease;
}

.setting-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(255, 255, 255, 0.03);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.setting-icon {
  font-size: 1.5rem;
}

.setting-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
}

.setting-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* iOS / Neon Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
}

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

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

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* Sliders */
.setting-slider-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.volume-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 75px;
}

.cosmic-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  transition: opacity 0.2s;
}

.cosmic-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #a855f7;
  cursor: pointer;
  box-shadow: 0 0 10px #a855f7;
  transition: transform 0.15s, background-color 0.15s;
}

.cosmic-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #c084fc;
}

.volume-val {
  font-size: 0.8rem;
  color: #c4b5fd;
  font-weight: 700;
  min-width: 38px;
  text-align: left;
}

.audio-status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.82rem;
  color: #6ee7b7;
  font-weight: 600;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

.settings-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Guide Glow Buttons */
.btn-guide-glow {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(245, 158, 11, 0.25) 100%);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fde047;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
  transition: all 0.25s ease;
}

.btn-guide-glow:hover {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25) 0%, rgba(245, 158, 11, 0.4) 100%);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
  color: #fff;
}

.btn-guide-trial {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(245, 158, 11, 0.22) 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fef08a;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.btn-guide-trial:hover {
  background: rgba(245, 158, 11, 0.3);
  color: #fff;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
  transform: scale(1.03);
}

/* ============================================================= */
/* Defense Guide Modal                                          */
/* ============================================================= */
.guide-modal-window {
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 24px;
  max-width: 820px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.2);
  overflow: hidden;
  animation: modalScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(245, 158, 11, 0.05);
}

.guide-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.guide-title-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.7));
}

.guide-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fef08a;
}

.guide-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.guide-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.guide-golden-card {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 16px;
  padding: 1rem 1.25rem;
}

.golden-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  color: #fef08a;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.golden-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.golden-desc strong {
  color: #fef08a;
}

.guide-characters-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guide-char-card {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 18px;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.guide-char-card:hover {
  transform: translateY(-2px);
}

.guide-char-card.guide-aaout {
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.12);
}

.guide-char-card.guide-aaout:hover {
  box-shadow: 0 6px 25px rgba(236, 72, 153, 0.22);
}

.guide-char-card.guide-judge {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12);
}

.guide-char-card.guide-judge:hover {
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.22);
}

.guide-char-card.guide-shumqmaq {
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.12);
}

.guide-char-card.guide-shumqmaq:hover {
  box-shadow: 0 6px 25px rgba(6, 182, 212, 0.22);
}

.guide-char-card.guide-lawyer {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.15);
}

.guide-char-card.guide-lawyer:hover {
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.28);
}

.guide-char-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
}

.guide-char-img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
}

.guide-aaout .guide-char-img {
  border-color: var(--neon-aaout);
  box-shadow: 0 0 14px var(--neon-aaout-glow);
}

.guide-judge .guide-char-img {
  border-color: var(--neon-judge);
  box-shadow: 0 0 14px var(--neon-judge-glow);
}

.guide-shumqmaq .guide-char-img {
  border-color: var(--neon-shumqmaq);
  box-shadow: 0 0 14px var(--neon-shumqmaq-glow);
}

.guide-lawyer .guide-char-img {
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
}

.guide-char-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.guide-char-role {
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
}

.guide-aaout .guide-char-role { color: #f472b6; }
.guide-judge .guide-char-role { color: #fbbf24; }
.guide-shumqmaq .guide-char-role { color: #22d3ee; }
.guide-lawyer .guide-char-role { color: #38bdf8; }

.guide-char-content {
  font-size: 0.85rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  line-height: 1.5;
}

.guide-sample-box {
  margin-top: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
  border-right: 3px solid;
  font-size: 0.83rem;
}

.guide-aaout .guide-sample-box { border-right-color: var(--neon-aaout); }
.guide-judge .guide-sample-box { border-right-color: var(--neon-judge); }
.guide-shumqmaq .guide-sample-box { border-right-color: var(--neon-shumqmaq); }
.guide-lawyer .guide-sample-box { border-right-color: #38bdf8; }

.sample-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  display: block;
  margin-bottom: 0.2rem;
}

.guide-sample-box p {
  font-style: italic;
  color: #f1f5f9;
}

.guide-tip-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.18) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 16px;
  padding: 0.9rem 1.25rem;
  font-size: 0.85rem;
  color: #a7f3d0;
}

.guide-tip-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.guide-tip-banner strong {
  color: #6ee7b7;
  display: block;
  margin-bottom: 0.2rem;
}

.guide-tip-banner p {
  color: #e2e8f0;
  line-height: 1.45;
}

.guide-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
}

/* Toast Alerts */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-neon);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  animation: slideToast 0.3s forwards;
}

@keyframes slideToast {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================================================= */
/* Comprehensive Mobile Responsive Adjustments (Phones & Tablets)*/
/* Desktop styles remain 100% untouched                          */
/* ============================================================= */
@media (max-width: 768px) {
  /* Layout & Container */
  .app-container {
    padding: 0.5rem 0.75rem;
  }

  /* Header Navbar on Mobile */
  .cosmic-header {
    flex-direction: column;
    padding: 0.75rem 0.85rem;
    gap: 0.75rem;
    border-radius: 16px;
    margin-bottom: 1rem;
  }

  .brand-area {
    width: 100%;
    justify-content: center;
    text-align: center;
    gap: 0.6rem;
  }

  .brand-icon {
    font-size: 1.65rem;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .brand-subtitle {
    font-size: 0.68rem;
  }

  .header-controls {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
  }

  .btn-cosmic {
    padding: 0.4rem 0.65rem;
    font-size: 0.78rem;
    gap: 0.3rem;
    border-radius: 10px;
  }

  .user-profile-pill {
    padding: 0.3rem 0.6rem;
    gap: 0.45rem;
    border-radius: 10px;
  }

  .user-avatar-icon {
    font-size: 1.05rem;
  }

  .header-username {
    max-width: 85px;
    font-size: 0.78rem;
  }

  .header-user-meta {
    font-size: 0.6rem;
  }

  .btn-user-logout {
    padding: 0.2rem 0.35rem;
    font-size: 0.75rem;
  }

  /* Welcome / Hero Screen */
  .welcome-screen {
    padding: 1rem 0.25rem 2rem 0.25rem;
    gap: 1.25rem;
  }

  .hero-badge {
    font-size: 0.76rem;
    padding: 0.35rem 0.75rem;
    text-align: center;
  }

  .hero-title {
    font-size: 1.45rem;
    line-height: 1.35;
    text-align: center;
  }

  .hero-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: center;
    padding: 0 0.25rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .btn-neon-start {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: 0.85rem 1.5rem;
  }

  .hero-guide-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    font-size: 0.88rem;
  }

  .ongoing-trial-banner {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .btn-resume-trial {
    width: 100%;
    justify-content: center;
  }

  /* Character Cards on Home Screen */
  .characters-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .character-card {
    padding: 1.15rem 1rem;
  }

  .char-avatar-wrapper {
    width: 90px;
    height: 90px;
    margin: 0 auto;
  }

  /* Trial Screen & Banner */
  .trial-screen {
    gap: 0.75rem;
  }

  .case-banner {
    padding: 0.85rem 1rem;
    border-radius: 16px;
  }

  .case-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .case-title {
    font-size: 1.1rem;
    line-height: 1.35;
  }

  .case-accusation {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .character-satisfaction-grid {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .satisfaction-card {
    padding: 0.6rem 0.75rem;
  }

  .sat-avatar {
    width: 36px;
    height: 36px;
  }

  .sat-name {
    font-size: 0.8rem;
  }

  .sat-mood-text {
    font-size: 0.72rem;
  }

  /* Chat Message Area */
  .chat-container {
    max-height: 50vh;
    min-height: 260px;
    padding: 0.75rem 0.5rem;
  }

  .chat-message {
    gap: 0.5rem;
  }

  .msg-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .msg-body {
    max-width: 88%;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    line-height: 1.5;
  }

  /* Defense Input Row: Grid layout on mobile so textarea is full-width and buttons side-by-side */
  .input-panel {
    padding: 0.75rem;
  }

  .input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    align-items: stretch;
  }

  .defense-textarea {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 52px;
    font-size: 0.88rem;
    padding: 0.65rem 0.85rem;
  }

  .btn-send {
    grid-column: 1 / 2;
    width: 100%;
    height: 44px;
    padding: 0;
    justify-content: center;
    font-size: 0.9rem;
  }

  .btn-gavel-demand {
    grid-column: 2 / 3;
    width: 100%;
    height: 44px;
    padding: 0;
    justify-content: center;
    font-size: 0.85rem;
  }

  .btn-lawyer-demand {
    grid-column: 1 / -1;
    width: 100%;
    height: 44px;
    padding: 0 0.85rem;
    justify-content: center;
    font-size: 0.88rem;
  }

  /* Modals General Layout on Mobile */
  .modal-overlay {
    padding: 0.5rem;
  }

  /* Auth Modal */
  .auth-modal-window {
    max-width: 100%;
    max-height: 94vh;
    border-radius: 20px;
  }

  .auth-header {
    padding: 0.85rem 1rem;
  }

  .auth-title {
    font-size: 1.05rem;
  }

  .auth-subtitle {
    font-size: 0.68rem;
  }

  .auth-tabs {
    margin: 0.65rem 1rem 0.25rem 1rem;
    padding: 0.25rem;
  }

  .auth-tab-btn {
    font-size: 0.8rem;
    padding: 0.5rem;
  }

  .auth-body {
    padding: 1rem;
  }

  .auth-grid-2 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .auth-input {
    padding: 0.65rem 2.4rem 0.65rem 0.75rem;
    font-size: 0.85rem;
  }

  .btn-auth-submit {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  /* Admin Modal */
  .admin-modal-window {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px;
  }

  .admin-header {
    padding: 0.85rem 1rem;
  }

  .admin-title {
    font-size: 1.05rem;
  }

  .admin-body {
    padding: 0.85rem 1rem;
    gap: 0.85rem;
  }

  .admin-stats-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .admin-stat-card {
    min-width: 100%;
    padding: 0.6rem 0.85rem;
  }

  #btnRefreshAdmin {
    width: 100%;
    justify-content: center;
    padding: 0.65rem;
  }

  .admin-table-wrapper {
    max-height: 48vh;
  }

  .admin-table th, .admin-table td {
    padding: 0.55rem 0.65rem;
    font-size: 0.76rem;
  }

  /* Verdict Modal */
  .verdict-modal {
    max-width: 100%;
    padding: 1.5rem 1rem;
    border-radius: 20px;
  }

  .gavel-icon-giant {
    font-size: 2.75rem;
  }

  .verdict-stamp {
    font-size: 1.2rem;
    padding: 0.35rem 1rem;
  }

  .verdict-title {
    font-size: 1.05rem;
    line-height: 1.4;
  }

  .verdict-penalty-box {
    padding: 0.75rem;
  }

  .verdict-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .verdict-actions button {
    width: 100%;
    justify-content: center;
  }

  /* Guide Modal */
  .guide-modal-window {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 20px;
  }

  .guide-header {
    padding: 0.85rem 1rem;
  }

  .guide-title {
    font-size: 1.05rem;
  }

  .guide-body {
    padding: 0.85rem 1rem;
  }

  .guide-char-header {
    gap: 0.6rem;
  }

  .guide-char-img {
    width: 44px;
    height: 44px;
  }

  .guide-char-name {
    font-size: 0.95rem;
  }

  .guide-char-role {
    font-size: 0.75rem;
  }

  .guide-footer button {
    width: 100%;
    justify-content: center;
  }

  /* Settings Modal */
  .settings-floating-window {
    max-width: 100%;
    border-radius: 20px;
  }

  .settings-header {
    padding: 0.85rem 1rem;
  }

  .settings-body {
    padding: 0.85rem 1rem;
  }

  /* Archive Modal */
  .archive-modal {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 20px;
  }

  .modal-footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .modal-footer button {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================= */
/* User Profile Pill & Auth Header Elements                      */
/* ============================================================= */
.btn-auth-glow {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.2) 100%);
  border-color: rgba(16, 185, 129, 0.5);
  color: #a7f3d0;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.btn-auth-glow:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(6, 182, 212, 0.35) 100%);
  border-color: #10b981;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.45);
}

.user-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.85rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
  animation: fadeInUser 0.3s ease-out;
}

@keyframes fadeInUser {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.user-avatar-icon {
  font-size: 1.25rem;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.6));
}

.user-profile-details {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.header-username {
  font-size: 0.88rem;
  font-weight: 800;
  color: #6ee7b7;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-user-meta {
  font-size: 0.68rem;
  color: #94a3b8;
}

.btn-user-logout {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  border-radius: 8px;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-user-logout:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: #ef4444;
  color: #fff;
  transform: scale(1.08);
}

/* ============================================================= */
/* Cosmic Auth Modal Window & Forms                              */
/* ============================================================= */
.auth-modal-window {
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 40px rgba(139, 92, 246, 0.25);
  overflow: hidden;
  animation: modalScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  display: flex;
  flex-direction: column;
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
}

.auth-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-title-icon {
  font-size: 1.75rem;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.6));
}

.auth-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.auth-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.auth-alert {
  margin: 1rem 1.5rem 0 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
  animation: fadeInAlert 0.25s ease-out;
}

@keyframes fadeInAlert {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-alert-error {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.auth-alert-success {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem;
  margin: 1rem 1.5rem 0.5rem 1.5rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 0.35rem;
}

.auth-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
}

.auth-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(217, 70, 239, 0.3) 100%);
  color: #fff;
  border: 1px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.auth-body {
  padding: 1.25rem 1.5rem 1.5rem 1.5rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  right: 1rem;
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.7;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 2.8rem 0.75rem 1rem;
  background: rgba(10, 8, 25, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.25s;
  direction: rtl;
}

.auth-input:focus {
  border-color: #8b5cf6;
  background: rgba(15, 12, 35, 0.9);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.35);
}

.auth-input::placeholder {
  color: #64748b;
  font-size: 0.85rem;
}

.auth-select {
  cursor: pointer;
}

.auth-select option {
  background: #120e26;
  color: #fff;
  padding: 0.5rem;
}

.auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.auth-field-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.3;
}

.btn-auth-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem;
  margin-top: 0.35rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
  filter: brightness(1.1);
}

.btn-signup-glow {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-signup-glow:hover {
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}

.auth-switcher-note {
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.auth-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s;
  display: inline-block;
  margin-right: 0.35rem;
}

.auth-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* ============================================================= */
/* Imperial Admin Dashboard Modal (Exclusive for "admin")        */
/* ============================================================= */
.btn-admin-glow {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fde68a;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
  font-weight: 800;
  animation: pulseGoldGlow 2.5s infinite ease-in-out;
}

@keyframes pulseGoldGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(245, 158, 11, 0.3); border-color: rgba(245, 158, 11, 0.6); }
  50% { box-shadow: 0 0 25px rgba(245, 158, 11, 0.6); border-color: #fbbf24; }
}

.btn-admin-glow:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.4) 0%, rgba(168, 85, 247, 0.4) 100%);
  border-color: #f59e0b;
  transform: translateY(-2px);
}

.admin-modal-window {
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 24px;
  max-width: 880px;
  width: 100%;
  max-height: 85vh;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 45px rgba(245, 158, 11, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, transparent 100%);
}

.admin-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-title-icon {
  font-size: 1.85rem;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.7));
}

.admin-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fbbf24;
}

.admin-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
}

.admin-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.admin-stats-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-stat-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.75rem 1.25rem;
  border-radius: 14px;
  flex: 1;
  min-width: 180px;
}

.admin-stat-icon {
  font-size: 1.75rem;
}

.admin-stat-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.admin-stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.admin-stat-value {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fbbf24;
}

.admin-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-search-icon {
  position: absolute;
  right: 1rem;
  opacity: 0.6;
  font-size: 0.95rem;
}

.admin-search-input {
  width: 100%;
  padding: 0.7rem 2.8rem 0.7rem 1rem;
  background: rgba(10, 8, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
  direction: rtl;
}

.admin-search-input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
  background: rgba(15, 12, 35, 0.9);
}

.admin-table-wrapper {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.88rem;
}

.admin-table thead {
  background: rgba(245, 158, 11, 0.15);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}

.admin-table th {
  padding: 0.85rem 1rem;
  font-weight: 800;
  color: #fde68a;
  white-space: nowrap;
}

.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  white-space: nowrap;
}

.admin-table tbody tr {
  transition: background 0.2s;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.admin-user-pill {
  font-weight: 800;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-user-pill.is-admin {
  color: #fbbf24;
}

.badge-gender {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-weight: 700;
}

.badge-gender.gender-male {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.badge-gender.gender-female {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
}

.badge-trials-count {
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.4);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 10px;
}
