@import url("../leather-seam-asset-path.css");
/* Cache bust: 2024-updated */

body {
  margin: 0;
  font-family: 'Baloo 2', cursive;
  background-color: #ffffff;
  min-height: 100vh;
  overflow: hidden;
}

.background-clouds {
  display: block;
  position: fixed;
  top: -5vh;
  left: -5vw;
  width: 110vw;
  height: 110vh;
  z-index: 0;
  background: url('../Sky.png') center center / cover no-repeat;
  pointer-events: none;
}

.sidebar {
  /* Width controlled by universal style.css rule (400px) — match home seam leather */
  background-color: #3d2817;
  background-image:
    linear-gradient(135deg, rgba(61, 40, 23, 0.72) 0%, rgba(92, 61, 46, 0.65) 50%, rgba(61, 40, 23, 0.72) 100%),
    var(--leather-seam-png),
    var(--leather-seam-noise);
  background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size), var(--leather-tile-size) var(--leather-tile-size);
  background-repeat: no-repeat, repeat, repeat;
  background-blend-mode: multiply, normal, normal;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none !important;
  height: 85vh;
}

.layout-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 1800px;
    width: 90vw;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0;
    overflow: hidden;
}

.container {
    margin: 0;
    flex-grow: 1;
    padding: 20px;
    background-color: #d0b589;
    background-image:
      linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%),
      var(--leather-seamless);
    background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
    background-repeat: no-repeat, repeat;
    background-blend-mode: multiply, normal;
    border: 2px solid #958062;
    border-radius: 16px;
    box-shadow:
      0 8px 24px rgba(0, 0, 0, 0.2),
      inset 0 2px 0 rgba(255, 255, 255, 0.25),
      inset 0 -2px 0 rgba(0, 0, 0, 0.12),
      inset 1px 0 0 rgba(255, 255, 255, 0.2),
      inset -1px 0 0 rgba(0, 0, 0, 0.08);
    height: 85vh !important;
    min-height: 85vh !important;
    max-height: 85vh !important;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
    position: relative;
}

/* Legacy theme override for characters page */
body.legacy-theme-active .container {
    background: url('../Page.png') center center / 100% 100% no-repeat !important;
    background-image: url('../Page.png') !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.main-content {
    flex: 1;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    box-sizing: border-box;
}

/* Characters Header – bright leather */
.characters-header {
  width: 100%;
  text-align: center;
  margin-bottom: 25px;
  padding: 20px;
    background-color: #d0b589;
    background-image:
      linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%),
      var(--leather-seamless);
    background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
    background-repeat: no-repeat, repeat;
    background-blend-mode: multiply, normal;
  border: 2px solid #958062;
  border-radius: 16px;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.2),
    0 3px 8px rgba(0, 0, 0, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12),
    inset 1px 0 0 rgba(255, 255, 255, 0.2),
    inset -1px 0 0 rgba(0, 0, 0, 0.08);
  position: relative;
}

.characters-header::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  height: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5), rgba(255,255,255,0.9));
  border-radius: 17px 17px 0 0;
  z-index: 1;
}

h1 {
  font-size: 1.9rem;
  color: #1e40af;
  margin: 0 0 10px;
  font-family: 'Baloo 2', cursive;
  text-align: center;
  text-shadow: 
    0 2px 4px rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(30, 64, 175, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.characters-subtitle {
  font-size: 0.9rem;
  color: #2d3748;
  margin: 0;
  font-family: 'Baloo 2', cursive;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  font-weight: 500;
}


/* Search Container */
.search-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Search input styling – exactly match explore page */
#characters-search {
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: 'Baloo 2', cursive;
  border-radius: 14px;
  border: 1px solid #9aa8bc;
  background-color: #f3f6fb;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.35) 28%, transparent 48%),
    linear-gradient(180deg, #fbfdff 0%, #e8eef8 52%, #dce6f2 100%);
  background-blend-mode: normal, normal;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75),
    0 3px 12px rgba(0, 0, 0, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 2px 6px rgba(255, 255, 255, 0.95),
    inset 0 -3px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transition: all 0.18s ease;
  display: block;
  margin: 0 auto;
  flex: 1;
  color: #1a1a1a;
}

#characters-search::placeholder {
  color: #8a93a0;
}

#characters-search:hover {
  border-color: #7b8da3;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8),
    0 4px 14px rgba(0, 0, 0, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 2px 6px rgba(255, 255, 255, 1),
    inset 0 -3px 8px rgba(0, 0, 0, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

#characters-search:focus {
  outline: none;
  border-color: #4a90d9;
  background-color: #fafdff;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.45) 30%, transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #eef6ff 48%, #dfeaf8 100%);
  box-shadow:
    0 0 0 3px rgba(74, 144, 217, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.85),
    0 4px 14px rgba(0, 0, 0, 0.12),
    inset 0 2px 7px rgba(255, 255, 255, 1),
    inset 0 -3px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

.clear-filters-btn {
  padding: 8px;
  background: linear-gradient(145deg, #ef4444, #dc2626);
  border: 2px solid #b91c1c;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 8px rgba(239, 68, 68, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-filters-btn:hover {
  background: linear-gradient(145deg, #f87171, #ef4444);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 12px rgba(239, 68, 68, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.clear-filters-btn .material-icons {
  font-size: 20px;
  color: white;
}

/* Characters Section */
.characters-section {
  width: 100%;
  margin-top: 20px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Characters Grid */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  transition: grid-template-columns 0.3s ease;
}

/* Responsive grid columns */
@media (max-width: 1399px) {
  .characters-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .characters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .characters-grid {
    grid-template-columns: 1fr;
  }
}

/* Character Card – bright leather */
.character-card {
    background-color: #d0b589;
    background-image:
      linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%),
      var(--leather-seamless);
    background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
    background-repeat: no-repeat, repeat;
    background-blend-mode: multiply, normal;
  border: 2px solid #958062;
  border-radius: 16px;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.2),
    0 3px 8px rgba(0, 0, 0, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12),
    inset 1px 0 0 rgba(255, 255, 255, 0.2),
    inset -1px 0 0 rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  cursor: pointer;
  min-height: 420px;
}

.character-card::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
  border-radius: 13px 13px 0 0;
  z-index: 1;
}

.character-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.28),
    0 5px 12px rgba(0, 0, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12),
    inset 1px 0 0 rgba(255, 255, 255, 0.25),
    inset -1px 0 0 rgba(0, 0, 0, 0.1);
  border-color: #78634f;
}

.character-card:active {
  transform: translateY(-2px);
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.2),
    inset 0 3px 6px rgba(0, 0, 0, 0.2),
    inset 0 -3px 6px rgba(255, 255, 255, 0.8);
}

/* Character Image Container */
.character-image-container {
  width: 100%;
  padding: 16px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 240px;
  max-height: 280px;
  flex-shrink: 0;
}

.character-portrait {
  width: auto;
  height: 100%;
  max-width: 90%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.25),
    0 3px 8px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.12);
  border: 2px solid #958062;
  background: linear-gradient(145deg, #eee3ca, #dfc5aa);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.character-card:hover .character-portrait {
  transform: scale(1.03);
  box-shadow: 
    0 12px 30px rgba(0, 0, 0, 0.25),
    0 6px 15px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.12);
}

/* Fandom Badge */
.fandom-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow:
    0 4px 10px rgba(16, 185, 129, 0.5),
    inset 0 1px 2px rgba(255,255,255,0.4);
  border: 1.5px solid #047857;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  font-family: 'Baloo 2', cursive;
  backdrop-filter: blur(2px);
}

/* Character Content */
.character-content {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.02) 100%);
}

.character-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  font-family: 'Baloo 2', cursive;
  transition: color 0.3s ease;
  text-align: left;
}

.character-card:hover .character-name {
  color: #1a1512;
}

.character-description {
  font-size: 0.95rem;
  color: #1e293b;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  text-align: left;
  font-weight: 500;
}

/* Empty State – bright leather */
.characters-grid:empty::before {
  content: 'No characters found.';
  display: block;
  text-align: center;
  padding: 60px 40px;
  color: #1e1812;
  font-size: 1.1rem;
    background-color: #d0b589;
    background-image:
      linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%),
      var(--leather-seamless);
    background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
    background-repeat: no-repeat, repeat;
    background-blend-mode: multiply, normal;
  border: 3px solid #958062;
  border-radius: 20px;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  font-family: 'Baloo 2', cursive;
}

.characters-grid p {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  color: #1e1812;
  font-size: 1.1rem;
  font-family: 'Baloo 2', cursive;
    background-color: #d0b589;
    background-image:
      linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%),
      var(--leather-seamless);
    background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
    background-repeat: no-repeat, repeat;
    background-blend-mode: multiply, normal;
  border: 3px solid #958062;
  border-radius: 20px;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  margin: 20px 0;
}

/* Loading State */
.characters-grid.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Material Icons in character cards */
.character-card .material-icons {
  font-size: 18px;
  vertical-align: middle;
}

/* Filter Container */
.filter-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  width: 100%;
  align-items: stretch;
}

/* Filter Toggle Section */
.filter-toggle-section {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
  width: 100%;
  flex-wrap: wrap;
}

/* Filter toggle – glossy aqua */
.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: linear-gradient(145deg, #4dd0e1 0%, #26c6da 35%, #00bcd4 50%, #26c6da 65%, #4dd0e1 100%);
  border: 2px solid #0097a7;
  border-radius: 12px;
  color: #0d3d42;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: 'Baloo 2', cursive;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.25),
    0 2px 4px rgba(0, 150, 167, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15),
    inset 1px 0 0 rgba(255, 255, 255, 0.3),
    inset -1px 0 0 rgba(0, 0, 0, 0.1);
  min-width: auto;
  max-width: 140px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  position: relative;
}

.filter-toggle-btn::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.7));
  border-radius: 10px 10px 0 0;
}

.filter-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.3),
    0 3px 6px rgba(0, 150, 167, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.18);
  border-color: #0097a7;
}

.filter-toggle-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.15),
    inset 0 -2px 4px rgba(255, 255, 255, 0.4);
}

.filter-toggle-btn.active {
  background: linear-gradient(145deg, #00acc1 0%, #0097a7 50%, #00838f 100%);
  color: #fff;
  border-color: #006064;
  box-shadow:
    0 6px 15px rgba(0, 150, 167, 0.45),
    0 3px 8px rgba(0, 0, 0, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.toggle-arrow {
  transition: transform 0.3s ease;
}

.filter-toggle-btn.active .toggle-arrow {
  transform: rotate(180deg);
}

/* Random Character Button – glossy aqua */
.random-project-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(145deg, #4dd0e1 0%, #26c6da 35%, #00bcd4 50%, #26c6da 65%, #4dd0e1 100%);
  border: 2px solid #0097a7;
  border-radius: 12px;
  color: #0d3d42;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.25),
    0 2px 4px rgba(0, 150, 167, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15),
    inset 1px 0 0 rgba(255, 255, 255, 0.3),
    inset -1px 0 0 rgba(0, 0, 0, 0.1);
  font-family: 'Baloo 2', 'Fugaz One', sans-serif;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

.random-project-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.3),
    0 3px 6px rgba(0, 150, 167, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.18);
  color: #0d3d42;
}

.random-project-btn:active {
  transform: translateY(0);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.15),
    inset 0 -2px 4px rgba(255, 255, 255, 0.4);
}

.random-project-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Filters Panel – bright leather */
.filters-panel {
  visibility: hidden;
  max-height: 0;
  height: 0;
  overflow: hidden;
  padding: 0 !important;
  background-color: #d0b589;
  background-image:
    linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%),
    var(--leather-seamless);
  background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
  background-repeat: no-repeat, repeat;
  background-blend-mode: multiply, normal;
  border-radius: 16px;
  border: 2px solid #523020;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1),
    inset 1px 0 0 rgba(255, 255, 255, 0.2),
    inset -1px 0 0 rgba(0, 0, 0, 0.08);
  position: relative;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.filters-panel::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 2px dashed rgba(218, 165, 32, 0.3);
  border-radius: 14px;
  pointer-events: none;
  z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(58, 40, 28, 0.08);
}

.filters-panel.open {
  visibility: visible;
  max-height: 800px;
  height: auto;
  padding: 15px !important;
  margin-bottom: 15px;
}

/* Primary Filters Row */
.primary-filters-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

/* Filter select – white glossy like fandoms */
.filter-select {
  width: 220px;
  max-width: 220px;
  flex: 0 0 220px;
  padding: 12px;
  padding-right: 2.5rem;
  font-size: 0.95rem;
  font-family: 'Baloo 2', cursive;
  border-radius: 14px;
  border: 1px solid #9aa8bc;
  -webkit-appearance: none;
  appearance: none;
  background-color: #f3f6fb;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%235a6a82' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.35) 28%, transparent 48%),
    linear-gradient(180deg, #fbfdff 0%, #e8eef8 52%, #dce6f2 100%);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: 16px 16px, 100% 100%, 100% 100%;
  background-position: calc(100% - 12px) 50%, 0 0, 0 0;
  background-blend-mode: normal, normal, normal;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75),
    0 3px 12px rgba(0, 0, 0, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 2px 6px rgba(255, 255, 255, 0.95),
    inset 0 -3px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transition: all 0.18s ease;
  cursor: pointer;
  color: #1a1a1a;
  display: block;
  margin: 0;
}

.filter-select:hover {
  border-color: #7b8da3;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8),
    0 4px 14px rgba(0, 0, 0, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 2px 6px rgba(255, 255, 255, 1),
    inset 0 -3px 8px rgba(0, 0, 0, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.filter-select:focus {
  outline: none;
  border-color: #4a90d9;
  background-color: #fafdff;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%234a90d9' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.45) 30%, transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #eef6ff 48%, #dfeaf8 100%);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: 16px 16px, 100% 100%, 100% 100%;
  background-position: calc(100% - 12px) 50%, 0 0, 0 0;
  box-shadow:
    0 0 0 3px rgba(74, 144, 217, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.85),
    0 4px 14px rgba(0, 0, 0, 0.12),
    inset 0 2px 7px rgba(255, 255, 255, 1),
    inset 0 -3px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* Active Filters */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  min-height: 30px;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  color: white;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.2);
  border: 1px solid #1e40af;
}

.active-filter-tag .remove-filter {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.active-filter-tag .remove-filter:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Characters Grid Columns */
.characters-grid.columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.characters-grid.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.characters-grid.columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.characters-grid.columns-5 {
  grid-template-columns: repeat(5, 1fr);
}

.characters-grid.columns-6 {
  grid-template-columns: repeat(6, 1fr);
}

/* Character View Page Styles */
.character-header-section {
  width: 100%;
  margin-bottom: 30px;
}

.character-banner-container {
  width: 100%;
  margin-bottom: 20px;
  background-color: #d0b589; background-image: linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%), var(--leather-seamless); background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size); background-repeat: no-repeat, repeat; background-blend-mode: multiply, normal;
  border: 3px solid #958062;
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.15), inset 1px 0 0 rgba(255,255,255,0.2), inset -1px 0 0 rgba(0,0,0,0.1);
  position: relative;
}

.character-banner-container::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.4), rgba(255,255,255,0.2), rgba(255,255,255,0.4));
  border-radius: 15px 15px 0 0;
  z-index: 1;
}

.character-banner-container .character-banner {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  margin: 0;
  box-shadow: 0 6px 15px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.1);
  border: 2px solid #958062;
  background: linear-gradient(135deg, #dfc5aa 0%, #eee3ca 50%, #dfc5aa 100%);
  position: relative;
}

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

.character-info-container {
  width: 100%;
  background-color: #d0b589; background-image: linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%), var(--leather-seamless); background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size); background-repeat: no-repeat, repeat; background-blend-mode: multiply, normal;
  border: 3px solid #958062;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.15), inset 1px 0 0 rgba(255,255,255,0.2), inset -1px 0 0 rgba(0,0,0,0.1);
  position: relative;
}

.character-info-container::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.4), rgba(255,255,255,0.2), rgba(255,255,255,0.4));
  border-radius: 15px 15px 0 0;
  z-index: 1;
}

.character-info-container .character-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 0;
}

.character-info-container .character-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.1);
  border: 3px solid #958062;
  background: linear-gradient(135deg, #dfc5aa 0%, #eee3ca 50%, #dfc5aa 100%);
  flex-shrink: 0;
}

.character-info-container .character-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-info-container .character-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.character-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-shadow: 0 2px 4px rgba(255,255,255,0.9);
  font-family: 'Baloo 2', cursive;
}

.character-bio {
  font-size: 1rem;
  color: #1e293b;
  margin: 0;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.character-tags {
  font-size: 0.85rem;
  color: #2d3748;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.character-projects-section {
  width: 100%;
  margin-top: 30px;
}

.section-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 20px 0;
  font-family: 'Baloo 2', cursive;
  text-align: center;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.character-projects-section .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.character-projects-section .project-card {
    background-color: #d0b589;
    background-image:
      linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%),
      var(--leather-seamless);
    background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
    background-repeat: no-repeat, repeat;
    background-blend-mode: multiply, normal;
  border: 3px solid #958062;
  border-radius: 16px;
  padding: 0;
  transition: all 0.2s ease;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.25),
    0 4px 10px rgba(0, 0, 0, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.15),
    inset 1px 0 0 rgba(255, 255, 255, 0.2),
    inset -1px 0 0 rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.character-projects-section .project-card::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.4));
  border-radius: 13px 13px 0 0;
  z-index: 1;
}

.character-projects-section .project-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.3),
    0 6px 15px rgba(0, 0, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    inset 1px 0 0 rgba(255, 255, 255, 0.25),
    inset -1px 0 0 rgba(0, 0, 0, 0.12);
  border-color: #78634f;
}

.character-projects-section .project-card:active {
  transform: translateY(-2px);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.2),
    inset 0 2px 0 rgba(0, 0, 0, 0.2),
    inset 0 -2px 0 rgba(255, 255, 255, 0.4);
}

.character-projects-section .project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin: 12px;
  margin-bottom: 10px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  border: 2px solid #958062;
  background: linear-gradient(145deg, #dfc5aa, #d0b589);
}

.character-projects-section .project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.character-projects-section .project-card:hover .project-thumb img {
  transform: scale(1.05);
}

.character-projects-section .project-card-info {
  padding: 0 20px 20px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.character-projects-section .project-card-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-shadow: 0 1px 2px rgba(255,255,255,0.9);
  font-family: 'Baloo 2', cursive;
}

.skeu-container {
  background-color: #d0b589; background-image: linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%), var(--leather-seamless); background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size); background-repeat: no-repeat, repeat; background-blend-mode: multiply, normal;
  border: 3px solid #958062;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.15), inset 1px 0 0 rgba(255,255,255,0.2), inset -1px 0 0 rgba(0,0,0,0.1);
  position: relative;
}

.skeu-container::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.4), rgba(255,255,255,0.2), rgba(255,255,255,0.4));
  border-radius: 15px 15px 0 0;
  z-index: 1;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #2d3748;
  font-size: 1.1rem;
  font-family: 'Baloo 2', cursive;
}

/* Skeleton Loaders */
.character-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
}

.character-skeleton-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.character-skeleton-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.character-skeleton-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }
.character-skeleton-grid.columns-5 { grid-template-columns: repeat(5, 1fr); }
.character-skeleton-grid.columns-6 { grid-template-columns: repeat(6, 1fr); }

.character-skeleton-card {
  background-color: #d0b589;
  background-image:
    linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%),
    var(--leather-seamless);
  background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
  background-repeat: no-repeat, repeat;
  background-blend-mode: multiply, normal;
  border: 2px solid #958062;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.character-skeleton-image {
  width: 100%;
  min-height: 240px;
  background: linear-gradient(90deg, #e8d5b5 25%, #f5e6cf 50%, #e8d5b5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.character-skeleton-content {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.character-skeleton-name {
  height: 24px;
  width: 70%;
  background: linear-gradient(90deg, #e8d5b5 25%, #f5e6cf 50%, #e8d5b5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.character-skeleton-desc {
  height: 16px;
  width: 90%;
  background: linear-gradient(90deg, #e8d5b5 25%, #f5e6cf 50%, #e8d5b5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite 0.2s;
  border-radius: 8px;
}

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

/* Advanced Filters Panel */
.advanced-filters-toggle {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  margin-bottom: 12px;
}

.toggle-advanced-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(145deg, #7c3aed, #6d28d9);
  border: 2px solid #5b21b6;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: 'Baloo 2', cursive;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow:
    0 4px 8px rgba(124, 58, 237, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.toggle-advanced-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 12px rgba(124, 58, 237, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 4px rgba(0, 0, 0, 0.18);
}

.toggle-advanced-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 2px 4px rgba(124, 58, 237, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.15),
    inset 0 -2px 4px rgba(255, 255, 255, 0.3);
}

.advanced-filters-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 15px;
}

.advanced-filters-panel.open {
  max-height: 400px;
  padding: 15px;
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  border: 1px dashed rgba(82, 48, 32, 0.2);
}

.advanced-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #3a2f24;
  font-family: 'Baloo 2', cursive;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .filters-panel.open {
    max-width: 100%;
  }
  
  .primary-filters-row {
    flex-direction: column;
    align-items: center;
  }
  
  .filter-select {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }
  
  .advanced-filters-grid {
    grid-template-columns: 1fr;
  }
}