/* Import Gudnak font from Adobe TypeKit */
@import url('https://use.typekit.net/pdq1pmx.css');

/* Base dark theme */
html, body {
  background-color: #111111 !important;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'jaf-lapture', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'jaf-lapture', Georgia, serif;
}

/* Layout: offset content for sidebar on desktop */
body {
  padding-left: 280px;
  min-height: 100vh;
  margin: 0;
}

/* Map/list pages use this to fill viewport */
body.page-app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  body {
    padding-left: 0;
  }
}

/* ========== SIDEBAR ========== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 280px;
  background: #111111;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 0 12px;
  overflow: hidden;
  /* Opacity controlled by nav-loader.js inline CSS:
     - Cached visit: opacity:1 (instant)
     - First visit: opacity:0 → .ready adds opacity:1 with transition */
}

.sidebar.ready {
  opacity: 1 !important;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 320px;
  }
  .sidebar.open {
    transform: translateX(0);
  }
}

/* Sidebar hero/banner */
.sidebar-hero {
  height: 160px;
  background-image: url('/bg1.png');
  background-size: cover;
  background-position: center;
  position: relative;
  margin: 0 -12px;
  padding: 32px;
  flex-shrink: 0;
}

.sidebar-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, #111111);
  pointer-events: none;
}

.sidebar-hero img {
  height: 45px;
  position: relative;
  z-index: 1;
}

/* Nav section */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  position: relative;
}

.sidebar-nav::after {
  content: '';
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #111111);
  pointer-events: none;
  flex-shrink: 0;
}

.sidebar-nav-top {
  padding-top: 4px;
}

.sidebar-nav a,
.sidebar-nav button.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.55rem 1.2rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
  font-family: 'jaf-lapture', serif;
  text-align: left;
  margin: 1px 0;
}

.sidebar-nav a:hover,
.sidebar-nav button.nav-btn:hover {
  background: rgba(74, 237, 196, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-nav a.active {
  background: linear-gradient(90deg, rgba(74, 237, 196, 0.12) 0%, transparent 100%);
  color: #4aedc4;
  border-left-color: #4aedc4;
  font-weight: 600;
}

.sidebar-nav a.active:hover {
  background: linear-gradient(90deg, rgba(74, 237, 196, 0.18) 0%, transparent 100%);
  color: #6ff5d6;
  border-left-color: #6ff5d6;
}

.sidebar-nav .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sub-navigation items (indented under parent) */
.sidebar-nav a.sidebar-sub {
  font-size: 0.82rem;
  padding-left: 40px;
  height: 28px;
  color: rgba(255, 255, 255, 0.5);
}

.sidebar-nav a.sidebar-sub:hover {
  color: white;
}

.sidebar-nav a.sidebar-sub.active {
  color: #4aedc4;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4aedc4;
  padding: 8px 18px 4px;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 12px 16px;
}

/* Sidebar user/bottom section */
.sidebar-bottom {
  padding-bottom: 16px;
  flex-shrink: 0;
}

.sidebar-bottom a,
.sidebar-bottom button.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0.55rem 1.2rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  border-radius: 0;
  transition: all 0.15s ease;
  cursor: pointer;
  font-family: 'jaf-lapture', serif;
  text-align: left;
  margin: 1px 0;
}

.sidebar-bottom a:hover,
.sidebar-bottom button.nav-btn:hover {
  background: rgba(74, 237, 196, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-bottom .user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ── Collapsible sections ── */
.sidebar-section-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: color 0.15s;
}

.sidebar-section-toggle:hover {
  color: #6ff5d6;
}

.sidebar-section-toggle .section-chevron {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.sidebar-section-toggle.collapsed .section-chevron {
  transform: rotate(-90deg);
}

.sidebar-section-links {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  opacity: 1;
}

.sidebar-section-links.collapsed {
  max-height: 0;
  opacity: 0;
}

/* ── Shard points badge ── */
.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.shard-points-badge {
  font-size: 0.65rem;
  color: #4aedc4;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ── Notification badges ── */
.nav-badge {
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  background: #FF533F;
  color: white;
  margin-left: auto;
  flex-shrink: 0;
  padding: 0 5px;
  animation: badgePop 0.3s ease;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ── Page loading progress bar ── */
.nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
}

.nav-progress.loading {
  background: linear-gradient(90deg, transparent, #4aedc4, transparent);
  background-size: 200% 100%;
  animation: navProg 1.2s ease infinite;
}

.nav-progress.done {
  background: #4aedc4;
  opacity: 0;
  transition: opacity 0.3s;
}

@keyframes navProg {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Mobile sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 49;
}

.sidebar-overlay.active {
  display: block;
}

/* Mobile hamburger button */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 48;
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
}

/* Mobile close button in sidebar */
.sidebar-close-btn {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 52;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 768px) {
  .sidebar-close-btn {
    display: block;
  }
}

/* ========== VIEW TOGGLE TABS ========== */

.view-toggle-bar {
  background: #1c1c1c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 30;
}

.view-toggle-bar .inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
}

.view-toggle-bar .spacer { flex: 1; }

/* Button group toggle — matches gudnak-fe IconButton pair */
.view-btn-group {
  display: inline-flex;
  flex-shrink: 0;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'jaf-lapture', serif;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
}

.view-btn:first-child {
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.view-btn:last-child {
  border-radius: 0 8px 8px 0;
}

.view-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}

.view-btn.active {
  background: #FF533F;
  color: white;
  border-color: #FF533F;
}

.view-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Filter inputs — matches gudnak-fe Input component */
.filter-input {
  width: 100%;
  padding: 10px 14px;
  padding-left: 36px;
  border-radius: 10px;
  background: rgba(20, 24, 37, 0.8);
  border: 1px solid rgba(30, 37, 56, 1);
  color: rgba(234, 239, 245, 0.9);
  font-size: 0.875rem;
  font-family: 'jaf-lapture', serif;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.filter-input::placeholder {
  color: rgba(79, 91, 114, 1);
}

.filter-input:hover {
  border-color: rgba(40, 48, 74, 1);
}

.filter-input:focus {
  outline: none;
  border-color: #4aedc4;
  box-shadow: 0 0 0 3px rgba(74, 237, 196, 0.12);
}

.filter-input-wrap {
  position: relative;
}

.filter-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: rgba(255, 255, 255, 0.35);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}

.filter-input.no-icon {
  padding-left: 14px;
}

.filter-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(20, 24, 37, 0.8);
  border: 1px solid rgba(30, 37, 56, 1);
  color: rgba(234, 239, 245, 0.9);
  font-size: 0.875rem;
  font-family: 'jaf-lapture', serif;
  transition: all 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234f5b72' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
  box-sizing: border-box;
}

.filter-select:hover {
  border-color: rgba(40, 48, 74, 1);
}

.filter-select:focus {
  outline: none;
  border-color: #4aedc4;
  box-shadow: 0 0 0 3px rgba(74, 237, 196, 0.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234aedc4' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

.filter-select option {
  background: #111520;
  color: rgba(234, 239, 245, 0.9);
}

/* Checkbox toggle — matches gudnak-fe Button variant toggle */
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  font-family: 'jaf-lapture', serif;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.filter-toggle:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.8);
}

.filter-toggle.active {
  background: rgba(255, 83, 63, 0.12);
  border-color: rgba(255, 83, 63, 0.3);
  color: #FF7267;
}

/* Result count — matches gudnak-fe */
.result-count {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* List view cards */
.list-card {
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.list-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.list-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.list-card .card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2px;
}

.list-card .card-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.list-card .card-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
}

.list-card .card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Page title in view bar */
.page-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #FFFFFF;
  font-family: 'jaf-lapture', serif;
}

/* Count badge */
.count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 10px;
  border-radius: 20px;
}

/* ========== MAP LAYOUT ========== */

.map-view {
  flex: 1;
  position: relative;
  min-height: 0;
}

.map-view .map-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.list-view {
  flex: 1;
  overflow-y: auto;
}

/* Map overlay panel — floats over the map on the left */
.map-panel {
  position: absolute;
  top: 16px;
  left: 16px;
  bottom: 16px;
  z-index: 1000;
  width: 360px;
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 768px) {
  .map-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 45vh;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
  }

  .view-toggle-bar .inner {
    padding: 0 12px;
    gap: 8px;
    height: 48px;
  }

  .view-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .page-title {
    font-size: 0.95rem;
  }

  .locate-btn {
    bottom: 50vh;
    right: 12px;
  }
}

.map-panel .panel-header {
  padding: 20px;
  background: #1c1c1c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.map-panel .panel-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #FFFFFF;
  font-family: 'jaf-lapture', serif;
}

.map-panel .panel-count {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

.map-panel .panel-search {
  margin-top: 12px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  font-family: 'jaf-lapture', serif;
  transition: border-color 0.15s;
}

.map-panel .panel-search::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.map-panel .panel-search:focus {
  outline: none;
  border-color: #FF533F;
  box-shadow: 0 0 0 2px rgba(255, 83, 63, 0.15);
}

.map-panel .panel-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.map-panel .panel-footer {
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.map-panel .panel-footer button {
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-family: 'jaf-lapture', serif;
  font-size: 0.7rem;
  transition: all 0.15s;
}

.map-panel .panel-footer button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

/* Map panel list items */
.map-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
}

.map-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.map-item.active {
  background: rgba(255, 83, 63, 0.1);
  border-left: 2px solid #FF533F;
}

.map-item .item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.map-item .item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.map-item .item-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-item .item-sub {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-item .item-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Locate me button */
.locate-btn {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'jaf-lapture', serif;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.locate-btn:hover {
  background: #222;
  border-color: rgba(255, 255, 255, 0.2);
}

.locate-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ========== LEAFLET POPUP DARK THEME ========== */

.leaflet-popup-content-wrapper {
  background: #1c1c1c !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-family: 'jaf-lapture', serif !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  min-width: 220px;
}

.leaflet-popup-tip {
  background: #1c1c1c !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

.leaflet-popup-close-button {
  color: rgba(255, 255, 255, 0.4) !important;
  font-size: 20px !important;
  top: 8px !important;
  right: 10px !important;
}

.leaflet-popup-close-button:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Player popup card */
.player-popup {
  padding: 20px;
  text-align: center;
}

.player-popup .popup-avatar {
  width: 72px;
  height: 72px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  margin: 0 auto 12px;
  display: block;
}

.player-popup .popup-username {
  font-weight: 600;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2px;
}

.player-popup .popup-city {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.player-popup .popup-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.player-popup .popup-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-popup .popup-times {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 14px;
}

.player-popup .popup-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.player-popup .popup-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  font-family: 'jaf-lapture', serif;
  cursor: pointer;
  border: none;
}

.player-popup .popup-btn-primary {
  background: #FF533F;
  color: white;
}

.player-popup .popup-btn-primary:hover {
  background: #E64A38;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 83, 63, 0.3);
}

.player-popup .popup-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-popup .popup-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

/* ========== DARK THEME OVERRIDES ========== */

/* Dark cards */
.dark-card {
  background: #1c1c1c !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Dark inputs */
.dark-input {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.dark-input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

.dark-input:hover {
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.dark-input:focus {
  border-color: #FF533F !important;
  box-shadow: 0 0 0 3px rgba(255, 83, 63, 0.2) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  outline: none !important;
}

/* Dark tables */
.dark-table {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.dark-table thead tr {
  background: #181818 !important;
}

.dark-table th {
  color: rgba(255, 255, 255, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.dark-table td {
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.8) !important;
}

.dark-table tbody tr {
  background: #1c1c1c !important;
}

.dark-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Accent button */
.btn-accent {
  background: #FF533F !important;
  color: white !important;
  border: none !important;
  transition: all 0.2s ease;
}

.btn-accent:hover {
  background: #E64A38 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 83, 63, 0.3);
}

/* Nak header text style */
.nak-header {
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.01em;
}

/* Dark modal */
.dark-modal-bg {
  background: #1c1c1c !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.dark-modal-bg h3 {
  color: rgba(255, 255, 255, 0.9) !important;
}

.dark-modal-bg label {
  color: rgba(255, 255, 255, 0.7) !important;
}

.dark-modal-bg select,
.dark-modal-bg input[type="text"],
.dark-modal-bg input[type="number"],
.dark-modal-bg input[type="datetime-local"],
.dark-modal-bg input[type="date"],
.dark-modal-bg input[type="time"],
.dark-modal-bg input[type="url"],
.dark-modal-bg textarea {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.dark-modal-bg select option {
  background: #1c1c1c;
  color: rgba(255, 255, 255, 0.9);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #111111;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Override Tailwind light theme classes for dark theme */
.bg-gray-100 { background-color: #111111 !important; }
.bg-white { background-color: #1c1c1c !important; }
.text-gray-800, .text-gray-700, .text-gray-900 { color: rgba(255, 255, 255, 0.9) !important; }
.text-gray-600 { color: rgba(255, 255, 255, 0.6) !important; }
.text-gray-500 { color: rgba(255, 255, 255, 0.5) !important; }
.text-gray-400 { color: rgba(255, 255, 255, 0.4) !important; }
.border-gray-200, .border-gray-300 { border-color: rgba(255, 255, 255, 0.1) !important; }
.shadow-lg, .shadow-md, .shadow { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important; }
.hover\:bg-gray-50:hover { background-color: rgba(255, 255, 255, 0.05) !important; }
.hover\:bg-gray-100:hover { background-color: rgba(255, 255, 255, 0.08) !important; }
.bg-gray-300 { background-color: rgba(255, 255, 255, 0.15) !important; color: rgba(255,255,255,0.9) !important; }
.hover\:bg-gray-400:hover { background-color: rgba(255, 255, 255, 0.25) !important; }
.bg-gray-200 { background-color: rgba(255, 255, 255, 0.1) !important; color: rgba(255,255,255,0.8) !important; }
.hover\:bg-gray-300:hover { background-color: rgba(255, 255, 255, 0.15) !important; }

/* Form inputs dark mode */
input, select, textarea {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

input::placeholder, textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

select option {
  background: #1c1c1c;
  color: rgba(255, 255, 255, 0.9);
}

input:focus, select:focus, textarea:focus {
  border-color: #FF533F;
  box-shadow: 0 0 0 3px rgba(255, 83, 63, 0.2);
  outline: none;
}

/* Blue buttons -> accent */
.bg-blue-600 { background-color: #FF533F !important; }
.hover\:bg-blue-700:hover { background-color: #E64A38 !important; }
.bg-blue-500 { background-color: #FF533F !important; }
.hover\:bg-blue-600:hover { background-color: #E64A38 !important; }
.text-blue-600 { color: #FF7267 !important; }
.hover\:text-blue-600:hover { color: #FF533F !important; }
.focus\:ring-blue-300:focus { box-shadow: 0 0 0 3px rgba(255, 83, 63, 0.2) !important; }
.ring-blue-300 { --tw-ring-color: rgba(255, 83, 63, 0.2) !important; }
.border-blue-600 { border-color: #FF533F !important; }

/* Indigo buttons -> accent */
.bg-indigo-600 { background-color: #FF533F !important; }
.hover\:bg-indigo-700:hover { background-color: #E64A38 !important; }

