/* Characters List Page Styles */
:root {
  --storypie-yellow: #F9B300;
  --storypie-blue: #5C9BFF;
  --storypie-purple: #854EF2;
  --storypie-pink: #FF476B;
  --storypie-orange: #FFB23E;
  --storypie-green: #277C2C;
  --storypie-primary: #25458F;
  --storypie-primary-dark: #1a3e80;

  /* Accent Colors from Reference */
  --accent-yellow: #F9B300;
  --accent-blue:   #5C9BFF;
  --accent-purple: #854EF2;
  --accent-pink:   #FF476B;
  --accent-orange: #FFB23E;
  --accent-green:  rgb(6, 214, 160); /* Updated green color */
}

.characters-list-page {
  min-height: 100vh;
  background-color: var(--storypie-primary);
  padding: 0;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  position: relative;
}

.characters-list-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(45deg, var(--storypie-primary), var(--storypie-primary) 10px, var(--storypie-primary-dark) 10px, var(--storypie-primary-dark) 20px);
  opacity: 0.8;
  z-index: 0;
}

/* Character Page Header */
.character-page-header {
  position: relative;
  padding: 3rem 1rem;
  z-index: 1;
}

.character-page-content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.page-title {
  color: white;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-align: center;
}

.page-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
  font-weight: 400;
  text-align: center;
}

/* Character Grid */
.character-grid-container {
  margin-top: 0;
  position: relative;
  z-index: 5;
  padding-bottom: 2rem;
}

.character-grid {
  display: grid;
  /* Mobile first: 1 column */
  grid-template-columns: 1fr;
  gap: 32px; /* Increased gap for single column */
  justify-items: center;
  padding: 32px 16px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Character Card */
.character-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.character-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-decoration: none;
  cursor: pointer;
}

.character-image-container {
  position: relative;
  /* Reverted to previous size */
  width: 144px; /* ~w-36 */
  height: 144px; /* ~h-36 */
  border-radius: 50%;
  background-color: var(--character-color);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0; /* Removed padding */
  margin-bottom: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden; /* Ensure overflow is hidden for image scaling */
  border: 5px solid var(--character-color);
}

.character-image {
  width: 100%; /* Further reduced image size */
  height: 100%; /* Further reduced image size */
  object-fit: contain;
}

.character-name-button {
  background-color: var(--character-color);
  color: white;
  padding: 8px 20px; /* Slightly increased padding */
  border-radius: 9999px;
  font-size: 18px; /* Increased size */
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 1rem; /* Added margin-top (like mt-4) */
}

/* Color variations */
.character-color-yellow { --character-color: var(--storypie-yellow); }
.character-color-blue { --character-color: var(--storypie-blue); }
.character-color-purple { --character-color: var(--storypie-purple); }
.character-color-pink { --character-color: var(--storypie-pink); }
.character-color-orange { --character-color: var(--storypie-orange); }
.character-color-green { --character-color: var(--storypie-green); }

/* Hover effects */
.character-card:hover .character-image-container {
  transform: scale(1.1); /* Updated hover effect */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.character-card:hover .character-name-button {
  transform: scale(1.1); /* Updated hover effect */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Focus styles for accessibility */
.character-card:focus {
  outline: none;
}

.character-card:focus-visible .character-image-container {
  outline: 3px solid var(--character-color);
  outline-offset: 3px;
}

/* Animation classes added by JS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */

/* Small screens and up (Tailwind sm: 640px) - 2 columns */
@media (min-width: 640px) {
  .character-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px; /* Adjust gap for multi-column */
  }
  .character-image-container {
     /* Reverted to previous size */
     width: 176px; /* ~w-44 */
     height: 176px; /* ~h-44 */
  }
}

/* Medium screens and up (Tailwind md: 768px) - 3 columns */
@media (min-width: 768px) {
  .character-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .character-image-container {
     /* Reverted to previous size */
     width: 208px; /* ~w-52 */
     height: 208px; /* ~h-52 */
  }
}

/* Large screens and up (Tailwind lg: 1024px) - 4 columns */
@media (min-width: 1024px) {
  .character-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  /* Image container size remains md size */
}

/* Mobile-specific adjustments (max-width) if needed, currently handled by base styles */
/* @media (max-width: 639px) { ... } */

/* Remove old mobile responsiveness block */
/* @media (max-width: 600px) { ... } */

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .character-card:hover .character-image-container,
  .character-card:hover .character-name-button {
    transform: none;
  }
  
  .character-item {
    transition: none;
  }
} 