/* Fandom Page Styles - Both Explore and Detail Views */

.main-content h1 {
  color: #ffffff;
}

/* Override explore styles for fandom page to prevent conflicts */
#fandom-detail-view .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
}

/* Project thumbs: aspect-ratio and object-fit like profiles */
#fandom-detail-view .projects-grid .project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #c4a574 0%, #d4b896 50%, #c4a574 100%);
  border: 2px solid #8b7355;
}
#fandom-detail-view .projects-grid .project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
#fandom-detail-view .projects-grid .project-card:hover .project-thumb img {
  transform: scale(1.05);
}

/* Filter Styles (reused from explore page) */
.filter-container {
  margin-bottom: 20px;
}

.filter-toggle-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.fandom-content .filter-toggle-btn,
#toggle-content-filters {
  padding: 10px 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.1) 25%, transparent 50%),
    linear-gradient(145deg, #bef264 0%, #a3e635 25%, #84cc16 50%, #65a30d 75%, #4d7c0f 100%) !important;
  border: 2px solid #4d7c0f !important;
  border-radius: 999px !important;
  font-family: 'Baloo 2', cursive;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  color: #0f2d00 !important;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4) !important;
  box-shadow:
    0 5px 0 0 #166534,
    0 6px 14px rgba(0,0,0,0.3),
    inset 0 2px 0 rgba(255,255,255,0.25),
    inset 0 -2px 4px rgba(0,0,0,0.2) !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: flex !important;
  align-items: center;
  gap: 8px;
  max-width: none !important;
  min-width: auto !important;
  width: auto !important;
}

.fandom-content .filter-toggle-btn:hover,
#toggle-content-filters:hover {
  transform: translateY(-2px);
  box-shadow:
    0 7px 0 0 #166534,
    0 9px 18px rgba(0,0,0,0.35),
    inset 0 2px 0 rgba(255,255,255,0.3),
    inset 0 -2px 4px rgba(0,0,0,0.2) !important;
}

.fandom-content .filter-toggle-btn.active,
#toggle-content-filters.active {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.1) 25%, transparent 50%),
    linear-gradient(145deg, #bef264 0%, #a3e635 25%, #84cc16 50%, #65a30d 75%, #4d7c0f 100%) !important;
  color: #0f2d00 !important;
  border-color: #4d7c0f !important;
  box-shadow:
    0 2px 0 0 #166534,
    0 3px 8px rgba(0,0,0,0.3),
    inset 0 3px 6px rgba(0,0,0,0.2) !important;
  transform: translateY(1px);
}

.fandom-content .filter-toggle-btn.active .toggle-arrow,
#toggle-content-filters.active .toggle-arrow {
  transform: rotate(180deg);
}

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

.filters-panel {
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border: 2px solid #8b7355;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
  margin-top: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), 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);
}

.search-container {
  position: relative;
  margin-bottom: 20px;
}

.search-container input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  font-size: 0.95rem;
  font-family: 'Baloo 2', cursive;
  border-radius: 12px;
  border: 2px solid #8b7355;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.1);
  color: #2d2520;
}

.clear-filters-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #dc2626;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.primary-filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.filter-select {
  padding: 10px 18px;
  font-family: 'Baloo 2', cursive;
  font-size: 0.9rem;
  border: 2px solid #5c3a1e;
  border-radius: 999px;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px),
    linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  box-shadow:
    0 4px 0 #8b6040,
    0 5px 10px rgba(0,0,0,0.22),
    inset 0 2px 0 rgba(255,255,255,0.3),
    inset 0 -2px 0 rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  color: #2d2520;
  font-weight: 600;
}

.filter-select:hover {
  border-color: #6d5a45;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.35), 0 4px 8px rgba(0,0,0,0.2);
}

.filter-select:focus {
  outline: none;
  border-color: #6d5a45;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.35), 0 0 0 3px rgba(139,115,85,0.3);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Explore View Styles */
.search-container {
  flex: 1;
  margin-bottom: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

#fandoms-search {
  width: 100%;
  max-width: 520px;
  padding: 14px 24px;
  font-size: 1rem;
  font-family: 'Baloo 2', cursive;
  border-radius: 999px;
  border: 2px solid #5c3a1e;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px),
    linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  box-shadow:
    0 6px 16px rgba(0,0,0,0.22),
    inset 0 3px 6px rgba(0,0,0,0.07),
    inset 0 1px 0 rgba(255,255,255,0.55);
  transition: all 0.2s ease;
  display: block;
  margin: 0 auto;
  color: #2d2520;
}

#fandoms-search:focus {
  outline: none;
  border-color: #6d5a45;
  box-shadow: 0 6px 12px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.35), 0 0 0 3px rgba(139,115,85,0.3);
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  justify-content: flex-end;
}

.sort-container label {
  font-family: 'Baloo 2', cursive;
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}

.sort-select {
  padding: 10px 20px;
  font-size: 0.95rem;
  font-family: 'Baloo 2', cursive;
  border-radius: 999px;
  border: 2px solid #5c3a1e;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px),
    linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  box-shadow:
    0 4px 0 #8b6040,
    0 5px 10px rgba(0,0,0,0.22),
    inset 0 2px 0 rgba(255,255,255,0.3),
    inset 0 -2px 0 rgba(0,0,0,0.1);
  transition: all 0.2s ease;
  cursor: pointer;
  color: #2d2520;
  font-weight: 600;
  min-width: 180px;
}

.sort-select:focus {
  outline: none;
  border-color: #6d5a45;
  box-shadow: 0 6px 12px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.35), 0 0 0 3px rgba(139,115,85,0.3);
}

.sort-select:hover {
  border-color: #6d5a45;
}

.experimental-feature-message {
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  border: 2px solid #8b7355;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-top: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12);
}

.experimental-feature-message p {
  margin: 0;
  color: #856404;
  font-size: 1.1rem;
}

.experimental-feature-message a {
  color: #007bff;
  text-decoration: underline;
  font-weight: bold;
}

.fandoms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  width: 100%;
}

.fandom-card {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.06) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.06) 6px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.05) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.05) 6px),
    linear-gradient(145deg, #a07040 0%, #b88050 25%, #d4a870 50%, #b88050 75%, #a07040 100%);
  border: 3px solid #5c3a1e;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow:
    0 12px 28px rgba(0,0,0,0.32),
    0 4px 10px rgba(0,0,0,0.18),
    inset 0 2px 0 rgba(255,255,255,0.28),
    inset 0 -2px 0 rgba(0,0,0,0.18),
    inset 1px 0 0 rgba(255,255,255,0.2),
    inset -1px 0 0 rgba(0,0,0,0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.fandom-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: 17px 17px 0 0;
  z-index: 1;
}

.fandom-card:hover {
  transform: translateY(-6px) scale(1.02);
  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: #6d5a45;
}

.fandom-card-banner {
  width: 100%;
  aspect-ratio: 21 / 9;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 30px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.fandom-card:hover .fandom-card-banner {
  transform: scale(1.05);
}

.fandom-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #8b7355;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
  overflow: hidden;
  background: linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
}

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

.fandom-card-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  border-top: 2px solid #8b7355;
}

.fandom-card-name {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #2d2520;
  text-align: center;
  text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

.fandom-card-description {
  margin: 0;
  font-size: 0.95rem;
  color: #6c757d;
  text-align: center;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fandom-card-stats {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 5px;
}

.fandom-stat {
  font-size: 0.85rem;
  color: #495057;
  font-weight: 500;
}

.fandom-card-creator {
  margin-top: 5px;
  text-align: center;
  font-size: 0.8rem;
  color: #868e96;
  font-style: italic;
}

/* Skeuomorphic Fandom Card Skeleton Loaders */
.fandom-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  width: 100%;
}

.fandom-skeleton-card {
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border: 3px solid #8b7355;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), 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);
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

.fandom-skeleton-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: 17px 17px 0 0;
  z-index: 1;
}

.fandom-skeleton-banner {
  width: 100%;
  aspect-ratio: 21 / 9;
  background: linear-gradient(135deg, #b8956a 0%, #c4a574 50%, #b8956a 100%);
  position: relative;
  overflow: hidden;
}

.fandom-skeleton-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: skeletonShimmer 1.5s infinite;
}

.fandom-skeleton-avatar {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  border: 4px solid #8b7355;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 2;
  overflow: hidden;
}

.fandom-skeleton-avatar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: skeletonShimmer 1.5s infinite;
}

.fandom-skeleton-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 40px;
}

.fandom-skeleton-name {
  height: 24px;
  width: 60%;
  background: linear-gradient(90deg, #ddd 25%, #e8eaed 50%, #ddd 75%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: skeletonShimmer 1.5s infinite;
  margin: 0 auto;
}

.fandom-skeleton-description {
  height: 16px;
  width: 90%;
  background: linear-gradient(90deg, #ddd 25%, #e8eaed 50%, #ddd 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: skeletonShimmer 1.5s infinite;
  margin: 0 auto;
}

.fandom-skeleton-description:nth-child(3) {
  width: 70%;
}

.fandom-skeleton-stats {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 8px;
}

.fandom-skeleton-stat {
  height: 18px;
  width: 80px;
  background: linear-gradient(90deg, #ddd 25%, #e8eaed 50%, #ddd 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: skeletonShimmer 1.5s infinite;
}

.fandom-skeleton-creator {
  height: 14px;
  width: 50%;
  background: linear-gradient(90deg, #ddd 25%, #e8eaed 50%, #ddd 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: skeletonShimmer 1.5s infinite;
  margin: 8px auto 0;
}

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

@keyframes skeletonPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.95;
  }
}

/* Fandom Detail Loading States */
.fandom-detail-skeleton {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.fandom-detail-skeleton-header {
  width: 100%;
  aspect-ratio: 21 / 9;
  min-height: 140px;
  background: linear-gradient(135deg, #b8956a 0%, #c4a574 50%, #b8956a 100%);
  border: 2px solid #8b7355;
  border-radius: 20px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

.fandom-detail-skeleton-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: skeletonShimmer 1.5s infinite;
}

.fandom-detail-skeleton-avatar {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  border: 5px solid #8b7355;
  z-index: 2;
  overflow: hidden;
}

.fandom-detail-skeleton-avatar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: skeletonShimmer 1.5s infinite;
}

.fandom-detail-skeleton-name {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 32px;
  background: linear-gradient(90deg, rgba(255,255,255,0.3) 25%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0.3) 75%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: skeletonShimmer 1.5s infinite;
}

.fandom-detail-skeleton-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.fandom-detail-skeleton-tab {
  height: 44px;
  width: 120px;
  background: linear-gradient(90deg, #ddd 25%, #e8eaed 50%, #ddd 75%);
  background-size: 200% 100%;
  border-radius: 10px;
  animation: skeletonShimmer 1.5s infinite;
}

.fandom-detail-skeleton-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.fandom-detail-skeleton-project {
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border: 3px solid #8b7355;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

.fandom-detail-skeleton-project::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;
}

.fandom-detail-skeleton-project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #b8956a 0%, #c4a574 50%, #b8956a 100%);
  position: relative;
  overflow: hidden;
}

.fandom-detail-skeleton-project-thumb::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: skeletonShimmer 1.5s infinite;
}

.fandom-detail-skeleton-project-info {
  padding: 12px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fandom-detail-skeleton-project-title {
  height: 18px;
  width: 80%;
  background: linear-gradient(90deg, #ddd 25%, #e8eaed 50%, #ddd 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: skeletonShimmer 1.5s infinite;
}

.fandom-detail-skeleton-project-meta {
  height: 14px;
  width: 60%;
  background: linear-gradient(90deg, #ddd 25%, #e8eaed 50%, #ddd 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: skeletonShimmer 1.5s infinite;
}

/* Detail View Styles */
.fandom-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.fandom-header {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  position: relative;
  border: 4px solid #5c3a1e;
  border-bottom: none;
  box-shadow:
    0 8px 18px rgba(0,0,0,0.22),
    inset 0 2px 0 rgba(255,255,255,0.15),
    0 0 0 1px rgba(255,255,255,0.06);
}

.fandom-avatar-container {
  display: flex;
  justify-content: center;
  margin-top: -44px;
  margin-bottom: 12px;
}

.fandom-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #5c3a1e;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  object-fit: cover;
  background: linear-gradient(135deg, #d4b896 0%, #e6d4b8 100%);
}

.fandom-info-card {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.05) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.05) 6px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px),
    linear-gradient(145deg, #a07040 0%, #b88050 25%, #d4a870 50%, #b88050 75%, #a07040 100%);
  border: 4px solid #5c3a1e;
  border-top: none;
  border-radius: 0 0 24px 24px;
  padding: 8px 24px 20px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow:
    0 12px 30px rgba(0,0,0,0.3),
    0 4px 10px rgba(0,0,0,0.18),
    inset 0 -2px 0 rgba(0,0,0,0.18),
    inset 1px 0 0 rgba(255,255,255,0.15),
    inset -1px 0 0 rgba(0,0,0,0.1);
}

.fandom-name {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #1a0e08;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.25),
    0 2px 4px rgba(0,0,0,0.3);
}

.fandom-description {
  font-size: 1rem;
  margin: 0 0 16px;
  max-width: 600px;
  line-height: 1.5;
  color: #2d2520;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 0 rgba(255,255,255,0.2);
}

.fandom-actions {
  display: flex;
  gap: 14px;
  margin: 12px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.fandom-stats {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #2d2520;
  justify-content: center;
  flex-wrap: wrap;
  text-shadow: 0 1px 0 rgba(255,255,255,0.2);
}

.fandom-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.06) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.06) 6px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.05) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.05) 6px),
    linear-gradient(135deg, #8c5c30 0%, #a0703c 20%, #b88050 50%, #a0703c 80%, #8c5c30 100%);
  padding: 12px 16px;
  border-radius: 22px;
  border: 3px solid #5c3a1e;
  box-shadow:
    0 12px 28px rgba(0,0,0,0.35),
    0 4px 8px rgba(0,0,0,0.2),
    inset 0 3px 0 rgba(255,255,255,0.18),
    inset 0 -3px 0 rgba(0,0,0,0.2),
    inset 2px 0 4px rgba(255,255,255,0.1),
    inset -2px 0 4px rgba(0,0,0,0.12);
  position: relative;
}

.fandom-tab-btn {
  padding: 10px 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 40%),
    linear-gradient(145deg, #ffffff 0%, #f5f5f5 35%, #e8e8e8 65%, #d4d4d4 100%) !important;
  border: none !important;
  border-radius: 999px !important;
  font-family: 'Baloo 2', cursive;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2d2520 !important;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  min-height: 40px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8) !important;
  box-shadow:
    0 7px 0 0 #9ca3af,
    0 9px 20px rgba(0,0,0,0.35),
    0 3px 6px rgba(0,0,0,0.2),
    inset 0 -2px 4px rgba(0,0,0,0.12) !important;
}

.fandom-tab-btn:hover:not(.active) {
  transform: translateY(-2px);
  box-shadow:
    0 9px 0 0 #9ca3af,
    0 11px 24px rgba(0,0,0,0.35),
    inset 0 -2px 4px rgba(0,0,0,0.1);
}

.fandom-tab-btn.active {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 25%, transparent 50%),
    linear-gradient(145deg, #bef264 0%, #a3e635 25%, #84cc16 50%, #65a30d 75%, #4d7c0f 100%);
  color: #0f2d00;
  border: none;
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
  box-shadow:
    0 7px 0 0 #166534,
    0 9px 20px rgba(0,0,0,0.4),
    0 3px 6px rgba(0,0,0,0.25),
    inset 0 -2px 4px rgba(0,0,0,0.25);
  transform: translateY(1px);
}

.fandom-tab-content {
  display: none;
}

.fandom-tab-content.active {
  display: block;
}

.announcement-card {
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border: 2px solid #8b7355;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), 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);
}

.announcement-card.pinned {
  border-color: #b45309;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), linear-gradient(135deg, #e6d4b8 0%, #f0e0c8 50%, #e6d4b8 100%);
}

.announcement-card h3 {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
  color: #2d2520;
}

.announcement-card p {
  margin: 10px 0;
  color: #495057;
  line-height: 1.6;
}

.announcement-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  font-size: 0.85rem;
  color: #868e96;
}

.empty-state, .error-state {
  text-align: center;
  padding: 40px;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border-radius: 15px;
  border: 2px solid #8b7355;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.6;
}

.empty-state h3 {
  margin: 0 0 10px 0;
  color: #495057;
  font-size: 1.5rem;
}

.empty-state p {
  margin: 0;
  color: #6c757d;
  font-size: 1rem;
}

.error-state h3 {
  margin: 0 0 10px 0;
  color: #dc2626;
  font-size: 1.5rem;
}

.error-state p {
  margin: 0;
  color: #991b1b;
  font-size: 1rem;
}

.skeuomorphic-btn {
  padding: 13px 32px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.1) 25%, transparent 50%),
    linear-gradient(145deg, #bef264 0%, #a3e635 25%, #84cc16 50%, #65a30d 75%, #4d7c0f 100%);
  border: 2px solid #4d7c0f;
  border-radius: 999px;
  font-family: 'Baloo 2', cursive;
  font-size: 1rem;
  font-weight: 700;
  color: #0f2d00;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow:
    0 5px 0 0 #166534,
    0 6px 14px rgba(0,0,0,0.32),
    inset 0 2px 0 rgba(255,255,255,0.28),
    inset 0 -2px 4px rgba(0,0,0,0.2);
}

.skeuomorphic-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 7px 0 0 #166534,
    0 9px 20px rgba(0,0,0,0.36),
    inset 0 2px 0 rgba(255,255,255,0.32),
    inset 0 -2px 4px rgba(0,0,0,0.2);
}

.skeuomorphic-btn:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 0 #166534,
    0 3px 8px rgba(0,0,0,0.3),
    inset 0 3px 8px rgba(0,0,0,0.28);
}

/* Smooth transitions for all fandom elements */
.fandom-card,
.fandom-skeleton-card,
.fandom-detail-skeleton-project {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.fandoms-grid,
.fandom-skeleton-grid {
  transition: opacity 0.3s ease;
}

/* Fade in animation for loaded content */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fandom-card {
  animation: fadeIn 0.4s ease-out;
}

.fandom-card:nth-child(1) { animation-delay: 0.05s; }
.fandom-card:nth-child(2) { animation-delay: 0.1s; }
.fandom-card:nth-child(3) { animation-delay: 0.15s; }
.fandom-card:nth-child(4) { animation-delay: 0.2s; }
.fandom-card:nth-child(5) { animation-delay: 0.25s; }
.fandom-card:nth-child(6) { animation-delay: 0.3s; }
.fandom-card:nth-child(n+7) { animation-delay: 0.35s; }

/* Smooth tab transitions */
.fandom-tab-content {
  animation: fadeIn 0.3s ease-out;
}

/* Enhanced search container */
.search-container {
  position: relative;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.search-container:focus-within {
  transform: translateY(-2px);
}

/* Responsive design */
@media (max-width: 768px) {
  .fandoms-grid,
  .fandom-skeleton-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }
  
  .search-container {
    max-width: 100%;
    padding: 0 10px;
  }
  
  .fandom-detail-skeleton-content {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
}

/* Leave fandom - red pill */
#leave-fandom-btn {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 25%, transparent 50%),
    linear-gradient(145deg, #fca5a5 0%, #f87171 25%, #ef4444 50%, #dc2626 75%, #b91c1c 100%);
  color: #fff;
  border-color: #991b1b;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow:
    0 5px 0 0 #7f1d1d,
    0 6px 14px rgba(0,0,0,0.3),
    inset 0 2px 0 rgba(255,255,255,0.2),
    inset 0 -2px 4px rgba(0,0,0,0.25);
}
#leave-fandom-btn:hover {
  box-shadow:
    0 7px 0 0 #7f1d1d,
    0 9px 20px rgba(0,0,0,0.35),
    inset 0 2px 0 rgba(255,255,255,0.25),
    inset 0 -2px 4px rgba(0,0,0,0.25);
  transform: translateY(-2px);
}
#leave-fandom-btn:active {
  box-shadow:
    0 2px 0 0 #7f1d1d,
    0 3px 8px rgba(0,0,0,0.3),
    inset 0 3px 8px rgba(0,0,0,0.3);
  transform: translateY(3px);
}

/* Tab panel gloss strip and stitch */
.fandom-tabs::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.55), rgba(255,255,255,0.2), rgba(255,255,255,0.55));
  border-radius: 18px 18px 0 0;
  pointer-events: none;
}
.fandom-tabs::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 16px;
  right: 16px;
  height: 0;
  border-bottom: 2px dashed rgba(120,70,20,0.35);
  pointer-events: none;
}
