@import url(https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Marcellus:wght@400&family=UnifrakturMaguntia&display=swap);
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* ==================== VIKING HORDE THEME - ROOT & RESET ==================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Viking Color Palette */
  --primary: #B8860B;           /* Norse Gold */
  --primary-dark: #8B6914;      /* Dark Gold */
  --secondary: #654321;         /* Viking Brown */
  --danger: #8B0000;            /* Blood Red */
  --warning: #FF4500;           /* Fire Orange */
  --success: #2F4F2F;           /* Forest Green */
  
  /* Viking Text Colors */
  --text-primary: #F5DEB3;      /* Wheat */
  --text-secondary: #FAEBD7;    /* Antique White */
  --text-accent: #FFD700;       /* Gold */
  
  /* Viking Backgrounds */
  --bg-primary: #1C1C1C;        /* Dark Iron */
  --bg-secondary: #2F2F2F;      /* Charcoal */
  --bg-tertiary: #3C3C3C;       /* Lighter Charcoal */
  
  /* Viking Borders & Effects */
  --border: #B8860B;            /* Gold Border */
  --border-dark: #8B6914;       /* Dark Gold Border */
  --shadow: rgba(184, 134, 11, 0.3); /* Golden Shadow */
  --shadow-dark: rgba(0, 0, 0, 0.7);
  
  /* Viking Styling */
  --radius: 8px;                /* More angular, less modern */
  --spacing: 16px;
  
  /* Viking Gradients */
  --gradient-gold: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  --gradient-iron: linear-gradient(135deg, #2F2F2F 0%, #1C1C1C 100%);
  --gradient-fire: linear-gradient(135deg, #FF4500 0%, #8B0000 100%);
}

/* Light Theme - Hybrid Viking Style */
[data-theme="light"] {
  /* Lighter Viking Colors */
  --primary: #DAA520;           /* Lighter Gold */
  --primary-dark: #B8860B;      /* Medium Gold */
  --secondary: #8B4513;         /* Lighter Brown */
  --danger: #CD5C5C;            /* Lighter Red */
  --warning: #FF6347;           /* Lighter Orange */
  --success: #556B2F;           /* Lighter Green */
  
  /* Lighter Text Colors */
  --text-primary: #2F2F2F;      /* Dark Gray */
  --text-secondary: #4A4A4A;    /* Medium Gray */
  --text-accent: #B8860B;       /* Gold Accent */
  
  /* Lighter Backgrounds */
  --bg-primary: #F5F5DC;        /* Beige */
  --bg-secondary: #E8E8D0;      /* Light Beige */
  --bg-tertiary: #DCDCC8;       /* Medium Beige */
  
  /* Lighter Borders & Effects */
  --border: #DAA520;            /* Light Gold Border */
  --border-dark: #B8860B;       /* Medium Gold Border */
  --shadow: rgba(218, 165, 32, 0.2); /* Light Golden Shadow */
  --shadow-dark: rgba(47, 47, 47, 0.3);
  
  /* Viking Gradients - Lighter */
  --gradient-gold: linear-gradient(135deg, #FFD700 0%, #DAA520 50%, #B8860B 100%);
  --gradient-iron: linear-gradient(135deg, #E8E8D0 0%, #F5F5DC 100%);
  --gradient-fire: linear-gradient(135deg, #FF6347 0%, #CD5C5C 100%);
}

body {
  font-family: 'Cinzel', 'Times New Roman', serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #1C1C1C;
  background: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(184, 134, 11, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(139, 69, 20, 0.1) 0%, transparent 50%);
  color: #F5DEB3;
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
}

/* Viking Rune Pattern Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width=%2760%27 height=%2760%27 viewBox=%270 0 60 60%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cg fill=%27none%27 fill-rule=%27evenodd%27%3E%3Cg fill=%27%23B8860B%27 fill-opacity=%270.05%27%3E%3Cpath d=%27M30 30l15-15v30L30 30zm0 0l-15 15h30L30 30z%27/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

/* ==================== VIKING LAYOUT ==================== */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: linear-gradient(135deg, #2F2F2F 0%, #1C1C1C 100%);
  background: var(--gradient-iron);
  border-bottom: 3px solid #B8860B;
  border-bottom: 3px solid var(--border);
  border-image: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%) 1;
  border-image: var(--gradient-gold) 1;
  padding: 0.75rem 16px;
  padding: 0.75rem var(--spacing); /* Much less vertical padding */
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  box-shadow: 0 2px 10px var(--shadow-dark); /* Reduced shadow */
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}

.app-header h1 {
  font-family: 'UnifrakturMaguntia', 'Cinzel', serif;
  font-size: clamp(1.3rem, 4vw, 1.8rem); /* Much smaller font size */
  font-weight: 700;
  color: #FFD700;
  color: var(--text-accent);
  margin-bottom: 0; /* Remove bottom margin */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  text-shadow: 1px 1px 2px var(--shadow-dark); /* Reduced text shadow */
  letter-spacing: 1px; /* Reduced letter spacing */
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.5rem; /* Reduced gap */
  cursor: default;
  transition: all 0.3s ease;
}

.app-header h1 .favicon-icon {
  width: 1.2em; /* Smaller icon */
  height: 1.2em;
  filter: drop-shadow(0 0 4px #FFD700) 
          drop-shadow(0 0 6px rgba(184, 134, 11, 0.5));
  filter: drop-shadow(0 0 4px var(--text-accent)) 
          drop-shadow(0 0 6px rgba(184, 134, 11, 0.5)); /* Reduced glow */
  transition: all 0.3s ease;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-radius: var(--radius);
  border: 1px solid rgba(184, 134, 11, 0.3);
  font-size: 0.9rem;
  color: #FAEBD7;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.header-user-info .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #1C1C1C;
  color: var(--bg-primary);
  font-size: 0.8rem;
  border: 2px solid #FFD700;
  border: 2px solid var(--text-accent);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem; /* Reduced gap */
  align-items: center;
  margin-top: 0.5rem; /* Reduced top margin */
}

.header-actions span {
  font-size: 0.9rem; /* Smaller font */
  color: #FAEBD7;
  color: var(--text-secondary);
  margin-right: auto;
  font-weight: 500;
}

.main-content {
  flex: 1 1;
  padding: 16px;
  padding: var(--spacing);
  padding-bottom: 4.5rem; /* More space for fixed footer */
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  overflow: visible !important;
}

/* ==================== VIKING BUTTONS ==================== */
button {
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
  color: #1C1C1C;
  color: var(--bg-primary);
  border: 2px solid #8B6914;
  border: 2px solid var(--border-dark);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Cinzel', serif;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 8px rgba(184, 134, 11, 0.3);
  box-shadow: 0 4px 8px var(--shadow);
  position: relative;
  overflow: hidden;
}

button:hover:not(:disabled) {
  background: #8B6914;
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(184, 134, 11, 0.3);
  box-shadow: 0 6px 16px var(--shadow);
  border-color: #FFD700;
  border-color: var(--text-accent);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #3C3C3C;
  background: var(--bg-tertiary);
  color: #F5DEB3;
  color: var(--text-primary);
}

button.delete-btn {
  background: linear-gradient(135deg, #FF4500 0%, #8B0000 100%);
  background: var(--gradient-fire);
  border-color: #8B0000;
  border-color: var(--danger);
}

button.delete-btn:hover:not(:disabled) {
  background: #8B0000;
  background: var(--danger);
  border-color: #FF4500;
}

/* ==================== MODERN NAVIGATION BUTTONS ==================== */
.header-actions button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.header-actions button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.header-actions button:hover::before {
  left: 100%;
}

.header-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(184, 134, 11, 0.3);
  box-shadow: 0 8px 20px var(--shadow);
}

.header-actions button:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

/* Theme toggle button special styling */
.header-actions button:first-child {
  background: #2F2F2F;
  background: var(--bg-secondary);
  color: #F5DEB3;
  color: var(--text-primary);
  border: 2px solid #B8860B;
  border: 2px solid var(--border);
  min-width: 120px;
}

.header-actions button:first-child:hover {
  background: #3C3C3C;
  background: var(--bg-tertiary);
  border-color: #FFD700;
  border-color: var(--text-accent);
}

/* Help button special styling */
.header-actions button:nth-child(3) {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  border-color: #1e40af;
}

.header-actions button:nth-child(3):hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: #1d4ed8;
}

/* ==================== HAMBURGER MENU ==================== */
.hamburger-menu-container {
  position: relative;
  display: flex;
  align-items: center;
}

.hamburger-button {
  background: #2F2F2F !important;
  background: var(--bg-secondary) !important;
  border: 2px solid #B8860B !important;
  border: 2px solid var(--border) !important;
  color: #FFD700 !important;
  color: var(--text-accent) !important;
  transition: all 0.3s ease !important;
}

.hamburger-button:hover {
  background: #3C3C3C !important;
  background: var(--bg-tertiary) !important;
  border-color: #FFD700 !important;
  border-color: var(--text-accent) !important;
  transform: scale(1.05) !important;
}

.hamburger-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #2F2F2F;
  background: var(--bg-secondary);
  border: 2px solid #B8860B;
  border: 2px solid var(--border);
  border-radius: 8px;
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
  box-shadow: 0 8px 20px var(--shadow-dark);
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 5000;
  overflow: hidden;
}

.hamburger-menu-container:hover .hamburger-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hamburger-item {
  padding: 0.75rem 1rem;
  color: #F5DEB3;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.hamburger-item:last-child {
  border-bottom: none;
}

.hamburger-item:hover {
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
  color: #1C1C1C;
  color: var(--bg-primary);
  padding-left: 1.25rem;
}

.theme-toggle-emoji {
  background: #2F2F2F !important;
  background: var(--bg-secondary) !important;
  border: 2px solid #B8860B !important;
  border: 2px solid var(--border) !important;
  color: #FFD700 !important;
  color: var(--text-accent) !important;
  transition: all 0.3s ease !important;
  box-shadow: none !important;
}

.theme-toggle-emoji:hover {
  background: #3C3C3C !important;
  background: var(--bg-tertiary) !important;
  border-color: #FFD700 !important;
  border-color: var(--text-accent) !important;
  transform: scale(1.1) !important;
}

/* ==================== VIKING GAME SELECTOR & VIEW TOGGLE ==================== */
.game-selector,
.view-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.view-toggle button {
  background: #2F2F2F;
  background: var(--bg-secondary);
  color: #F5DEB3;
  color: var(--text-primary);
  border: 2px solid #B8860B;
  border: 2px solid var(--border);
  flex: 1 1;
  min-width: 120px;
  position: relative;
}

.view-toggle button.active {
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
  color: #1C1C1C;
  color: var(--bg-primary);
  border-color: #FFD700;
  border-color: var(--text-accent);
  box-shadow: inset 0 2px 4px rgba(184, 134, 11, 0.3);
  box-shadow: inset 0 2px 4px var(--shadow);
}

.view-toggle button:hover:not(:disabled) {
  border-color: #FFD700;
  border-color: var(--text-accent);
  background: #3C3C3C;
  background: var(--bg-tertiary);
}

.view-toggle button.active:hover:not(:disabled) {
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
}

/* ==================== VIKING CARDS ==================== */
.entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  grid-gap: 1.5rem;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.entity-card {
  background: #2F2F2F;
  background: var(--bg-secondary);
  border: 2px solid #B8860B;
  border: 2px solid var(--border);
  border-radius: 8px;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  box-shadow: 0 4px 12px var(--shadow-dark);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.entity-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
}

.entity-card:hover {
  box-shadow: 0 8px 24px rgba(184, 134, 11, 0.3);
  box-shadow: 0 8px 24px var(--shadow);
  transform: translateY(-4px);
  border-color: #FFD700;
  border-color: var(--text-accent);
}

.entity-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #FFD700;
  color: var(--text-accent);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  text-shadow: 1px 1px 2px var(--shadow-dark);
}

.entity-card p {
  font-size: 0.95rem;
  color: #FAEBD7;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.entity-card .game-name,
.entity-card .division-name {
  font-size: 0.8rem;
  color: #B8860B;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(184, 134, 11, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #B8860B;
  border-top: 1px solid var(--border);
}

.card-actions button {
  flex: 1 1;
  min-width: 90px;
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
}

/* ==================== VIKING USERS SECTION ==================== */
.users-section {
  background: #2F2F2F;
  background: var(--bg-secondary);
  border: 2px solid #B8860B;
  border: 2px solid var(--border);
  border-radius: 8px;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  box-shadow: 0 4px 12px var(--shadow-dark);
  position: relative;
  min-height: 70vh;
  overflow: visible !important;
}

.users-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #B8860B;
  border-bottom: 2px solid var(--border);
}

.section-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #FFD700;
  color: var(--text-accent);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  text-shadow: 1px 1px 2px var(--shadow-dark);
}

/* ==================== VIKING TABLE ==================== */
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-family: 'Marcellus', serif;
  table-layout: fixed;
  position: relative;
  overflow: visible !important;
}

.users-table thead {
  background: linear-gradient(135deg, #2F2F2F 0%, #1C1C1C 100%);
  background: var(--gradient-iron);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.users-table th {
  padding: 1rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-family: 'Cinzel', serif;
  color: #FFD700;
  color: var(--text-accent);
  border-bottom: 3px solid #B8860B;
  border-bottom: 3px solid var(--border);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #1C1C1C;
  background: var(--bg-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative; /* Required for resize handle positioning */
}

/* Table layout for dynamic column widths */
.users-table th,
.users-table td {
  min-width: 60px; /* Minimum width to prevent columns from becoming too small */
}

.users-table tbody {
  display: block;
  overflow-y: visible;
}

.users-table thead,
.users-table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.users-table td {
  padding: 0.875rem 0.75rem;
  border-bottom: 1px solid #B8860B;
  border-bottom: 1px solid var(--border);
  color: #F5DEB3;
  color: var(--text-primary);
  transition: all 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
}

.users-table td button {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  margin: 0.125rem;
}

.users-table tr:hover {
  background: #1C1C1C;
  background: var(--bg-primary);
  border-left: 4px solid #FFD700;
  border-left: 4px solid var(--text-accent);
}

.users-table tr:nth-child(even) {
  background: rgba(184, 134, 11, 0.05);
}

/* Responsive table adjustments - removed fixed widths to allow dynamic resizing */
@media (max-width: 1200px) {
  /* Responsive adjustments can be added here if needed */
}

/* Mobile table optimization */
@media (max-width: 768px) {
  .users-table {
    font-size: 0.75rem;
  }
  
  .users-table th,
  .users-table td {
    padding: 0.5rem 0.25rem;
  }
  
  .users-table td button {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }
}

/* ==================== COLUMN RESIZING ==================== */
.resize-handle {
  position: absolute;
  top: 0;
  right: -8px;
  width: 16px;
  height: 100%;
  background: transparent;
  cursor: col-resize;
  border-right: 3px solid transparent;
  transition: all 0.2s ease;
  z-index: 999; /* Increased z-index to ensure it's on top */
  pointer-events: auto; /* Ensure pointer events work */
}

.resize-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 60%;
  background: repeating-linear-gradient(
    to bottom,
    #FAEBD7 0px,
    #FAEBD7 2px,
    transparent 2px,
    transparent 4px
  );
  background: repeating-linear-gradient(
    to bottom,
    var(--text-secondary) 0px,
    var(--text-secondary) 2px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.resize-handle:hover {
  border-right-color: #FFD700;
  border-right-color: var(--text-accent);
  background: rgba(184, 134, 11, 0.3);
  box-shadow: 0 0 8px rgba(184, 134, 11, 0.3);
}

.resize-handle:hover::before {
  opacity: 1;
  background: repeating-linear-gradient(
    to bottom,
    #FFD700 0px,
    #FFD700 2px,
    transparent 2px,
    transparent 4px
  );
  background: repeating-linear-gradient(
    to bottom,
    var(--text-accent) 0px,
    var(--text-accent) 2px,
    transparent 2px,
    transparent 4px
  );
}

.resize-handle:active {
  border-right-color: #B8860B;
  border-right-color: var(--primary);
  background: rgba(184, 134, 11, 0.5);
  box-shadow: 0 0 12px rgba(184, 134, 11, 0.5);
}

.resize-handle:active::before {
  background: repeating-linear-gradient(
    to bottom,
    #B8860B 0px,
    #B8860B 2px,
    transparent 2px,
    transparent 4px
  );
  background: repeating-linear-gradient(
    to bottom,
    var(--primary) 0px,
    var(--primary) 2px,
    transparent 2px,
    transparent 4px
  );
}

/* Ensure table columns use dynamic widths */
.users-table {
  table-layout: fixed;
  width: 100%;
}

.users-table th,
.users-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 60px; /* Minimum width only, no fixed width */
}

/* ==================== PROGRESS INDICATOR ==================== */
.progress-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(28, 28, 28, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.progress-container {
  background: #2F2F2F;
  background: var(--bg-secondary);
  border: 2px solid #B8860B;
  border: 2px solid var(--border);
  border-radius: 8px;
  border-radius: var(--radius);
  padding: 2rem;
  min-width: 400px;
  max-width: 600px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  box-shadow: 0 10px 30px var(--shadow-dark);
}

.progress-container h3 {
  color: #FFD700;
  color: var(--text-accent);
  font-family: 'Cinzel', serif;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.4rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #3C3C3C;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid #8B6914;
  border: 1px solid var(--border-dark);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
  border-radius: 4px;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(184, 134, 11, 0.5);
}

.progress-text {
  text-align: center;
  color: #FAEBD7;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  font-family: 'Marcellus', serif;
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.progress-step.completed {
  background: rgba(47, 79, 47, 0.2);
  border: 1px solid #2F4F2F;
  border: 1px solid var(--success);
}

.progress-step.active {
  background: rgba(184, 134, 11, 0.2);
  border: 1px solid #B8860B;
  border: 1px solid var(--border);
  animation: pulse 2s infinite;
}

.progress-step.pending {
  background: rgba(60, 60, 60, 0.3);
  border: 1px solid #3C3C3C;
  border: 1px solid var(--bg-tertiary);
  opacity: 0.6;
}

.step-indicator {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.progress-step.completed .step-indicator {
  background: #2F4F2F;
  background: var(--success);
  color: #F5DEB3;
  color: var(--text-primary);
}

.progress-step.active .step-indicator {
  background: #B8860B;
  background: var(--primary);
  color: #1C1C1C;
  color: var(--bg-primary);
}

.progress-step.pending .step-indicator {
  background: #3C3C3C;
  background: var(--bg-tertiary);
  color: #FAEBD7;
  color: var(--text-secondary);
  border: 1px solid #8B6914;
  border: 1px solid var(--border-dark);
}

.step-title {
  color: #F5DEB3;
  color: var(--text-primary);
  font-family: 'Marcellus', serif;
  font-size: 0.9rem;
}

.progress-step.pending .step-title {
  color: #FAEBD7;
  color: var(--text-secondary);
}

@keyframes pulse {
  0%, 100% { 
    background: rgba(184, 134, 11, 0.2); 
  }
  50% { 
    background: rgba(184, 134, 11, 0.4); 
  }
}

/* ==================== PAGINATION ==================== */
.pagination {
  display: flex;
  padding-bottom: 1rem;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.pagination button {
  min-width: 100px;
}

.pagination span {
  font-weight: 500;
  color: #FAEBD7;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ==================== VIKING FORMS & INPUTS ==================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #B8860B;
  border: 2px solid var(--border);
  border-radius: 8px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: 'Marcellus', serif;
  background: #1C1C1C;
  background: var(--bg-primary);
  color: #F5DEB3;
  color: var(--text-primary);
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7);
  box-shadow: inset 0 2px 4px var(--shadow-dark);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #FFD700;
  border-color: var(--text-accent);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.3), inset 0 2px 4px var(--shadow-dark);
  background: #2F2F2F;
  background: var(--bg-secondary);
}

input::placeholder,
textarea::placeholder {
  color: #F5DEB3;
  color: var(--text-primary);
  opacity: 0.7;
}

label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-family: 'Cinzel', serif;
  font-weight: 500;
  color: #FFD700;
  color: var(--text-accent);
  margin: 1rem 0;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #B8860B;
  accent-color: var(--primary);
}

/* ==================== VIKING MODALS ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  padding: var(--spacing);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

/* Higher z-index for modals that need to appear on top of other modals */
.modal-overlay.modal-layered {
  z-index: 2000;
  background: rgba(0, 0, 0, 0.6); /* Slightly less opaque so you can see the modal underneath */
}

.modal-content {
  background: #2F2F2F;
  background: var(--bg-secondary);
  border: 3px solid #B8860B;
  border: 3px solid var(--border);
  border-radius: 8px;
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  box-shadow: 0 20px 40px var(--shadow-dark);
  animation: modalSlideIn 0.4s ease-out;
  position: relative;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #FFD700;
  color: var(--text-accent);
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  text-shadow: 1px 1px 2px var(--shadow-dark);
}

.modal-content form > * {
  margin-bottom: 1.25rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.modal-actions button {
  flex: 1 1;
  min-width: 120px;
}

.modal-actions button[type="button"] {
  background: #3C3C3C;
  background: var(--bg-tertiary);
  color: #F5DEB3;
  color: var(--text-primary);
  border-color: #F5DEB3;
  border-color: var(--text-primary);
}

.modal-actions button[type="button"]:hover {
  background: #1C1C1C;
  background: var(--bg-primary);
  border-color: #FFD700;
  border-color: var(--text-accent);
}

.assign-section {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: #1C1C1C;
  background: var(--bg-primary);
  border: 2px solid #B8860B;
  border: 2px solid var(--border);
  border-radius: 8px;
  border-radius: var(--radius);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7);
  box-shadow: inset 0 2px 4px var(--shadow-dark);
}

.assign-section h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #FFD700;
  color: var(--text-accent);
}

.assign-section select,
.assign-section button {
  margin-top: 0.75rem;
}

/* ==================== VIKING LOGIN ==================== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding: var(--spacing);
  background: linear-gradient(135deg, #2F2F2F 0%, #1C1C1C 100%);
  background: var(--gradient-iron);
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(184, 134, 11, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(139, 69, 20, 0.2) 0%, transparent 50%);
  position: relative;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width=%27100%27 height=%27100%27 viewBox=%270 0 100 100%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cg fill=%27%23B8860B%27 fill-opacity=%270.1%27%3E%3Cpath d=%27M50 50l25-25v50L50 50zm0 0l-25 25h50L50 50z%27/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.login-box {
  background: #2F2F2F;
  background: var(--bg-secondary);
  border: 3px solid #B8860B;
  border: 3px solid var(--border);
  padding: 2.5rem;
  border-radius: 8px;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  box-shadow: 0 20px 40px var(--shadow-dark);
  width: 100%;
  max-width: 450px;
  position: relative;
  z-index: 1;
}

.login-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
}

.login-box h1 {
  font-family: 'UnifrakturMaguntia', 'Cinzel', serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: #FFD700;
  color: var(--text-accent);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  text-shadow: 2px 2px 4px var(--shadow-dark);
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-box h1::before {
  content: "🛡️ ";
  -webkit-text-fill-color: #FFD700;
  -webkit-text-fill-color: var(--text-accent);
}

.login-box h1::after {
  content: " 🛡️";
  -webkit-text-fill-color: #FFD700;
  -webkit-text-fill-color: var(--text-accent);
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-box button {
  margin-top: 1rem;
  padding: 1rem;
  font-size: 1.1rem;
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */
@media (max-width: 768px) {
  :root {
    --spacing: 12px;
  }

  .app-header {
    padding: 0.5rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
    min-height: auto;
  }

  .app-header h1 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    text-align: center;
  }

  .header-nav {
    width: 100%;
    flex-direction: row;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .header-user-info {
    justify-content: center;
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .header-user-info .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }

  .header-actions {
    justify-content: center;
    gap: 0.5rem;
  }

  .header-actions button {
    width: 100%;
    max-width: 120px;
  }

  .main-content {
    padding: 1rem;
    padding-bottom: 1rem;
  }

  .entity-grid {
    grid-template-columns: 1fr;
  }

  .users-section {
    padding: 1rem;
    overflow-x: auto;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    flex-direction: column;
    width: 100%;
  }

  .header-actions button {
    width: 100%;
  }

  .modal-content {
    padding: 1.25rem;
    max-height: 85vh;
  }

  .game-selector {
    flex-direction: column;
  }

  .game-selector select,
  .game-selector button {
    width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .entity-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (min-width: 1025px) {
  .entity-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .users-table {
    font-size: 0.9rem;
  }
}

/* ==================== UTILITIES ==================== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ==================== VIKING SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #1C1C1C;
  background: var(--bg-primary);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
  border-radius: 6px;
  border: 2px solid #1C1C1C;
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: #8B6914;
  background: var(--primary-dark);
}

::-webkit-scrollbar-corner {
  background: #1C1C1C;
  background: var(--bg-primary);
}

/* ==================== VIKING ANIMATIONS ==================== */
@keyframes vikingGlow {
  0%, 100% { 
    box-shadow: 0 0 5px rgba(184, 134, 11, 0.3); 
    box-shadow: 0 0 5px var(--shadow);
  }
  50% { 
    box-shadow: 0 0 20px #FFD700, 0 0 30px rgba(184, 134, 11, 0.5); 
    box-shadow: 0 0 20px var(--text-accent), 0 0 30px rgba(184, 134, 11, 0.5);
  }
}

@keyframes runeShimmer {
  0% { opacity: 0.3; }
  50% { opacity: 0.8; }
  100% { opacity: 0.3; }
}

/* ==================== VIKING UTILITY CLASSES ==================== */
.viking-badge {
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
  color: #1C1C1C;
  color: var(--bg-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid #8B6914;
  border: 1px solid var(--border-dark);
}

.viking-divider {
  height: 3px;
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
  margin: 2rem 0;
  border-radius: 2px;
}

.viking-glow {
  animation: vikingGlow 3s ease-in-out infinite;
}

.rune-shimmer {
  animation: runeShimmer 2s ease-in-out infinite;
}

/* ==================== ACTIONS DROPDOWN (HAMBURGER STYLE) ==================== */
.actions-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.actions-dropdown-btn {
  background: #2F2F2F !important;
  background: var(--bg-secondary) !important;
  border: 2px solid #B8860B !important;
  border: 2px solid var(--border) !important;
  color: #FFD700 !important;
  color: var(--text-accent) !important;
  font-size: 1.2rem !important;
  cursor: pointer !important;
  padding: 0.5rem !important;
  border-radius: 8px !important;
  border-radius: var(--radius) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  width: 40px !important;
  height: 40px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  min-width: auto !important;
}

.actions-dropdown-btn:hover {
  background: #3C3C3C !important;
  background: var(--bg-tertiary) !important;
  border-color: #FFD700 !important;
  border-color: var(--text-accent) !important;
  transform: scale(1.05) !important;
}

.actions-dropdown-content {
  background: #2F2F2F;
  background: var(--bg-secondary);
  border: 2px solid #B8860B;
  border: 2px solid var(--border);
  border-radius: 8px;
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
  box-shadow: 0 8px 20px var(--shadow-dark);
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 10001;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
}

.actions-dropdown.open .actions-dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.actions-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  text-align: left;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #F5DEB3;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.actions-dropdown-item:hover {
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold);
  color: #1C1C1C;
  color: var(--bg-primary);
  padding-left: 1.25rem;
}

.actions-dropdown-item:first-child {
  border-radius: 0;
}

.actions-dropdown-item:last-child {
  border-bottom: none;
  border-radius: 0 0 8px 8px;
  border-radius: 0 0 var(--radius) var(--radius);
}

.actions-dropdown-item.delete-action {
  color: #8B0000;
  color: var(--danger);
  border-top: 1px solid rgba(184, 134, 11, 0.2);
}

.actions-dropdown-item.delete-action:hover {
  background: linear-gradient(135deg, #FF4500 0%, #8B0000 100%);
  background: var(--gradient-fire);
  color: white;
}

/* Backdrop overlay when any dropdown is open */
.dropdown-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: transparent;
}

/* ==================== LOADING ANIMATIONS ==================== */
@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

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

/* ==================== MOBILE CMS REDESIGN ==================== */

/* Hide desktop elements on mobile and show mobile layout */
@media (max-width: 768px) {
  /* Mobile app container */
  .app-container {
    padding-bottom: 80px; /* Space for bottom nav */
  }

  /* Mobile header - simplified */
  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #1C1C1C;
    background: var(--bg-primary);
    border-bottom: 2px solid #B8860B;
    border-bottom: 2px solid var(--border);
    padding: 1rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

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

  .mobile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #B8860B;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F5DEB3;
    color: var(--text-primary);
    font-weight: bold;
    font-size: 1rem;
  }

  .mobile-user-details {
    display: flex;
    flex-direction: column;
  }

  .mobile-username {
    font-weight: bold;
    color: #FFD700;
    color: var(--text-accent);
    font-size: 0.9rem;
  }

  .mobile-role {
    font-size: 0.8rem;
    color: #FAEBD7;
    color: var(--text-secondary);
  }

  .mobile-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  .mobile-theme-toggle,
  .mobile-menu-toggle {
    background: #654321;
    background: var(--secondary);
    border: 2px solid #B8860B;
    border: 2px solid var(--border);
    color: #F5DEB3;
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }

  .mobile-theme-toggle:hover,
  .mobile-menu-toggle:hover {
    background: #B8860B;
    background: var(--primary);
    transform: scale(1.05);
  }

  /* Mobile menu overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-menu-content {
    background: #1C1C1C;
    background: var(--bg-primary);
    border: 2px solid #B8860B;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    width: 300px;
  }

  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #B8860B;
    border-bottom: 1px solid var(--border);
  }

  .mobile-menu-header h3 {
    margin: 0;
    color: #FFD700;
    color: var(--text-accent);
  }

  .mobile-menu-header button {
    background: none;
    border: none;
    color: #F5DEB3;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-menu-header button:hover {
    background: #2F2F2F;
    background: var(--bg-secondary);
  }

  .mobile-menu-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .mobile-menu-items button {
    background: #2F2F2F;
    background: var(--bg-secondary);
    border: 1px solid #B8860B;
    border: 1px solid var(--border);
    color: #F5DEB3;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    transition: all 0.2s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-menu-items button:hover {
    background: #B8860B;
    background: var(--primary);
    transform: translateX(2px);
  }

  .mobile-logout-btn {
    background: #8B0000 !important;
    background: var(--danger) !important;
    margin-top: 0.5rem;
  }

  .mobile-logout-btn:hover {
    background: #A52A2A !important;
  }

  .mobile-menu-divider {
    height: 1px;
    background: #B8860B;
    background: var(--border);
    margin: 0.5rem 0;
  }

  /* Mobile progress indicator */
  .mobile-progress-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #B8860B;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    z-index: 3000;
    max-width: 80vw;
  }

  .mobile-progress-container {
    text-align: center;
  }

  .mobile-progress-container h3 {
    margin: 0 0 1rem 0;
    color: #FFD700;
    color: var(--text-accent);
  }

  .mobile-progress-bar {
    width: 100%;
    height: 8px;
    background: #2F2F2F;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
  }

  .mobile-progress-fill {
    height: 100%;
    background: #B8860B;
    background: var(--primary);
    transition: width 0.3s ease;
  }

  .mobile-progress-text {
    color: #F5DEB3;
    color: var(--text-primary);
    font-size: 0.9rem;
  }

  /* Mobile maintenance banner */
  .mobile-maintenance-banner {
    background: #8B0000;
    background: var(--danger);
    color: white;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid #8B6914;
    border-bottom: 2px solid var(--border-dark);
  }

  /* Mobile main content */
  .mobile-main-content {
    margin-top: 80px; /* Account for fixed header */
    margin-bottom: 80px; /* Account for bottom nav */
    padding: 1rem;
  }

  /* Mobile entity list */
  .mobile-entity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .mobile-entity-list h2 {
    color: #FFD700;
    color: var(--text-accent);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
  }

  /* Mobile entity cards */
  .mobile-entity-card {
    background: #2F2F2F;
    background: var(--bg-secondary);
    border: 2px solid #B8860B;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
  }

  .mobile-entity-card:hover {
    border-color: #B8860B;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }

  .mobile-entity-card.skeleton {
    animation: pulse 1.5s ease-in-out infinite;
  }

  .mobile-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .mobile-card-content h3 {
    margin: 0;
    color: #FFD700;
    color: var(--text-accent);
    font-size: 1.1rem;
  }

  .mobile-card-content p {
    margin: 0;
    color: #FAEBD7;
    color: var(--text-secondary);
    font-size: 0.9rem;
  }

  .mobile-card-meta {
    font-size: 0.8rem;
    color: #FAEBD7;
    color: var(--text-secondary);
    font-style: italic;
  }

  .mobile-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
  }

  .mobile-card-actions button {
    padding: 0.4rem 0.8rem;
    border: 1px solid #B8860B;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #3C3C3C;
    background: var(--bg-tertiary);
    color: #F5DEB3;
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    min-height: 36px;
    transition: all 0.2s ease;
  }

  .mobile-card-actions button:hover {
    background: #B8860B;
    background: var(--primary);
    transform: translateY(-1px);
  }

  .mobile-delete-btn {
    background: #8B0000 !important;
    background: var(--danger) !important;
  }

  .mobile-delete-btn:hover {
    background: #A52A2A !important;
  }

  /* Skeleton loading animation */
  .skeleton-line {
    height: 16px;
    background: #3C3C3C;
    background: var(--bg-tertiary);
    border-radius: 4px;
    margin-bottom: 8px;
  }

  .skeleton-line.short {
    width: 60%;
  }

  /* Mobile bottom navigation */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1C1C1C;
    background: var(--bg-primary);
    border-top: 2px solid #B8860B;
    border-top: 2px solid var(--border);
    padding: 0.5rem;
    display: flex;
    justify-content: space-around;
    z-index: 1000;
  }

  .mobile-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    min-height: 60px;
    justify-content: center;
    background: none;
    border: none;
    color: #F5DEB3;
    color: var(--text-primary);
    font-size: 0.8rem;
  }

  .mobile-bottom-nav button.active {
    background: #B8860B;
    background: var(--primary);
    color: #F5DEB3;
    color: var(--text-primary);
  }

  .mobile-bottom-nav button:hover {
    background: #2F2F2F;
    background: var(--bg-secondary);
  }

  .mobile-bottom-nav button span {
    font-size: 0.7rem;
    margin-top: 2px;
  }

  /* Mobile modals */
  .mobile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
  }

  .mobile-modal-content {
    background: #1C1C1C;
    background: var(--bg-primary);
    border: 2px solid #B8860B;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    width: 100%;
  }

  .mobile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #B8860B;
    border-bottom: 1px solid var(--border);
  }

  .mobile-modal-header h3 {
    margin: 0;
    color: #FFD700;
    color: var(--text-accent);
  }

  .mobile-modal-header button {
    background: none;
    border: none;
    color: #F5DEB3;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-modal-header button:hover {
    background: #2F2F2F;
    background: var(--bg-secondary);
  }

  .mobile-modal-body {
    color: #F5DEB3;
    color: var(--text-primary);
  }

  /* Mobile toast notifications */
  .mobile-toast-container {
    position: fixed;
    bottom: 100px; /* Above bottom nav */
    left: 1rem;
    right: 1rem;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
  }

  .mobile-toast {
    background: #2F2F2F;
    background: var(--bg-secondary);
    border: 2px solid #B8860B;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #F5DEB3;
    color: var(--text-primary);
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideInFromBottom 0.3s ease-out;
    pointer-events: auto;
    cursor: pointer;
  }

  .mobile-toast-error {
    border-color: #8B0000;
    border-color: var(--danger);
    background: rgba(139, 0, 0, 0.1);
  }

  .mobile-toast-success {
    border-color: #2F4F2F;
    border-color: var(--success);
    background: rgba(47, 79, 47, 0.1);
  }

  .mobile-toast-warning {
    border-color: #FF4500;
    border-color: var(--warning);
    background: rgba(255, 69, 0, 0.1);
  }

  /* Animations */
  @keyframes slideInFromBottom {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  @keyframes pulse {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.5;
    }
  }

  .mobile-nav-item .icon {
    font-size: 1.2rem;
  }

  .mobile-nav-item .label {
    font-size: 0.7rem;
    text-align: center;
  }

  /* Mobile search */
  .mobile-search {
    margin-bottom: 1rem;
  }

  .mobile-search input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #B8860B;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: #1C1C1C;
    background: var(--bg-primary);
    color: #F5DEB3;
    color: var(--text-primary);
    font-size: 1rem;
  }

  /* Mobile pagination */
  .mobile-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .mobile-pagination button {
    padding: 0.5rem 1rem;
    border: 2px solid #B8860B;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: #2F2F2F;
    background: var(--bg-secondary);
    color: #F5DEB3;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
  }

  /* Mobile modals - full screen */
  .mobile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
  }

  .mobile-modal-content {
    background: #1C1C1C;
    background: var(--bg-primary);
    border-top: 2px solid #B8860B;
    border-top: 2px solid var(--border);
    border-radius: 12px 12px 0 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    animation: slideUp 0.3s ease-out;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .mobile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #B8860B;
    border-bottom: 1px solid var(--border);
  }

  .mobile-modal-header h2 {
    margin: 0;
    color: #FFD700;
    color: var(--text-accent);
    font-size: 1.2rem;
  }

  .mobile-modal-close {
    background: none;
    border: none;
    color: #F5DEB3;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-modal-body {
    margin-bottom: 1rem;
  }

  .mobile-form-group {
    margin-bottom: 1rem;
  }

  .mobile-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #FFD700;
    color: var(--text-accent);
    font-weight: bold;
  }

  .mobile-form-group input,
  .mobile-form-group select,
  .mobile-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #B8860B;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: #2F2F2F;
    background: var(--bg-secondary);
    color: #F5DEB3;
    color: var(--text-primary);
    font-size: 1rem;
    box-sizing: border-box;
  }

  .mobile-modal-footer {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #B8860B;
    border-top: 1px solid var(--border);
  }

  .mobile-modal-footer button {
    flex: 1 1;
    padding: 0.75rem;
    border: 2px solid #B8860B;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    min-height: 48px;
  }

  .mobile-modal-footer .btn-primary {
    background: #B8860B;
    background: var(--primary);
    color: #F5DEB3;
    color: var(--text-primary);
  }

  .mobile-modal-footer .btn-secondary {
    background: #2F2F2F;
    background: var(--bg-secondary);
    color: #F5DEB3;
    color: var(--text-primary);
  }

  /* Mobile toast positioning */
  .toast-container {
    top: 90px;
    left: 1rem;
    right: 1rem;
    bottom: auto;
  }

  /* Hide desktop footer on mobile */
  .app-footer {
    display: none;
  }
}

/* ==================== MOBILE RESPONSIVENESS ==================== */

/* Mobile-first approach - Touch-friendly buttons */
@media (max-width: 768px) {
  /* Touch-friendly buttons */
  button, .btn {
    min-height: 44px; /* iOS recommended touch target */
    min-width: 44px;
    padding: 12px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 6px;
  }

  /* Header adjustments */
  .app-header {
    padding: 0.5rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }

  .app-header h1 {
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 0.5rem;
  }

  .header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
  }

  .header-actions span {
    order: -1;
    font-size: 0.9rem;
  }

  /* Section headers */
  .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .section-header h2 {
    text-align: center;
    margin-bottom: 0;
  }

  /* Game selector and search */
  .game-selector {
    flex-direction: column;
    gap: 0.5rem;
  }

  .game-selector form {
    flex-direction: column;
    width: 100%;
  }

  .game-selector input {
    width: 100% !important;
    min-width: auto !important;
  }

  .game-selector button {
    width: 100%;
    max-width: 200px;
    align-self: center;
  }

  /* View toggle buttons */
  .view-toggle {
    flex-direction: column;
    gap: 0.5rem;
  }

  .view-toggle button {
    width: 100%;
    max-width: 200px;
  }

  /* Users table - horizontal scroll */
  .users-table {
    font-size: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin: 0 -1rem;
    padding: 0 1rem;
  }

  .users-table th,
  .users-table td {
    white-space: nowrap;
    padding: 8px 12px;
    min-width: 120px;
  }

  /* Stack table vertically on very small screens */
  @media (max-width: 480px) {
    .users-table {
      display: block;
      border: none;
    }

    .users-table thead {
      display: none;
    }

    .users-table tbody {
      display: block;
    }

    .users-table tr {
      display: block;
      border: 1px solid #B8860B;
      border: 1px solid var(--border);
      border-radius: 8px;
      border-radius: var(--radius);
      margin-bottom: 1rem;
      padding: 1rem;
      background: #2F2F2F;
      background: var(--bg-secondary);
    }

    .users-table td {
      display: block;
      border: none;
      padding: 0.5rem 0;
      position: relative;
      padding-left: 50%;
      text-align: left;
      min-width: auto;
      white-space: normal;
    }

    .users-table td:before {
      content: attr(data-label) ": ";
      position: absolute;
      left: 0;
      width: 45%;
      font-weight: bold;
      color: #FFD700;
      color: var(--text-accent);
    }
  }

  /* Modal improvements */
  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-footer {
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }

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

  /* Pagination improvements */
  .pagination {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  .pagination span {
    order: -1;
    text-align: center;
    font-size: 0.9rem;
  }

  .pagination button {
    width: 100%;
    max-width: 150px;
  }

  /* Entity grid improvements */
  .entity-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Toast positioning */
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  /* Footer adjustments */
  .app-footer {
    position: relative;
    margin-top: 2rem;
    padding: 1rem;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .users-table {
    font-size: 15px;
  }

  .entity-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}
/* StatisticsModal.css */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.viking-modal {
  background: #1C1C1C;
  background: var(--bg-primary, #1C1C1C);
  border: 3px solid #B8860B;
  border: 3px solid var(--border, #B8860B);
  border-radius: 8px;
  border-radius: var(--radius, 8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.7);
  box-shadow: 0 8px 24px var(--shadow-dark, rgba(0,0,0,0.7));
  max-width: 1000px;
  max-height: 85vh;
  overflow: hidden;
  position: relative;
}

.viking-modal::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold, linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%));
  border-radius: 8px;
  border-radius: var(--radius, 8px);
  z-index: -1;
  opacity: 0.3;
}

.stats-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #2F2F2F;
  background: var(--bg-secondary, #2F2F2F);
  border: 2px solid #B8860B;
  border: 2px solid var(--border, #B8860B);
  border-radius: 8px;
  border-radius: var(--radius, 8px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.7);
  box-shadow: 0 4px 8px var(--shadow-dark, rgba(0,0,0,0.7));
}

.stats-section h3 {
  margin: 0 0 1.5rem 0;
  color: #FFD700;
  color: var(--text-accent, #FFD700);
  font-size: 1.4rem;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
  text-shadow: 1px 1px 2px var(--shadow-dark, rgba(0,0,0,0.7));
  border-bottom: 1px solid #B8860B;
  border-bottom: 1px solid var(--border, #B8860B);
  padding-bottom: 0.5rem;
  font-family: 'Cinzel', serif;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 1.5rem;
  gap: 1.5rem;
}

.stat-card {
  background: #3C3C3C;
  background: var(--bg-tertiary, #3C3C3C);
  padding: 2rem 1.5rem;
  border-radius: 8px;
  border-radius: var(--radius, 8px);
  text-align: center;
  box-shadow: 0 3px 6px rgba(0,0,0,0.7);
  box-shadow: 0 3px 6px var(--shadow-dark, rgba(0,0,0,0.7));
  border: 2px solid #8B6914;
  border: 2px solid var(--border-dark, #8B6914);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.7);
  box-shadow: 0 6px 12px var(--shadow-dark, rgba(0,0,0,0.7));
  border-color: #B8860B;
  border-color: var(--primary, #B8860B);
}

.stat-card.inbound {
  border-color: #2F4F2F;
  border-color: var(--success, #2F4F2F);
  background: linear-gradient(135deg, rgba(47, 79, 47, 0.1), rgba(47, 79, 47, 0.05));
  box-shadow: 0 3px 6px rgba(47, 79, 47, 0.3);
}

.stat-card.outbound {
  border-color: #654321;
  border-color: var(--secondary, #654321);
  background: linear-gradient(135deg, rgba(101, 67, 33, 0.1), rgba(101, 67, 33, 0.05));
  box-shadow: 0 3px 6px rgba(101, 67, 33, 0.3);
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  color: #FFD700;
  color: var(--text-accent, #FFD700);
  margin-bottom: 0.75rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  text-shadow: 2px 2px 4px var(--shadow-dark, rgba(0,0,0,0.7));
  font-family: 'Cinzel', serif;
}

.stat-label {
  font-size: 1rem;
  color: #F5DEB3;
  color: var(--text-primary, #F5DEB3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  font-family: 'Cinzel', serif;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #3C3C3C;
  background: var(--bg-tertiary, #3C3C3C);
  border: 1px solid #8B6914;
  border: 1px solid var(--border-dark, #8B6914);
  border-radius: 8px;
  border-radius: var(--radius, 8px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.7);
  box-shadow: 0 2px 4px var(--shadow-dark, rgba(0,0,0,0.7));
  transition: all 0.3s ease;
}

.breakdown-item:hover {
  background: #2F2F2F;
  background: var(--bg-secondary, #2F2F2F);
  border-color: #B8860B;
  border-color: var(--primary, #B8860B);
  transform: translateX(5px);
}

.breakdown-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.breakdown-name {
  font-weight: 600;
  color: #F5DEB3;
  color: var(--text-primary, #F5DEB3);
  font-size: 1.1rem;
  font-family: 'Cinzel', serif;
}

.breakdown-division {
  font-size: 0.85rem;
  color: #FAEBD7;
  color: var(--text-secondary, #FAEBD7);
  opacity: 0.8;
}

.breakdown-count {
  font-weight: 600;
  color: #FFD700;
  color: var(--text-accent, #FFD700);
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold, linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%));
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.7);
  box-shadow: 0 2px 4px var(--shadow-dark, rgba(0,0,0,0.7));
  border: 1px solid #B8860B;
  border: 1px solid var(--border, #B8860B);
  font-family: 'Cinzel', serif;
}

.no-data {
  text-align: center;
  color: #FAEBD7;
  color: var(--text-secondary, #FAEBD7);
  font-style: italic;
  padding: 3rem 2rem;
  background: #3C3C3C;
  background: var(--bg-tertiary, #3C3C3C);
  border-radius: 8px;
  border-radius: var(--radius, 8px);
  border: 1px solid #8B6914;
  border: 1px solid var(--border-dark, #8B6914);
  font-family: 'Marcellus', serif;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #B8860B;
  border-bottom: 2px solid var(--border, #B8860B);
  background: linear-gradient(135deg, #2F2F2F 0%, #1C1C1C 100%);
  background: var(--gradient-iron, linear-gradient(135deg, #2F2F2F 0%, #1C1C1C 100%));
  padding: 1.5rem;
  border-radius: 8px 8px 0 0;
  border-radius: var(--radius, 8px) var(--radius, 8px) 0 0;
}

.modal-header h2 {
  margin: 0;
  color: #FFD700;
  color: var(--text-accent, #FFD700);
  font-size: 1.8rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  text-shadow: 2px 2px 4px var(--shadow-dark, rgba(0,0,0,0.7));
  font-family: 'Cinzel', serif;
}

.close-button {
  background: linear-gradient(135deg, #FF4500 0%, #8B0000 100%);
  background: var(--gradient-fire, linear-gradient(135deg, #FF4500 0%, #8B0000 100%));
  border: 2px solid #8B0000;
  border: 2px solid var(--danger, #8B0000);
  font-size: 1.5rem;
  cursor: pointer;
  color: #F5DEB3;
  color: var(--text-primary, #F5DEB3);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border-radius: var(--radius, 8px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.7);
  box-shadow: 0 2px 4px var(--shadow-dark, rgba(0,0,0,0.7));
}

.close-button:hover {
  background: linear-gradient(135deg, #8B0000 0%, #FF4500 100%);
  background: var(--gradient-fire, linear-gradient(135deg, #8B0000 0%, #FF4500 100%));
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.7);
  box-shadow: 0 4px 8px var(--shadow-dark, rgba(0,0,0,0.7));
}

.modal-body {
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

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

.control-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #3C3C3C;
  background: var(--bg-tertiary, #3C3C3C);
  border: 2px solid #8B6914;
  border: 2px solid var(--border-dark, #8B6914);
  border-radius: 8px;
  border-radius: var(--radius, 8px);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: #F5DEB3;
  color: var(--text-primary, #F5DEB3);
}

.control-checkbox:hover {
  background: #2F2F2F;
  background: var(--bg-secondary, #2F2F2F);
  border-color: #B8860B;
  border-color: var(--primary, #B8860B);
}

.control-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #B8860B;
  accent-color: var(--primary, #B8860B);
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 2px solid #B8860B;
  border-top: 2px solid var(--border, #B8860B);
  background: #2F2F2F;
  background: var(--bg-secondary, #2F2F2F);
  padding: 1.5rem;
  border-radius: 0 0 8px 8px;
  border-radius: 0 0 var(--radius, 8px) var(--radius, 8px);
}

.modal-actions button {
  padding: 1rem 2rem;
  border: 2px solid #B8860B;
  border: 2px solid var(--primary, #B8860B);
  border-radius: 8px;
  border-radius: var(--radius, 8px);
  background: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  background: var(--gradient-gold, linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%));
  color: #1C1C1C;
  color: var(--bg-primary, #1C1C1C);
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 3px 6px rgba(0,0,0,0.7);
  box-shadow: 0 3px 6px var(--shadow-dark, rgba(0,0,0,0.7));
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-actions button:hover {
  background: linear-gradient(135deg, #B8860B 0%, #FFD700 50%, #8B6914 100%);
  background: var(--gradient-gold, linear-gradient(135deg, #B8860B 0%, #FFD700 50%, #8B6914 100%));
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.7);
  box-shadow: 0 5px 10px var(--shadow-dark, rgba(0,0,0,0.7));
}
