/* Sidebar Layout - Modern Left Navigation */

/* Remove top navigation since we're using sidebar */
.ah-nav,
nav.ah-nav {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

/* Main layout container */
body {
  margin: 0;
  padding: 0;
  display: flex;
  min-height: 100vh;
  overflow: hidden; /* prevent page/body scroll; main-content will scroll */
  background: transparent;
}

/* Background is underlay, content above background */
.sidebar, .main-content { position: relative; z-index: 2; }

/* Hide mobile header/backdrop on desktop (769px+) */
@media (min-width: 769px) {
  .mobile-header { display: none !important; }
  .sidebar-backdrop { display: none !important; }
}

/* Left Sidebar */
.sidebar {
  width: 240px;
  background: transparent;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0 12px 12px 0;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.2);
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  z-index: 1000;
  overflow-y: auto;
}

/* Mobile sidebar styles are handled in mobile-optimized.css */

.sidebar-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 40px);
}

/* Logo */
.sidebar-logo {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo img {
  height: 48px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

/* Superuser Banner - Simple red rectangle with text */
.superuser-banner {
  display: none !important;
  background: #c0392b;
  color: #ffffff;
  text-align: center;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.superuser-banner.visible {
  display: block !important;
}

/* Superuser banner in sidebar-user section */
.sidebar-user .superuser-banner {
  margin-left: 0;
  margin-right: 0;
  width: calc(100% - 20px);
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 0 !important; /* Remove all padding to ensure no extra left padding on Windows */
  margin: 0 !important; /* Remove all margin to ensure no extra left margin on Windows */
  list-style: none !important; /* Remove any list styling */
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-left: 16px !important; /* Explicitly set left padding to match Mac version */
  margin: 0 0 4px 0 !important; /* Explicitly set all margins, especially left to 0 */
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box; /* Ensure consistent box model */
}

.nav-item span {
  flex: 1;
  min-width: 0;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-item.active {
  background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.nav-item.active:hover {
  background: linear-gradient(135deg, #5AC8FA 0%, #007AFF 100%);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* User Section */
.sidebar-user {
  padding: 20px 12px 12px 20px;
  border-top: none;
  border-bottom: none;
  margin-bottom: 12px;
}

/* Reduce spacing on iPad */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar-user {
    margin-bottom: 6px;
    padding: 16px 12px 10px 20px;
  }
  
  .sidebar-user #sidebarUser {
    padding-bottom: 8px;
    margin-bottom: 8px;
  }
}

/* Email (user name) area gets its own divider below it */
.sidebar-user #sidebarUser {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
}

/* Hide auth UI and protected links by default to prevent flicker; nav-global.js will reveal when authed */
.sidebar-user #sidebarUser { display: none; }
.sidebar-user #sidebarLogout { display: none; }
.sidebar a[href="mydecks.html"],
.sidebar a[href="campaigns.html"],
.sidebar a[href="deck-dashboard.html"] { display: none; }

/* Footer Links */
.sidebar-footer {
  padding: 12px 12px 12px 20px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Reduce spacing on iPad */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar-footer {
    padding: 8px 12px 8px 20px;
    margin-top: 4px;
  }
}

.sidebar-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 11px;
  line-height: 1.4;
}

/* Better scaling for iPad */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar-footer-links {
    gap: 6px 10px;
    font-size: 10px;
    line-height: 1.3;
  }
}

.sidebar-footer-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}

.sidebar-footer-links a:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

.user-action {
  display: block;
  width: calc(100% - 20px); /* keep a small gap on the right */
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #ffffff !important; /* Always white text */
  text-decoration: none;
  text-align: center;
  font-weight: 700; /* bold for consistency */
  font-size: 13px;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-bottom: 8px;
}

.user-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff !important; /* Always white text on hover */
}

/* Main Content */
.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 20px;
  padding-top: 20px !important; /* Ensure consistent top spacing from viewport */
  position: relative;
  overflow-x: hidden;
  height: 100vh;               /* make it a viewport-height scroll container */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Consistent top spacing from viewport top - matching expansions page */
/* The expansions page has: main-content padding-top (20px) + container padding-top (20px) + h1 margin-top (24px) = 64px total from viewport top */
/* For visual consistency, ALL pages should have 64px total spacing from the top of the viewport */
/* This ensures all content starts at the same vertical position across all pages */

/* Pages WITH containers: ensure container has padding-top: 20px and consistent width/alignment */
.main-content > .expansions-container,
.main-content > .campaigns-container,
.main-content > .investigators-container,
.main-content > .campaign-log-container,
.main-content > .setup-container,
.main-content > .admin-container,
.main-content > .rules-container {
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 20px !important;
  padding-top: 20px !important;
  margin-top: 0 !important;
  box-sizing: border-box !important;
}

/* Ensure first h1 in containers has margin-top: 24px (matching expansions page) - override inline styles */
.main-content > .expansions-container > h1.page-title:first-child,
.main-content > .campaigns-container > h1.page-title:first-child,
.main-content > .investigators-container > h1:first-child,
.main-content > .campaign-log-container > *:first-child > h1.page-title:first-child,
.main-content > .setup-container > h1:first-child,
.main-content > .admin-container > h1:first-child,
.main-content > .rules-container > h1:first-child {
  margin-top: 24px !important;
}

/* Pages WITHOUT containers: add 44px margin-top and ensure consistent left alignment */
/* Exclude cards page (.classBar and .filtersBar should not have max-width on cards page) */
/* Exclude login/register and settings pages (they should have narrower width) */
.main-content > .wrap:first-child:not(.expansions-container):not(.campaigns-container):not(.investigators-container):not(.campaign-log-container):not(.setup-container):not(.admin-container):not(.rules-container):not(:has(.panel)),
.main-content > .container:first-child:not(.expansions-container):not(.campaigns-container):not(.investigators-container):not(.campaign-log-container):not(.setup-container):not(.admin-container):not(.rules-container):not(:has(.panel)) {
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 44px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* Narrower width for login/register and settings pages */
.main-content > .wrap:first-child:has(.panel),
.main-content > #bg + .wrap:has(.panel),
.main-content > .wrap:has(.panel) {
  max-width: 520px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
}

/* For pages where background element (#bg) is first, target the next content element */
/* Exclude login/register and settings pages (they should have narrower width) */
.main-content > #bg + .wrap:not(.expansions-container):not(.campaigns-container):not(.investigators-container):not(.campaign-log-container):not(.setup-container):not(.admin-container):not(.rules-container):not(:has(.panel)),
.main-content > #bg + .container:not(.expansions-container):not(.campaigns-container):not(.investigators-container):not(.campaign-log-container):not(.setup-container):not(.admin-container):not(.rules-container):not(:has(.panel)) {
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 44px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* Handle any other first-child elements that aren't containers or background elements */
.main-content > *:first-child:not(.wallpaper-background):not(#bg):not(.expansions-container):not(.campaigns-container):not(.investigators-container):not(.campaign-log-container):not(.setup-container):not(.admin-container):not(.rules-container):not(.classBar):not(.filtersBar):not(.stickyToolbar):not(.wrap):not(.container) {
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 44px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* Note: classBar and filtersBar alignment is handled above in "Pages WITHOUT containers" section */

/* Faction Bar */
.classBar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 0;
  padding: 8px 14px;
  background: rgba(20, 22, 26, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
}

.classBar .reset-btn{
  margin-left: auto;
  padding: 5px 10px;
  background: rgba(255, 59, 48, 0.12);
  color: #ff6b6b;
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.classBar .reset-btn:hover {
  background: rgba(255, 59, 48, 0.2);
  border-color: rgba(255, 59, 48, 0.5);
}

.classBar .chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  color: rgba(255, 255, 255, 0.5);
  opacity: 0.65;
}

.classBar .chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  opacity: 0.85;
}

.classBar .chip.active {
  background: transparent;
  color: #ffffff;
  border-color: rgba(106, 183, 255, 0.3);
  opacity: 1;
}

/* Faction icon colors */
.classBar .chip[data-cls="guardian"] .arkham-icon {
  color: #4169E1;
  font-size: 15px;
  display: inline-block;
  line-height: 1;
}

.classBar .chip[data-cls="seeker"] .arkham-icon {
  color: #D2691E;
  font-size: 15px;
  display: inline-block;
  line-height: 1;
}

.classBar .chip[data-cls="rogue"] .arkham-icon {
  color: #32CD32;
  font-size: 15px;
  display: inline-block;
  line-height: 1;
}

.classBar .chip[data-cls="mystic"] .arkham-icon {
  color: #9370DB;
  font-size: 15px;
  display: inline-block;
  line-height: 1;
}

.classBar .chip[data-cls="survivor"] .arkham-icon {
  color: #E63946;
  font-size: 15px;
  display: inline-block;
  line-height: 1;
}

.classBar .chip[data-cls="neutral"] .arkham-icon {
  color: #808080;
  font-size: 15px;
  display: inline-block;
  line-height: 1;
}

.classBar .chip[data-cls="neutral"] img {
  height: 16px;
  width: 16px;
  filter: brightness(1.2) saturate(1.3);
}

/* Active faction chips get brighter colors */
.classBar .chip.active[data-cls="guardian"] .arkham-icon {
  color: #5a7ff0;
}

.classBar .chip.active[data-cls="seeker"] .arkham-icon {
  color: #e68a4d;
}

.classBar .chip.active[data-cls="rogue"] .arkham-icon {
  color: #4de64d;
}

.classBar .chip.active[data-cls="mystic"] .arkham-icon {
  color: #a885e8;
}

.classBar .chip.active[data-cls="survivor"] .arkham-icon {
  color: #ff4d5c;
}

.classBar .chip.active[data-cls="neutral"] .arkham-icon {
  color: #a0a0a0;
}

.classBar .chip.active[data-cls="neutral"] img {
  filter: brightness(1.4) saturate(1.5);
}

/* Filters Layout */
.filtersBar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(17, 26, 34, 0.65);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 14px 0;
  max-width: 100%;
  position: sticky;
  top: calc(var(--classbar-sticky-height, 48px) + 10px);
  z-index: 100;
  will-change: transform;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

/* Filter rows - horizontal flex */
.filterRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Vertical separator between filter groups */
.filterSep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* Remove old divider pseudo-elements */
.filtersBar > *::before,
.filtersBar > *::after,
.filtersBar > * + *::before {
  content: none;
}

/* Filter groups */
.filterGroup {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.filterGroup > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

/* Filter inputs */
.filterInputs {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
}

.filterInputs .inputGroup {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filterInputs .inputGroup:first-child {
  flex: 1;
  min-width: 120px;
  max-width: 260px;
}

/* Broad/Exact mode chips divider */
#kwModeChips {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 6px;
  margin-left: 2px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.inputGroup {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-width: 0;
}

/* Slider Containers */
.slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* Range Sliders */
.range-slider {
  width: 160px;
  height: 4px; /* thinner track */
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.range-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;  /* smaller thumb */
  height: 12px;
  background: linear-gradient(135deg, #6ab7ff 0%, #007AFF 100%);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(106, 183, 255, 0.6), 0 4px 8px rgba(0, 0, 0, 0.4);
}

.range-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #6ab7ff 0%, #007AFF 100%);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.range-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(106, 183, 255, 0.5);
}

.range-slider::-webkit-slider-track {
  background: linear-gradient(to right, #6ab7ff 0%, #6ab7ff 50%, rgba(255, 255, 255, 0.1) 50%);
  height: 3px;
  border-radius: 2px;
}

.range-slider::-moz-range-track {
  background: rgba(255, 255, 255, 0.1);
  height: 4px;
  border-radius: 2px;
  border: none;
}

/* Slider Value Display */
.slider-value {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Icon Chips */
.icon-chips {
  display: flex;
  gap: 4px;
}

.icon-chip {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.icon-chip.active {
  background: rgba(106, 183, 255, 0.2);
  border-color: #6ab7ff;
  box-shadow: 0 0 0 1px rgba(106, 183, 255, 0.3);
}

.icon-chip i {
  font-size: 16px;
}

/* Search Input */
.compact-input {
  width: 200px;
  padding: 6px 12px;
  background: rgba(8, 12, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.compact-input:focus {
  border-color: #6ab7ff;
  box-shadow: 0 0 0 2px rgba(106, 183, 255, 0.2);
}

.compact-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Quick Chips */
.quick-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-chips > div {
  display: flex;
  gap: 4px;
}

.quick-chip {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.quick-chip:hover {
  background: rgba(255, 255, 255, 0.12);
}

.quick-chip.active {
  background: rgba(106, 183, 255, 0.2);
  color: #6ab7ff;
  border-color: #6ab7ff;
}

/* Filter chips - consistent design */
.filtersBar .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.filtersBar .chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
}

.filtersBar .chip.active {
  background: rgba(106, 183, 255, 0.15);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(106, 183, 255, 0.35);
}

.filtersBar .chip.active:hover {
  background: rgba(106, 183, 255, 0.22);
}

/* Search input */
.filtersBar input#kw {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1px;
  line-height: 1.3;
  background: rgba(8, 12, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-radius: 8px;
  padding: 9px 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.filtersBar input#kw:focus {
  border-color: rgba(106, 183, 255, 0.6);
  background: rgba(8, 12, 16, 0.7);
  box-shadow: 0 0 0 3px rgba(106, 183, 255, 0.18);
}

.filtersBar input#kw::placeholder {
  color: rgba(255, 255, 255, 0.42);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.1px;
}

/* Icon chip icons */
.filtersBar .chip .arkham-icon {
  font-size: 13px;
  opacity: 0.7;
  line-height: 1;
  display: inline-block;
}

.filtersBar .chip.active .arkham-icon {
  opacity: 1;
}

/* Chip images (slot icons, wild icon) */
.filtersBar .chip img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  opacity: 0.7;
  flex-shrink: 0;
}

.filtersBar .chip.active img {
  opacity: 1;
}

/* Inactive icon/slot chip images - dimmed */
.filtersBar #iconChips .chip:not(.active) img {
  opacity: 0.4;
  filter: brightness(0.6);
}

.filtersBar #iconChips .chip.active img {
  opacity: 1;
  filter: grayscale(1) brightness(3) contrast(1.2);
  -webkit-filter: grayscale(1) brightness(3) contrast(1.2);
}

.filtersBar #slotChips .chip:not(.active) img {
  opacity: 0.4;
}

.filtersBar #slotChips .chip.active img {
  opacity: 1;
}

/* Type Chips */
.type-chips {
  display: flex;
  gap: 6px;
}

.type-chip {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.type-chip:hover {
  background: rgba(255, 255, 255, 0.12);
}

.type-chip.active {
  background: rgba(106, 183, 255, 0.2);
  color: #6ab7ff;
  border-color: #6ab7ff;
}

/* Modern Reset Button */
.filtersBar .reset-btn { display:none; }

.filtersBar .reset-btn::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;
}

.filtersBar .reset-btn:hover {
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.3) 0%, rgba(255, 59, 48, 0.2) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
  border-color: rgba(255, 59, 48, 0.6);
}

.filtersBar .reset-btn:hover::before {
  left: 100%;
}

.filtersBar .reset-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(255, 59, 48, 0.4);
}

/* Compact Card Count */
.filtersBar #total { display:none; }

/* Legacy styles for compatibility */
.reset-btn {
  padding: 6px 12px;
  background: rgba(255, 59, 48, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.reset-btn:hover {
  background: rgba(255, 59, 48, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.card-count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* Card Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 300px);
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
  min-height: 200px; /* Ensure grid has space */
}

/* Card styling to match existing design */
.card {
  width: 300px;
  background: rgba(10, 15, 20, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  overflow: visible; /* Changed to visible so card is 100% visible */
  position: relative;
  transform-origin: center center;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), 
              box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1), 
              filter 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.card:hover {
  transform: scale(1.05);
  z-index: 30;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  filter: brightness(1.08);
}

.card img {
  width: 100%;
  height: auto;
  display: block;
  background: #0b1116;
  object-fit: cover;
  object-position: center;
  border-radius: 19px;
}

.card .meta {
  padding: 10px 12px;
}

.card .name {
  font-weight: 800;
  font-size: 16px;
  color: #eaf2f8;
}

.card .sub {
  color: #b9c7d4;
  font-size: 12.5px;
}

.card .stats {
  margin-top: 6px;
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: #b9c7d4;
}

.card .stats span {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.card .stats .exceptional-badge {
  margin-left: auto;
}

/* Loading spinner */
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

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

/* iPad and smaller desktop screens - Use desktop layout with adjusted sizing */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    width: 220px;
  }
  
  .main-content {
    margin-left: 220px;
    padding: 30px;
  }
  
  .compact-input {
    width: 150px;
  }
}

/* Mobile styles are now handled in mobile-optimized.css */




