/* ================================================================
   BONZA DASHBOARD — Page-specific styles
   For /explore (Explore page)
   Extracted from: dashboard.html
   ================================================================ */

/* ========== LOADING SKELETONS ========== */
.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    var(--neutral-800) 0%,
    var(--neutral-700) 50%,
    var(--neutral-800) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}

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

.char-card.skeleton {
  pointer-events: none;
  cursor: default;
}

.char-card.skeleton:hover {
  transform: none;
  border-color: var(--neutral-700);
}

/* ========== MAIN COLUMN LAYOUT ========== */
.main-col { 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  gap: 16px; 
  min-width: 0; 
  overflow: hidden; 
  margin-right: 237px; 
}

/* ========== BANNER CAROUSEL ========== */
.banner-carousel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
}

.banner-track {
  display: flex;
  transition: transform 0.5s ease;
}

.banner-slide {
  display: flex;
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
  min-height: 200px;
  background: url('/images/banner-bg.jpg') center/cover no-repeat;
}

.banner-content {
  padding: 40px;
  width: 366px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  z-index: 1;
}

.banner-title { 
  font-size: 24px; 
  font-weight: 500; 
  color: var(--purple-400); 
  line-height: 32px; 
}

.banner-desc { 
  font-size: 14px; 
  color: #fff; 
  line-height: 20px; 
}

.btn-generate {
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 20px rgba(255,255,255,0.56);
  cursor: pointer;
  align-self: flex-start;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(255,255,255,0.7);
}

.banner-image {
  flex: 1;
  position: relative;
}

.banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neutral-700);
  cursor: pointer;
  transition: background 0.2s;
}

.banner-dot.active { 
  background: #fff; 
}

.banner-dot:hover {
  background: var(--neutral-400);
}

/* ========== CHARACTERS HEADER ========== */
.chars-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.chars-title { 
  flex: 1; 
  font-size: 18px; 
  font-weight: 500; 
  line-height: 24px; 
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 8px;
  padding: 8px 16px 8px 8px;
  width: 330px;
}

.search-box img { 
  width: 16px; 
  height: 16px; 
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'Heebo',sans-serif;
  font-size: 12px;
  flex: 1;
}

.search-box input::placeholder { 
  color: var(--neutral-500); 
}

.mobile-filter-btn {
  display: none;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 8px;
  padding: 8px 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: 6px;
}

/* ========== CHARACTER CARDS GRID ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.char-card {
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  padding: 4px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s;
  display: block;
  cursor: pointer;
}

.char-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple-400);
}

.char-card-img {
  aspect-ratio: 3 / 4;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.char-card-img img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

.char-card-badges {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 2px;
}

.char-badge {
  background: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 16px;
}

.char-card-info { 
  padding: 8px 12px 16px;
}

.char-card-name { 
  font-size: 18px; 
  font-weight: 500; 
  line-height: 24px;
  margin-bottom: 4px;
}

.char-card-hobbies {
  font-size: 12px;
  color: var(--neutral-400);
  line-height: 16px;
  height: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== FILTERS SIDEBAR ========== */
.filters-panel {
  width: 221px;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  position: fixed;
  right: 16px;
  top: 80px;
  max-height: calc(100vh - 96px);
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.filters-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mobile-only close button inside the filters panel. Hidden on desktop. */
.filters-close-mobile {
  display: none;
  background: var(--neutral-700);
  border: 1px solid var(--neutral-600);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.filters-close-mobile:hover { background: var(--neutral-600); }
@media (max-width: 768px) {
  .filters-close-mobile { display: inline-flex; }
}

.filters-title { 
  font-size: 18px; 
  font-weight: 500; 
  color: var(--neutral-400); 
}

.btn-reset {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--neutral-700);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-reset:hover {
  background: var(--neutral-600);
}

.btn-reset img { 
  width: 16px; 
  height: 16px; 
}

.filter-divider { 
  height: 1px; 
  background: var(--neutral-700); 
}

.filter-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-400);
}

.filter-section-title img { 
  width: 20px; 
  height: 20px; 
}

/* ========== AGE SLIDER (DUAL RANGE) ========== */
.age-range-labels { 
  display: flex; 
  justify-content: space-between; 
  font-size: 12px; 
  color: var(--neutral-500); 
}

.range-slider {
  position: relative;
  width: 100%;
  height: 16px;
}

.range-slider input[type="range"] {
  -webkit-appearance: none;
  position: absolute;
  width: 100%;
  height: 6px;
  background: none;
  pointer-events: none;
  top: 5px;
  margin: 0;
  padding: 0;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--purple-900);
  border: 1px solid var(--purple-400);
  cursor: pointer;
  pointer-events: all;
  position: relative;
  z-index: 2;
}

.range-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--purple-900);
  border: 1px solid var(--purple-400);
  cursor: pointer;
  pointer-events: all;
}

.range-track {
  position: absolute;
  height: 6px;
  top: 5px;
  background: var(--neutral-700);
  border-radius: 999px;
  width: 100%;
}

.range-fill {
  position: absolute;
  height: 6px;
  top: 5px;
  background: var(--purple-400);
  border-radius: 999px;
}

.age-inputs { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  justify-content: space-between; 
}

.age-input {
  background: var(--neutral-700);
  border: 1px solid var(--neutral-600);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 12px;
  text-align: center;
  width: 72px;
  font-family: 'Heebo',sans-serif;
}

.age-to { 
  font-size: 12px; 
  color: var(--neutral-600); 
}

/* ========== ROLEPLAY FILTER (TAG-BASED) ========== */
/* Matching bn_generate-image.css style */

/* Roleplay wrapper */
.roleplay-filter-wrapper {
  position: relative;
}

/* Selected roleplay tags */
.roleplay-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.roleplay-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yellow-800);
  border: 1px solid var(--yellow-700);
  border-radius: 16px;
  padding: 4px 8px 4px 12px;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  color: var(--yellow-400);
  white-space: nowrap;
  transition: background 0.2s;
}

.roleplay-tag:hover {
  background: var(--yellow-700);
}

.roleplay-tag-remove {
  width: 16px;
  height: 16px;
  cursor: pointer;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--yellow-400);
  font-size: 16px;
  line-height: 1;
  padding: 0;
  transition: opacity 0.2s;
}

.roleplay-tag-remove:hover {
  opacity: 1;
}

/* Search input */
.roleplay-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--neutral-700);
  border: 1px solid var(--neutral-600);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.roleplay-search:hover {
  border-color: var(--neutral-500);
}

.roleplay-search.open {
  border-radius: 8px 8px 0 0;
  border-bottom-color: transparent;
}

.roleplay-search img {
  width: 14px;
  height: 14px;
  opacity: 0.5;
  flex-shrink: 0;
}

.roleplay-search input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'Heebo', sans-serif;
  font-size: 12px;
  flex: 1;
  width: 100%;
}

.roleplay-search input::placeholder {
  color: var(--neutral-500);
}

.roleplay-search .arrow-icon {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.roleplay-search .arrow-icon.open {
  transform: rotate(180deg);
}

/* Roleplay dropdown list */
.roleplay-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 280px;
  overflow-y: auto;
  flex-direction: column;
  margin-top: -1px;
}

.roleplay-list.open {
  display: flex;
}

.roleplay-list::-webkit-scrollbar {
  width: 4px;
}

.roleplay-list::-webkit-scrollbar-thumb {
  background: var(--neutral-600);
  border-radius: 4px;
}

.roleplay-list::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-500);
}

/* Dropdown items */
.roleplay-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--neutral-400);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

.roleplay-item:hover {
  background: var(--neutral-700);
  color: #fff;
}

.roleplay-item.selected {
  color: var(--green-400);
}

.roleplay-checkmark {
  margin-left: auto;
  width: 16px;
  height: 16px;
  color: var(--green-400);
  font-weight: 600;
  font-size: 14px;
  display: none;
}

.roleplay-item.selected .roleplay-checkmark {
  display: block;
}

/* ========== FILTER CHECKBOXES ========== */
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  font-size: 12px;
  color: var(--neutral-400);
  cursor: pointer;
  transition: color 0.2s;
}

.filter-option:hover {
  color: #fff;
}

.filter-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--neutral-700);
  border: 1px solid var(--neutral-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.filter-checkbox.checked {
  background: var(--purple-400);
  border-color: var(--purple-400);
}

.filter-checkbox.checked::after {
  content: '';
  width: 10px;
  height: 7px;
  border-left: 2px solid #000;
  border-bottom: 2px solid #000;
  transform: rotate(-45deg);
  margin-top: -2px;
}

/* ========== TABLET (<=1024px) ========== */
@media (max-width: 1024px) {
  .cards-grid { 
    grid-template-columns: repeat(3, minmax(0, 1fr)); 
  }
  
  .filters-panel { 
    width: 200px; 
  }
  
  .main-col { 
    margin-right: 216px; 
  }
  
  .search-box { 
    width: 220px; 
  }
  
  .banner-content { 
    width: 280px; 
    padding: 24px; 
  }
}

/* ========== MOBILE (<=768px) ========== */
@media (max-width: 768px) {
  /* Main col — remove right margin on mobile */
  .main-col { 
    margin-right: 0; 
  }

  /* Filters — hidden on mobile; toggled open as a plain block inside
     .main-col between the chars-header and the cards grid. No fancy
     fixed-positioning — just expand inline and let the page flow. */
  .filters-panel {
    display: none !important;
    width: 100% !important;
    min-width: 0 !important;
    position: static !important;
    max-height: none !important;
    right: auto !important;
    top: auto !important;
    box-shadow: none !important;
  }
  .filters-panel.show {
    display: flex !important;
    flex-direction: column !important;
  }
  
  .mobile-filter-btn { 
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 13px;
  }

  /* Banner */
  .banner-slide { 
    flex-direction: column; 
  }
  
  .banner-content { 
    width: 100%; 
    padding: 24px; 
  }
  
  .banner-image { 
    height: 180px; 
  }

  /* Cards — 2 columns */
  .cards-grid { 
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
    gap: 10px; 
  }

  /* Search */
  .chars-header { 
    flex-direction: column; 
    gap: 8px; 
  }
  
  .search-box { 
    width: 100%; 
  }
}

/* ========== SMALL MOBILE (<=480px) ========== */
@media (max-width: 480px) {
  /* Keep 2 character cards per row on small phones (previous 1-col made
     the grid scroll forever). */
  .cards-grid { 
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
    gap: 8px;
  }
  /* Shrink card internals so a pair fits nicely at ~360px-wide viewports. */
  .char-card-img {
    aspect-ratio: 3 / 4;
    height: auto;
  }
  .char-card-badges {
    bottom: 8px;
    left: 8px;
    flex-wrap: wrap;
    max-width: calc(100% - 16px);
  }
  .char-badge {
    font-size: 10px;
    line-height: 14px;
    padding: 2px 5px;
  }
  .char-card-info {
    padding: 6px 10px 12px;
  }
  .char-card-name {
    font-size: 15px;
    line-height: 20px;
  }
  .char-card-hobbies {
    font-size: 11px;
    line-height: 14px;
    height: 28px;
  }
  
  .banner-content {
    padding: 16px;
    gap: 16px;
  }
  
  .banner-title {
    font-size: 20px;
    line-height: 28px;
  }
  
  .banner-desc {
    font-size: 12px;
  }
}
