/* Custom Design Tokens */
:root {
  --bg-color: #0b0c10;
  --bg-card: rgba(31, 40, 51, 0.65);
  --bg-card-hover: rgba(40, 52, 68, 0.8);
  --text-primary: #f5f5f7;
  --text-secondary: #c5a880; /* Warm golden/sand secondary tone */
  --text-muted: #8b9bb4;
  --primary: #8b5cf6; /* Neon Violet */
  --primary-glow: rgba(139, 92, 246, 0.4);
  --accent: #06b6d4; /* Neon Cyan */
  --accent-glow: rgba(6, 182, 212, 0.4);
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --border-color: rgba(139, 92, 246, 0.25);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --shadow-neon: 0 0 15px var(--primary-glow);
  --shadow-neon-cyan: 0 0 15px var(--accent-glow);
}

/* Base Styles & Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.15) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  padding-bottom: 2rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* App Header & Branding */
.app-header {
  background: rgba(11, 12, 16, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  width: 100%;
}

@media (min-width: 769px) {
  .header-container {
    max-width: 800px;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  cursor: pointer;
}

.city-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 0.5rem;
  letter-spacing: 0.05em;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.logo-icon {
  color: var(--accent);
  text-shadow: var(--shadow-neon-cyan);
}

.logo-text {
  letter-spacing: 0.05em;
}

.accent-text {
  color: var(--primary);
  text-shadow: var(--shadow-neon);
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.3s ease;
}

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

.nav-btn.active {
  color: var(--accent);
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.25);
  text-shadow: 0 0 5px rgba(6, 182, 212, 0.5);
}

.logout-btn {
  color: var(--danger) !important;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}

/* Team Status Bar */
.team-bar {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  padding: 0.25rem 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: #000;
}

.team-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

@media (min-width: 769px) {
  .team-bar-container {
    max-width: 800px;
  }
}

.team-bar span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Team Players Bar */
.team-players-bar {
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.35rem 0;
  font-size: 0.8rem;
  width: 100%;
}

.players-bar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

@media (min-width: 769px) {
  .players-bar-container {
    max-width: 800px;
  }
}

/* App Main */
.app-main {
  max-width: 600px; /* Centered narrow column for mobile-first layout */
  margin: 1.5rem auto 0 auto;
  padding: 0 1rem;
}

@media (min-width: 769px) {
  .app-main {
    max-width: 800px;
  }
}

/* Views Panels */
.view-panel {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.view-panel.active {
  display: block;
}

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fa-spin-slow {
  animation: spin 8s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Welcome Hero styles */
.welcome-hero {
  text-align: center;
  margin: 2rem 0;
}

.welcome-hero h1 {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.welcome-hero p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Auth Cards & Tabs */
.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 0.3rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.6rem 0;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-card {
  display: none;
}

.auth-card.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* Glassmorphism Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: border-color 0.3s ease;
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.card-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.card-header h3 {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
  background: rgba(0, 0, 0, 0.45);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.player-input-row {
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #0891b2 100%);
  color: #000;
  font-weight: 700;
  box-shadow: var(--shadow-neon-cyan);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* Checkboxes */
.check-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.check-group input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary);
  margin-top: 0.2rem;
}

.check-group label {
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* Info Cards */
.welcome-info-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 1.5rem;
}

.welcome-info-card h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.welcome-info-card ul {
  list-style: none;
}

.welcome-info-card li {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.step-num {
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.75rem;
}

.badge-primary {
  background: rgba(139, 92, 246, 0.2);
  color: var(--primary);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Progress Stepper & Dots */
.progress-container {
  padding: 1rem 1.25rem;
}

.progress-text-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.progress-pct {
  color: var(--accent);
}

.progress-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkpoint-dots {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 0 0.5rem;
}

.checkpoint-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1f2833;
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  z-index: 2;
  transition: all 0.3s ease;
}

.checkpoint-dot.completed {
  background: var(--success);
  border-color: var(--success);
  color: #000;
}

.checkpoint-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-neon);
}

/* Quest Card & Clue */
.quest-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.quest-header h2 {
  font-size: 1.4rem;
  color: var(--text-primary);
}

.quest-clue {
  font-size: 1rem;
  color: var(--text-primary);
  font-style: italic;
  line-height: 1.6;
}

/* Map CSS settings */
.leaflet-map-container {
  height: 200px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
  background: #000;
  z-index: 5;
}

@media (min-width: 769px) {
  .leaflet-map-container {
    height: 300px;
  }
}

.geo-status-box {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 1rem;
}

.geo-status-loading {
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.geo-status-ready {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--text-muted);
}

.geo-status-ready span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.geo-status-error {
  color: var(--danger);
}

.map-actions-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0.75rem;
}

/* Question & Answer Card (Locked / Unlocked) */
.question-card {
  position: relative;
  overflow: hidden;
}

.question-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 12, 16, 0.9);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}

.lock-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lock-content i {
  color: var(--primary);
  text-shadow: var(--shadow-neon);
  margin-bottom: 0.5rem;
}

.lock-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 300px;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--accent);
  margin-bottom: 1.25rem;
}

.answer-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 0.75rem;
}

.hint-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed var(--warning);
  color: #fff;
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  animation: fadeIn 0.3s ease-out;
}

/* Finish Scavenger Hunt Card */
.finish-card {
  text-align: center;
  padding: 3rem 1.5rem;
}

.finish-icon {
  font-size: 4rem;
  color: var(--warning);
  margin-bottom: 1rem;
}

.finish-card h2 {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.finish-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin: 2rem 0;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem 0.5rem;
}

.stat-val {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-secondary);
}

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

.finish-congrats {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Leaderboard view styling */
.section-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

.section-title h2 {
  font-size: 1.75rem;
  color: #fff;
}

.section-title p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.leaderboard-table th {
  padding: 0.75rem 1rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-table td {
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.rank-cell {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

.rank-gold { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
.rank-silver { color: #c0c0c0; text-shadow: 0 0 10px rgba(192, 192, 192, 0.4); }
.rank-bronze { color: #cd7f32; text-shadow: 0 0 10px rgba(205, 127, 50, 0.4); }

.team-players {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Admin Dashboard layout */
.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-header-row h2 {
  font-size: 1.5rem;
}

.admin-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 0.3rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.05);
  overflow-x: auto;
  white-space: nowrap;
}

.admin-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.admin-tab-btn.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.05);
}

.admin-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.admin-tab-content.active {
  display: block;
}

.admin-teams-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-teams-table th {
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  text-align: left;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.admin-teams-table td {
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-quest-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 769px) {
  .admin-quest-layout {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

.admin-quests-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-right: 0.4rem;
}

.admin-quests-list::-webkit-scrollbar {
  width: 6px;
}
.admin-quests-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}
.admin-quests-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
.admin-quests-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.admin-quest-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.admin-quest-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.admin-quest-info h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.admin-quest-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-quest-actions {
  display: flex;
  gap: 0.5rem;
}

/* Modals for Group Evaluation details */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(8px);
}

.modal-dialog {
  width: 100%;
  max-width: 500px;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: #11141a;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

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

.modal-header h3 {
  font-size: 1.2rem;
  color: var(--accent);
}

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

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.25rem;
  max-height: 75vh;
  overflow-y: auto;
}

/* Evaluation stats styling */
.eval-stats-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.eval-stat-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}

.eval-stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.eval-stat-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.eval-timeline-title {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
  padding-bottom: 0.25rem;
}

.eval-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.eval-timeline-item {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(139, 92, 246, 0.3);
}

.eval-timeline-item::after {
  content: '';
  position: absolute;
  top: 4px;
  left: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #11141a;
}

.eval-timeline-item.completed::after {
  background: var(--success);
}

.eval-timeline-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
}

.eval-timeline-details {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.eval-timeline-details span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.timeline-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-weight: 700;
}

.timeline-badge-correct { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.timeline-badge-hints { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

/* Utility classes */
.hide-mobile {
  display: table-cell;
}

@media (max-width: 600px) {
  .hide-mobile {
    display: none;
  }
}

/* Custom scrollbars for admin logs */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Memory fix details: Align centered images properly at the bottom if using icons/sprites */
.leaflet-marker-icon {
  object-fit: contain;
  object-position: bottom center;
}

/* Wikimedia Thumbnails Gallery */
.wikimedia-thumb {
  width: 100%;
  height: 65px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.wikimedia-thumb:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}
.wikimedia-thumb.selected {
  border-color: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* City Groups Styling */
.city-group-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin: 1.5rem 0 0.5rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.city-group-title:first-of-type {
  margin-top: 0.5rem;
}
.city-group-title i {
  color: var(--accent);
}

/* Team management button styling */
#edit-team-players-btn {
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.25);
  color: #000;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-weight: 700;
  transition: all 0.2s ease;
  margin-left: auto;
}
#edit-team-players-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border-color: #000;
}

/* Multiple Choice Option Buttons */
.mc-option-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}
.mc-option-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}
.mc-option-card.selected {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}
.mc-option-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.mc-option-card.selected .mc-option-indicator {
  border-color: var(--accent);
  background: var(--accent);
}
.mc-option-indicator::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #000;
  display: none;
}
.mc-option-card.selected .mc-option-indicator::after {
  display: block;
}

/* Admin quest list image display */
.admin-quest-image-container {
  width: 55px;
  height: 55px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.admin-quest-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
}

/* Admin quizzes list layout and scrollbar */
.admin-quizzes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.admin-quizzes-list::-webkit-scrollbar {
  width: 6px;
}
.admin-quizzes-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}
.admin-quizzes-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
.admin-quizzes-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Custom Scrollbar for selected quests list */
#quiz-selected-quests-list::-webkit-scrollbar {
  width: 6px;
}
#quiz-selected-quests-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}
#quiz-selected-quests-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
#quiz-selected-quests-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}


/* Custom Leaflet Station Pins */
.custom-station-marker {
  background: none;
  border: none;
}
.station-marker-pin {
  background-color: var(--primary);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
  border: 2px solid white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}
.station-marker-pin span {
  transform: rotate(45deg);
  display: inline-block;
}
.station-marker-pin.selected {
  background-color: var(--accent);
  box-shadow: 0 0 15px var(--accent);
  transform: rotate(-45deg) scale(1.15);
  animation: markerPulse 2s infinite ease-in-out;
}
.station-marker-pin.solved {
  background-color: var(--success);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

@keyframes markerPulse {
  0% {
    transform: rotate(-45deg) scale(1.15);
    box-shadow: 0 0 15px var(--accent);
  }
  50% {
    transform: rotate(-45deg) scale(1.3);
    box-shadow: 0 0 25px var(--accent), 0 0 10px var(--accent);
  }
}

/* Fullscreen Map Toggle style */
.leaflet-map-container.fullscreen {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1500 !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

/* Glowing Player Group Marker */
.player-group-marker-container {
  background-color: var(--accent); /* Neon Cyan */
  color: #000;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 12px var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  animation: markerGlow 1.5s infinite alternate ease-in-out;
}
@keyframes markerGlow {
  from {
    box-shadow: 0 0 10px var(--accent);
    transform: scale(1);
  }
  to {
    box-shadow: 0 0 20px var(--accent), 0 0 8px var(--accent);
    transform: scale(1.08);
  }
}

/* Active Quiz Highlight */
.admin-quest-item.active-quiz-item {
  border-color: var(--success) !important;
  background: rgba(16, 185, 129, 0.04) !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15) !important;
}

.admin-quest-item.active-quiz-item:hover {
  background: rgba(16, 185, 129, 0.06) !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25) !important;
}

/* Pulsing dot for active elements */
.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
  vertical-align: middle;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Admin Team Marker Styling */
.admin-team-marker-container {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid #10b981; /* Emerald green border */
  background: #0b0c10;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
}
.admin-team-marker-container:hover {
  transform: scale(1.15);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.9);
  border-color: var(--accent);
}
.admin-team-marker-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-team-marker-container.default-team-icon {
  color: #10b981;
  font-size: 0.95rem;
}
