/* styles.css */

/* CSS Variables for theming */
:root {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8f9fa;
  --text-primary: #222;
  --text-secondary: #666;
  --text-tertiary: #777;
  --border-color: #ddd;
  --border-light: #e5e5e5;
  --border-subtle: #eee;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 10px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #252525;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-tertiary: #999;
  --border-color: #404040;
  --border-light: #383838;
  --border-subtle: #333;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 10px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Header + Footer */
.site-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 0.5rem 1rem 0.5rem 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 12px 12px;
}

.site-header h1 {
  margin: 0 0 0.4rem 0;
  text-align: center;
}

.site-header h1 a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.site-header h1 a:hover {
  opacity: 0.9;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.site-header nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.site-header nav a {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: white;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-header nav a:hover {
  background: white;
  color: #667eea;
  transform: translateY(-2px);
  text-decoration: none;
}

.site-header nav a.active {
  background: white;
  color: #667eea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-header nav a.nav-vibe {
  background: white;
  color: #667eea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-header nav a.nav-vibe:hover {
  background: #f0f0ff;
  color: #764ba2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.theme-toggle:active {
  transform: translateY(0) scale(0.98);
}

.site-footer {
  border-top: 1px solid var(--border-light);
  margin-top: 3rem;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-tertiary);
}


body {
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 1.5rem 1.5rem;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2 {
  font-weight: 700;
  color: var(--text-primary);
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.6rem;
  margin-top: 2rem;
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 0.3rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

/* Social Share Buttons */
.social-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.share-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.share-button.twitter {
  background: #1DA1F2;
  color: white;
}

.share-button.facebook {
  background: #1877F2;
  color: white;
}

.share-button.reddit {
  background: #FF4500;
  color: white;
}

img.cover {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 1rem;
}

.meta div {
  background: var(--bg-secondary);
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

li {
  margin: 8px 0;
}

a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

p {
  font-size: 1.05rem;
  margin-top: 1rem;
  background: var(--bg-secondary);
  padding: 1rem 1.2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.anime-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.anime-item {
  text-align: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  transition: transform 0.2s ease;
  position: relative;
}

.anime-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.anime-item img {
  max-width: 100%;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.rank-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.staff-list {
  list-style: none;
  padding: 0;
}

.staff-item {
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.staff-item a {
  text-decoration: none;
  color: var(--text-primary);
}

/* Homepage Styles */
.home-container {
  max-width: 1100px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  margin-bottom: 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.hero h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: white;
  border-bottom: none;
  margin-top: 0;
}

.hero-subtitle {
  font-size: 1rem;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.hero-search-form {
  display: flex;
  max-width: 650px;
  margin: 1.5rem auto 0;
}

.hero-search-input {
  flex: 1;
  padding: 14px 20px;
  font-size: 1.05rem;
  border: none;
  border-radius: 30px 0 0 30px;
  outline: none;
  font-family: inherit;
  background: white;
  color: #222;
}

.hero-search-button {
  padding: 14px 28px;
  background: white;
  color: #667eea;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 0 30px 30px 0;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: inherit;
}

.hero-search-button:hover {
  background: #f0f0ff;
}

.hero-examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.hero-example {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.hero-example:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transform: translateY(-1px);
}

/* How It Works Strip */
.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.how-it-works-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-top: 3px solid #667eea;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  display: block;
  transition: box-shadow 0.2s, transform 0.15s;
}

.how-it-works-item:hover {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
  transform: translateY(-2px);
}

.how-it-works-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.how-it-works-item h4 {
  color: #667eea;
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
}

.how-it-works-item p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-style: italic;
  background: transparent;
  padding: 0;
  box-shadow: none;
  margin: 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.feature-card {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  border: 1px solid var(--border-light);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.feature-link {
  display: inline-block;
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.feature-link:hover {
  color: #764ba2;
  text-decoration: none;
}

.cta {
  text-align: center;
  padding: 2.5rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
  margin-top: 3rem;
  border: 1px solid var(--border-light);
}

.cta h3 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.cta p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  text-decoration: none;
}

.btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem;
}

.pagination a {
  padding: 0.5rem 1rem;
  background: #667eea;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.pagination a:hover {
  background: #764ba2;
  text-decoration: none;
}

.pagination .disabled {
  padding: 0.5rem 1rem;
  background: #e5e5e5;
  color: #999;
  border-radius: 6px;
  cursor: not-allowed;
}

.pagination span:not(.disabled) {
  font-weight: 600;
  color: var(--text-primary);
}

/* Studio List Styles */
.studio-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.studio-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.studio-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.studio-item a {
  text-decoration: none;
  color: var(--text-primary);
  display: block;
}

.studio-item strong {
  color: #667eea;
  font-size: 1.1rem;
}

/* List Page Styles */
.list-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  text-align: center;
  padding: 1rem 1rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.page-header h1 {
  font-size: 1.75rem;
  margin: 0 0 0.35rem 0;
  color: white;
  font-weight: 700;
}

.page-subtitle {
  font-size: 0.9rem;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.4;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.quick-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.quick-link {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.quick-link:hover {
  background: white;
  color: #667eea;
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.quick-link.active {
  background: white;
  color: #667eea;
  border-color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.content-grid {
  padding: 0 1rem;
}

/* Enhanced Anime List */
.anime-title {
  display: block;
  font-weight: 600;
  margin-top: 0.5rem;
  color: var(--text-primary);
}

.anime-rating {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.anime-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
  justify-content: center;
}

.genre-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.genre-tag:hover {
  transform: scale(1.05);
  opacity: 0.9;
  text-decoration: none;
}

/* Enhanced Staff List */
.staff-list-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.staff-item-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.staff-item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

.staff-item-card a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
}

.staff-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.staff-name {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.staff-role {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.view-profile {
  color: #667eea;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Enhanced Studio List */
.studio-list-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.studio-item-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.studio-item-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.studio-item-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.studio-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.studio-name {
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: block;
}

.view-works {
  color: #667eea;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Enhanced Role List */
.role-list-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.role-item-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.role-item-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.role-item-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.role-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.role-name {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.staff-count {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Enhanced Genre List */
.genre-list-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.genre-item-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.genre-item-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.genre-item-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.genre-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.genre-name {
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.anime-count {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Recommendations Section */
.recommendations-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #eee;
}

.recommendations-section h2 {
  margin-bottom: 1.5rem;
}

.recommendations-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.recommendation-item {
  text-align: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recommendation-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.recommendation-item a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.recommendation-item img {
  max-width: 100%;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.recommendation-title {
  display: block;
  font-weight: 600;
  margin-top: 0.5rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.3;
}

.recommendation-score {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Search Section */
.search-section {
  padding: 0 1rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
}

.search-button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 1rem;
}

.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.search-results-summary {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.search-results-summary p {
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.search-results-section {
  margin-bottom: 3rem;
}

.search-results-section h2 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #eee;
}

.search-hint {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
}

/* Season List */
.season-list-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.season-item-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.season-item-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.season-item-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.season-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.season-name {
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 0.5rem;
  padding: 0 1rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0.5rem 1rem;
  margin: 0;
  background: var(--bg-secondary);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  gap: 0.5rem;
  border: 1px solid var(--border-light);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  margin: 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: '›';
  margin-left: 0.5rem;
  color: #999;
  font-weight: 600;
  font-size: 1.2rem;
}

.breadcrumbs a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: #764ba2;
  text-decoration: underline;
}

.breadcrumbs li[aria-current="page"] {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Recently Viewed */
.recently-viewed {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 1rem 1.5rem 1rem;
  box-shadow: var(--shadow-sm);
}

.recently-viewed h3 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.recent-tracking-toggle {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.recent-tracking-toggle:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
  transform: translateY(-1px);
}

.recent-tracking-toggle[data-enabled="false"]:hover {
  background: #10b981;
  border-color: #10b981;
}

.recent-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.recent-scroll::-webkit-scrollbar {
  height: 6px;
}

.recent-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.recent-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.recent-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  gap: 1rem;
  min-width: min-content;
}

.recent-item {
  margin: 0;
  position: relative;
  flex-shrink: 0;
}

.recent-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  padding: 0;
  opacity: 0;
}

.recent-item:hover .recent-remove {
  opacity: 1;
}

.recent-remove:hover {
  background: rgba(220, 38, 38, 0.9);
  transform: scale(1.1);
}

.recent-item a {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 140px;
  padding: 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease, transform 0.2s ease;
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
}

.recent-item a:hover {
  background: var(--bg-tertiary);
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.recent-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}

.recent-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.recent-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  min-height: 2.6em;
}

.recent-score {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Favorites/Bookmarks */
.favorite-button-detail {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #e0e0e0;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem auto;
  color: #999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .favorite-button-detail {
  background: rgba(45, 45, 45, 0.9);
  border-color: #404040;
}

.favorite-button-detail:hover {
  transform: scale(1.1);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.favorite-button-detail.favorited {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: #ef4444;
  color: white;
  animation: heartBeat 0.3s ease;
}

.favorite-button-detail.favorited:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.favorite-button-card {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 5;
  opacity: 0;
}

[data-theme="dark"] .favorite-button-card {
  background: rgba(45, 45, 45, 0.95);
}

.anime-item:hover .favorite-button-card {
  opacity: 1;
}

.favorite-button-card:hover {
  transform: scale(1.15);
  color: #ef4444;
}

.favorite-button-card.favorited {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  opacity: 1;
}

.favorite-button-card.favorited:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(1.1); }
  75% { transform: scale(1.15); }
}

.favorite-toast {
  position: fixed;
  bottom: 5rem;
  right: 2rem;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.favorite-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Infinite Scroll Loading */
.infinite-scroll-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin: 2rem 0;
}

.infinite-scroll-loading p {
  margin: 0.5rem 0 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Skeleton Loaders */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--border-color) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

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

/* Skeleton card for anime grid */
.skeleton-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skeleton-card-image {
  width: 100%;
  padding-top: 140%; /* Maintain aspect ratio */
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--border-color) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-card-content {
  padding: 0.75rem;
}

.skeleton-card-title {
  height: 1.2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--border-color) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-card-meta {
  height: 0.9rem;
  width: 60%;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--border-color) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

/* Skeleton for detail page */
.skeleton-detail {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.skeleton-detail-image {
  width: 100%;
  height: 350px;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--border-color) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-detail-title {
  height: 2rem;
  width: 80%;
  margin-bottom: 1rem;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--border-color) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-detail-line {
  height: 1rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--border-color) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-detail-line:nth-child(2) {
  width: 70%;
}

.skeleton-detail-line:nth-child(3) {
  width: 90%;
}

.skeleton-detail-line:nth-child(4) {
  width: 60%;
}

/* Skeleton list item (for staff, studios, roles) */
.skeleton-list-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.skeleton-list-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--border-color) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-list-content {
  flex: 1;
}

.skeleton-list-title {
  height: 1.2rem;
  width: 70%;
  margin-bottom: 0.5rem;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--border-color) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-list-subtitle {
  height: 0.9rem;
  width: 50%;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--border-color) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  /* Header adjustments */
  .site-header {
    padding: 1rem;
    border-radius: 8px;
  }

  .site-header h1 a {
    font-size: 1.4rem;
  }

  .site-header nav {
    gap: 0.375rem;
  }

  .site-header nav a {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
  }

  /* Page header adjustments */
  .page-header {
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    border-radius: 12px;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .page-subtitle {
    font-size: 0.95rem;
  }

  /* Homepage adjustments */
  .hero {
    padding: 1.25rem 1rem;
    border-radius: 10px;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-search-form {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero-search-input {
    border-radius: 30px;
  }

  .hero-search-button {
    border-radius: 30px;
  }

  .how-it-works {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .cta {
    padding: 1.5rem;
  }

  .cta h3 {
    font-size: 1.4rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }

  /* List pages adjustments */
  .staff-list-enhanced,
  .studio-list-enhanced,
  .role-list-enhanced,
  .genre-list-enhanced,
  .season-list-enhanced {
    grid-template-columns: 1fr;
  }

  .anime-list,
  .recommendations-list {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
  }

  /* General text adjustments */
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  /* Pagination adjustments */
  .pagination {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .pagination a,
  .pagination .disabled {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .pagination span:not(.disabled) {
    font-size: 0.875rem;
  }

  /* Content grid adjustments */
  .content-grid {
    padding: 0 0.5rem;
  }

  /* Meta info adjustments */
  .meta {
    grid-template-columns: 1fr;
  }

  /* Skeleton detail adjustments */
  .skeleton-detail {
    grid-template-columns: 1fr;
  }

  .skeleton-detail-image {
    height: 300px;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  body {
    padding: 0.5rem;
  }

  .site-header {
    padding: 0.75rem;
  }

  .site-header h1 a {
    font-size: 1.25rem;
  }

  .site-header nav a {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .page-header h1,
  .hero h2 {
    font-size: 1.35rem;
  }

  .hero {
    padding: 1rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .anime-list,
  .recommendations-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .anime-item,
  .recommendation-item {
    padding: 0.375rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }
}

/* Anime Detail Layout with Sidebar */
.anime-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.anime-sidebar {
  position: sticky;
  top: 1rem;
  height: fit-content;
}

.anime-sidebar .cover {
  width: 100%;
  margin: 0 0 0.5rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

#favorites-container {
  margin-bottom: 0;
}

.favorite-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  width: 100%;
  font-size: 1rem;
}

.favorite-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.favorite-button.favorited {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.favorite-button svg {
  flex-shrink: 0;
}

.anime-sidebar .social-share {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0;
  margin-top: 0;
  background: transparent;
}

.anime-sidebar .share-label {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: var(--text-secondary);
}

.anime-sidebar .share-buttons-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.anime-sidebar .share-button {
  flex: 1;
  height: 44px;
  padding: 0.5rem;
  border-radius: 6px;
  justify-content: center;
  gap: 0.5rem;
  display: flex;
  align-items: center;
}

.sidebar-streaming {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-streaming h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.sidebar-streaming .streaming-site-group {
  margin-bottom: 1.5rem;
}

.sidebar-streaming .streaming-site-group:last-child {
  margin-bottom: 0;
}

.sidebar-streaming h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  color: #667eea;
  font-weight: 600;
}

.sidebar-streaming .episode-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem 0;
}

.sidebar-streaming .episode-item {
  margin: 0.25rem 0;
}

.sidebar-streaming .episode-item.hidden {
  display: none;
}

.sidebar-streaming .episode-link {
  display: block;
  padding: 0.4rem 0.6rem;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.sidebar-streaming .episode-link:hover {
  background: #667eea;
  color: white;
  text-decoration: none;
  transform: translateX(4px);
}

.toggle-episodes {
  width: 100%;
  padding: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: #667eea;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.toggle-episodes:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.anime-main {
  min-width: 0;
}

/* Responsive adjustments for anime detail */
@media (max-width: 968px) {
  .anime-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .anime-sidebar {
    position: static;
    max-width: 400px;
    margin: 0 auto;
  }

  .anime-sidebar .social-share {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .anime-sidebar .share-button {
    width: 40px;
    height: 40px;
    padding: 0;
  }
}

/* Collapsible Lists (Staff/Studios) */
.collapsible-list .list-item.hidden {
  display: none;
}

.toggle-list-button {
  width: 100%;
  padding: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: #667eea;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.toggle-list-button:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

