/* ==========================================================================
   NECROLOGY GAME — DESIGN SYSTEM & STYLESHEET
   Aesthetics: Deep Obsidian Dark Mode, Glassmorphism, Neon/Crimson Accents
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-core: #07080c;
  --bg-surface: #0e1017;
  --bg-card: #141722;
  --bg-card-hover: #1b1e2c;
  --bg-glass: rgba(18, 21, 32, 0.75);
  --bg-glass-heavy: rgba(12, 14, 22, 0.92);
  
  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(99, 102, 241, 0.25);
  --border-active: #6366f1;
  
  /* Text */
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-inverted: #030712;

  /* Neon & Status Accents */
  --accent-primary: #6366f1; /* Indigo */
  --accent-primary-glow: rgba(99, 102, 241, 0.35);
  --accent-secondary: #8b5cf6; /* Violet */
  --accent-crimson: #ef4444; /* Blood Red / DOA */
  --accent-crimson-glow: rgba(239, 68, 68, 0.35);
  --accent-emerald: #10b981; /* Living / Verified */
  --accent-emerald-glow: rgba(16, 185, 129, 0.3);
  --accent-amber: #f59e0b; /* Pending / Warning */
  --accent-gold: #fbbf24;
  --accent-silver: #94a3b8;
  --accent-bronze: #d97706;

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Shadows & Elevations */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.75), 0 0 1px rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 20px var(--accent-primary-glow);
  --shadow-crimson: 0 0 25px var(--accent-crimson-glow);

  /* Transitions */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Document Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-core);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(239, 68, 68, 0.06), transparent);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* App Shell Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
}

/* Header & Glass Nav */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-glass-heavy);
  border-bottom: 1px solid var(--border-subtle);
  margin: 0 -1.25rem 1.5rem;
  padding: 0.875rem 1.25rem 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.logo-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.4));
  animation: subtleFloat 4s ease-in-out infinite;
}

@keyframes subtleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.brand-text .logo-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-text .logo-tagline {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  display: block;
}

/* Context Selectors (League & Season Dropdowns) */
.context-selectors {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
}

.selector-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.selector-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.custom-select {
  background: transparent;
  color: var(--text-primary);
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  max-width: 170px;
  text-overflow: ellipsis;
}

.custom-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.custom-select-sm {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

/* Session & Auth Bar */
.session-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.player-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.25rem 0.85rem 0.25rem 0.35rem;
}

.player-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  border: 1px solid var(--border-subtle);
}

.player-info {
  display: flex;
  flex-direction: column;
}

.player-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
}

.player-stats {
  font-size: 0.7rem;
  color: var(--accent-primary);
  font-weight: 600;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-commish {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.badge-dead-ringer {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
  animation: deadRingerGlow 3s ease-in-out infinite;
}

@keyframes deadRingerGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.2); }
  50% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.5); }
}

.badge-solo {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-masked {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.badge-alert {
  background: var(--accent-crimson);
  color: #ffffff;
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
}

.badge-deceased {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.6);
  font-size: 0.68rem;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.card-deceased-banner {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  margin-bottom: 0.65rem;
  font-size: 0.74rem;
  color: #fca5a5;
  line-height: 1.35;
}

.search-deceased-warning {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #fca5a5;
  line-height: 1.35;
}

.badge-lock {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* Main Navigation Tabs */
.main-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: 0.5rem;
}

.main-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.15rem;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: #ffffff;
  border-bottom-color: var(--accent-primary);
  font-weight: 600;
}

.tab-badge {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  color: var(--text-secondary);
}

.tab-btn.active .tab-badge {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}

/* Season Banner */
.season-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.1rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.banner-info .season-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.season-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.meta-item strong {
  color: var(--accent-emerald);
}

.banner-actions {
  display: flex;
  gap: 0.6rem;
}

/* Tab Panes */
.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease;
}

.tab-pane.active {
  display: block;
}

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

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.pane-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.pane-subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.2rem;
  max-width: 650px;
}

.pane-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Roster Capacity Meter */
.roster-meter-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.meter-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.meter-info strong {
  color: var(--accent-primary);
  font-weight: 700;
}

.meter-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 9999px;
  transition: width 0.4s var(--ease-smooth);
}

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

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Candidate Card */
.candidate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s var(--ease-smooth), border-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.candidate-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
}

.candidate-card.is-dead-ringer {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

.candidate-card-top {
  position: relative;
  height: 160px;
  background: #0d0f17;
  overflow: hidden;
}

.candidate-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.3s ease;
}

.candidate-card:hover .candidate-photo {
  transform: scale(1.04);
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #151824, #0b0d14);
}

.card-top-badges {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  z-index: 2;
}

.candidate-card-body {
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.candidate-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.candidate-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.candidate-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-value {
  font-weight: 700;
  color: var(--text-primary);
}

.stat-value.points-highlight {
  color: var(--accent-emerald);
}

.candidate-card-actions {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: 14px;
  padding: 3.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.empty-icon {
  font-size: 2.75rem;
  opacity: 0.8;
}

.empty-state h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #ffffff;
}

.empty-state p {
  color: var(--text-secondary);
  max-width: 420px;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Secrecy Lockdown Card */
.lockdown-card {
  background: radial-gradient(circle at top, rgba(245, 158, 11, 0.08), transparent 70%), var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 600px;
  margin: 2rem auto;
}

.lockdown-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.lockdown-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fef08a;
  margin-bottom: 0.5rem;
}

.lockdown-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Podium Layout (Leaderboard) */
.podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.25rem;
  margin: 1.5rem auto 2.5rem;
  max-width: 750px;
}

.podium-slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.podium-card {
  width: 100%;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
}

.podium-slot.rank-1 .podium-card {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.12), var(--bg-card) 60%);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.15);
  transform: translateY(-12px);
}

.podium-slot.rank-2 .podium-card {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.1), var(--bg-card) 60%);
  border-color: rgba(148, 163, 184, 0.35);
}

.podium-slot.rank-3 .podium-card {
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.1), var(--bg-card) 60%);
  border-color: rgba(217, 119, 6, 0.35);
}

.podium-medal {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}

.podium-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.podium-points {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent-gold);
  line-height: 1.1;
}

.podium-slot.rank-2 .podium-points {
  color: var(--accent-silver);
}

.podium-slot.rank-3 .podium-points {
  color: var(--accent-bronze);
}

.podium-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* Data Table (Leaderboard & Admin) */
.leaderboard-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

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

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  font-weight: 700;
  font-size: 0.8rem;
}

.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem 1rem !important;
}

/* Scored DOAs Drawer */
.scored-doas-container {
  margin-top: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  animation: fadeIn 0.2s ease;
}

.scored-doas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.scored-doas-header h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #ffffff;
}

.scored-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.scored-card {
  background: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.scored-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  background: #0a0b10;
}

.scored-meta h5 {
  font-size: 0.9rem;
  color: #ffffff;
  margin-bottom: 0.15rem;
}

.scored-meta span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

.scored-meta strong {
  color: var(--accent-emerald);
  font-size: 0.85rem;
}

/* Commissioner Command Center */
.commish-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.commish-tab-btn {
  padding: 0.65rem 1rem;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.commish-tab-btn.active {
  color: #ffffff;
  border-bottom-color: var(--accent-primary);
}

.commish-subpane {
  display: none;
}

.commish-subpane.active {
  display: block;
}

.subpane-header {
  margin-bottom: 1.25rem;
}

.subpane-header h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #ffffff;
}

.subpane-header p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Grid Utilities */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1050px) {
  .grid-3col {
    grid-template-columns: 1fr;
  }
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}

.card-padded {
  padding: 1.5rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.card-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* Forms & Inputs */
.form-vertical {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

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

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.custom-input,
.custom-textarea,
.custom-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.custom-input:focus,
.custom-textarea:focus,
.custom-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.form-checkbox-group {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
}

.code-output-card {
  margin-top: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem;
}

.code-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.4rem;
}

.code-copy-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.code-badge {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s var(--ease-smooth);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.775rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-primary-glow);
}

.btn-primary:hover:not(:disabled) {
  background: #4f46e5;
  box-shadow: 0 4px 14px var(--accent-primary-glow);
}

.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-danger:hover:not(:disabled) {
  background: var(--accent-crimson);
  color: #ffffff;
}

.btn-success {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

.btn-success:hover:not(:disabled) {
  background: var(--accent-emerald);
  color: #ffffff;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.icon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.icon-btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.icon-btn-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-lg {
  max-width: 780px;
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #ffffff;
}

.modal-subtext {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

.modal-instruction {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-divider span {
  padding: 0 0.75rem;
}

.demo-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}

.dev-otp-hint {
  font-size: 0.75rem;
  color: var(--accent-gold);
  text-align: center;
  margin: 0.5rem 0;
  min-height: 1.2rem;
}

/* Wikipedia Search Inside Modal */
.search-input-group {
  position: relative;
  margin-bottom: 1.25rem;
}

.search-input {
  padding-left: 1rem;
  padding-right: 2.5rem;
  font-size: 1rem;
}

.spinner {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 480px;
  overflow-y: auto;
}

.search-initial-hint {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem 1rem;
  font-size: 0.85rem;
}

.search-result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: border-color 0.15s, background 0.15s;
}

.search-result-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-card-hover);
}

.search-result-thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #000000;
  flex-shrink: 0;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.1rem;
}

.search-result-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-tags {
  display: flex;
  gap: 0.5rem;
  font-size: 0.725rem;
}

.tag-age {
  color: var(--text-primary);
  font-weight: 600;
}

.tag-points {
  color: var(--accent-emerald);
  font-weight: 700;
}

.search-result-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Floating Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  background: var(--bg-glass-heavy);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  animation: slideIn 0.25s var(--ease-spring);
  font-size: 0.85rem;
}

.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
  color: #ecfdf5;
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fef2f2;
}

.toast-info {
  border-color: rgba(99, 102, 241, 0.4);
  color: #eef2ff;
}

.toast-warning {
  border-color: rgba(245, 158, 11, 0.5);
  color: #fef3c7;
  background: rgba(30, 24, 12, 0.94);
}

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

/* Helpers */
.hidden { display: none !important; }
.font-mono { font-family: var(--font-mono); }
.text-center { text-align: center; }
.text-tracking-widest { letter-spacing: 0.25em; }
.mt-2 { margin-top: 0.5rem; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-container {
    padding: 0 0.75rem 2rem;
  }

  .header-content {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-group {
    justify-content: space-between;
  }

  .context-selectors {
    width: 100%;
    justify-content: space-between;
  }

  .custom-select {
    max-width: 110px;
  }

  .session-bar {
    justify-content: space-between;
  }

  .podium-container {
    flex-direction: column;
    align-items: center;
  }

  .podium-slot {
    width: 100%;
  }

  .podium-slot.rank-1 .podium-card {
    transform: none;
  }
}

/* ==========================================================================
   SPLASH / LANDING PAGE VIEW (Unauthenticated)
   ========================================================================== */
.splash-view {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 2rem);
  width: 100%;
  animation: fadeIn 0.4s ease-out;
}

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

/* Splash Header */
.splash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
}

.splash-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.splash-brand-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.splash-brand-sub {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  font-weight: 600;
}

.splash-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Splash Hero */
.splash-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.splash-hero-content {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.splash-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.875rem;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #a5b4fc;
  margin-bottom: 1.25rem;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-crimson);
  box-shadow: 0 0 8px var(--accent-crimson);
  animation: pulseDot 2s infinite;
}

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

.splash-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.gradient-text-blood {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #b91c1c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.splash-hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Two-Column Grid */
.splash-hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Splash Cards */
.splash-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.splash-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

/* Blurb Box */
.splash-blurb-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blurb-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.splash-reaper-thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--accent-primary-glow);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.blurb-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

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

.blurb-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0.85rem;
}

.blurb-body strong {
  color: #fff;
}

.formula-banner {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  padding: 1rem;
  margin: 1.25rem 0;
  text-align: center;
}

.formula-banner code {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 0.35rem;
}

.formula-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Rules Pills Grid */
.splash-rules-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.rule-pill {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem;
  transition: border-color 0.2s;
}

.rule-pill:hover {
  border-color: rgba(99, 102, 241, 0.35);
}

.rule-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.rule-text strong {
  display: block;
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

.rule-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Auth Card on Splash */
.splash-auth-card {
  box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.25);
}

.auth-card-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-card-header h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.auth-card-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}


/* Trust Banner */
.splash-trust-banner {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0.5rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 1.5rem;
}

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

/* Splash Footer */
.splash-footer {
  text-align: center;
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.splash-footer-muted {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

@media (max-width: 960px) {
  .splash-hero-grid {
    grid-template-columns: 1fr;
  }
  .splash-rules-pills {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   RICH TEXT EDITOR (RTE) & NEWSLETTER COMPOSER
   ========================================================================== */
.rte-wrapper {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.rte-wrapper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

/* Toolbar */
.rte-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(14, 16, 23, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
}

.rte-btn-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.rte-divider {
  width: 1px;
  height: 22px;
  background: var(--border-subtle);
  margin: 0 4px;
}

.rte-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
  min-width: 28px;
  height: 28px;
}

.rte-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.rte-btn:active,
.rte-btn.active {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  border-color: var(--accent-primary);
}

.rte-btn-primary {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  font-weight: 700;
  padding: 5px 10px;
}

.rte-btn-primary:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

/* Color Dots */
.rte-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  padding: 0;
  margin: 0 2px;
}

.rte-color-dot:hover {
  transform: scale(1.25);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

/* Editable Content Area */
.rte-content {
  min-height: 240px;
  max-height: 480px;
  overflow-y: auto;
  padding: 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-surface);
  outline: none;
  cursor: text;
}

.rte-content[data-placeholder]:empty:before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
  display: block;
}

.rte-content p {
  margin-bottom: 0.85rem;
}

.rte-content h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 1.2rem 0 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
}

.rte-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 1rem 0 0.4rem;
}

.rte-content blockquote {
  border-left: 3px solid var(--accent-crimson);
  background: rgba(239, 68, 68, 0.06);
  padding: 8px 14px;
  margin: 12px 0;
  font-style: italic;
  color: #fca5a5;
  border-radius: 0 6px 6px 0;
}

.rte-content ul,
.rte-content ol {
  padding-left: 24px;
  margin: 8px 0 12px;
}

.rte-content li {
  margin-bottom: 4px;
}

.rte-content hr {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: 16px 0;
}

.rte-content a {
  color: #818cf8;
  text-decoration: underline;
}

.rte-content figure {
  margin: 16px 0;
  display: block;
}

.rte-content figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #333344;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.rte-content figure figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

/* Raw HTML Source Area */
.rte-source {
  min-height: 240px;
  max-height: 480px;
  width: 100%;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #93c5fd;
  background: #08090f;
  border: none;
  outline: none;
  resize: vertical;
}

/* Status Bar */
.rte-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  background: rgba(10, 12, 18, 0.95);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Embed Image Modal Elements */
.rte-img-pane {
  animation: fadeIn 0.2s ease-out;
}

.image-drop-zone {
  border: 2px dashed rgba(99, 102, 241, 0.35);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  background: rgba(99, 102, 241, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-drop-zone:hover,
.image-drop-zone.drag-over {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
}

.rte-wiki-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.3) rgba(0, 0, 0, 0.2);
}

.rte-wiki-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.rte-wiki-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.rte-wiki-card.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary-glow);
  background: rgba(99, 102, 241, 0.15);
}

.rte-wiki-card img {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 6px;
  background: #111;
}

.rte-wiki-card .rte-wiki-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.rte-wiki-card .rte-wiki-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 2px;
}

/* Email Simulator Frame */
#newsletter-simulated-frame {
  width: 100%;
}


