/* Variables for themes */
:root {
  --color-primary: #ff6b9d;
  --color-primary-hover: #ff4f87;
  --color-secondary: #ffb84d;
  --color-accent: #6b7fff;
  --color-success: #4caf50;

  --color-bg: #ffffff;
  --color-bg-secondary: #f8f9fa;
  --color-bg-tertiary: #f0f2f5;
  --color-surface: #ffffff;

  --color-text: #1a1a1a;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;

  --color-border: #e5e7eb;
  --color-border-hover: #d1d5db;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --color-bg: #1a1a1a;
  --color-bg-secondary: #252525;
  --color-bg-tertiary: #2f2f2f;
  --color-surface: #252525;

  --color-text: #ffffff;
  --color-text-secondary: #b4b4b4;
  --color-text-muted: #808080;

  --color-border: #404040;
  --color-border-hover: #525252;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* Header */
.header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* Added logo image styling */
.logo-image {
  height: 70px;
  width: auto;
  object-fit: contain;
}

.logo i {
  font-size: 2rem;
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav a {
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav a:hover {
  color: var(--color-primary);
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

.favorites-link {
  position: relative;
}

.favorites-count {
  position: absolute;
  top: -8px;
  right: -12px;
  background: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.language-dropdown {
  position: relative;
}

.language-selector {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-selector:hover {
  border-color: var(--color-primary);
  background: var(--color-bg-secondary);
}

.language-selector i {
  font-size: 0.7rem;
  transition: var(--transition);
}

.language-dropdown:hover .language-selector i {
  transform: rotate(180deg);
}

.language-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1000;
}

.language-dropdown:hover .language-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--color-text);
  transition: var(--transition);
  border-bottom: 1px solid var(--color-border);
}

.language-option:last-child {
  border-bottom: none;
}

.language-option:hover {
  background: var(--color-bg-secondary);
  color: var(--color-primary);
}

.theme-toggle {
  background: var(--color-bg-tertiary);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--color-text);
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--color-primary);
  color: white;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text);
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  padding: 4rem 0;
  color: white;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* Search Bar */
.search-bar {
  display: flex;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper i {
  position: absolute;
  left: 1rem;
  color: var(--color-text-muted);
}

.search-input-wrapper input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: white;
  color: var(--color-text);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--color-bg-tertiary);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg-secondary);
  border-color: var(--color-primary);
}

.btn-large {
  width: 100%;
  padding: 1.25rem 2rem;
  font-size: 1.1rem;
}

/* Quick Filters */
.quick-filters {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.filter-chip {
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover,
.filter-chip.active {
  background: white;
  color: var(--color-primary);
  transform: scale(1.05);
}

.filter-divider {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
}

/* Categories Section */
.categories-section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  font-weight: 700;
  color: var(--color-text);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2rem;
}

.category-card {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 2px solid var(--color-border);
  transition: var(--transition);
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.category-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.category-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.category-card p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* Featured Section */
.featured-section {
  padding: 4rem 0;
}

.bg-secondary {
  background: var(--color-bg-secondary);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.view-all {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1.1rem;
}

.view-all:hover {
  text-decoration: underline;
}

/* Coloring Grid */
.coloring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.coloring-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--color-border);
  transition: var(--transition);
  cursor: pointer;
}

.coloring-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.coloring-card-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--color-bg-tertiary);
}

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

.favorite-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--color-text-muted);
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.favorite-btn:hover,
.favorite-btn.active {
  color: var(--color-primary);
  transform: scale(1.1);
}

.favorite-btn.active i {
  font-weight: 900;
}

.coloring-card-content {
  padding: 1.25rem;
}

.card-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: var(--color-bg-tertiary);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.coloring-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-rating i {
  color: var(--color-secondary);
}

/* Features Section */
.features-section {
  padding: 4rem 0;
  background: var(--color-bg-secondary);
}

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

.feature-card {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
}

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

.feature-card p {
  color: var(--color-text-secondary);
}

/* Footer */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

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

.footer-title {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-text-secondary);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: var(--color-bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--color-text);
}

.social-links a:hover {
  background: var(--color-primary);
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%) !important;
  padding: 3rem 0;
  color: white !important;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: white !important;
}

.page-header p {
  color: white !important;
  opacity: 0.95;
}

/* New browse section with side-by-side layout */
.browse-section {
  padding: 2rem 0 4rem 0;
  background: var(--color-bg-secondary);
}

.browse-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.filters-sidebar {
  flex: 0 0 280px;
  position: sticky;
  top: 90px;
}

.results-area {
  flex: 1;
  min-width: 0;
}

.results-header {
  margin-bottom: 1.5rem;
}

.results-info {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.results-info #resultsCount {
  color: var(--color-primary);
  font-size: 1.5rem;
}

/* Removed old filters-section and results-section, replaced with browse-section */
.filters-panel {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-text);
  position: relative;
  z-index: 1;
}

.filter-group select,
.filter-group input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.95rem;
  position: relative;
  z-index: 10;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--color-text);
}

.checkbox-label input {
  cursor: pointer;
}

/* Results Section */

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination button,
.pagination .page-link {
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 44px;
  justify-content: center;
  font-size: 0.95rem;
}

.pagination button:hover,
.pagination .page-link:hover {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pagination button.active,
.pagination .page-link.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  cursor: default;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Pagination arrows */
.pagination .page-prev,
.pagination .page-next {
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.pagination .page-prev:hover,
.pagination .page-next:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-2px) scale(1.05);
}

.pagination .page-arrow {
  font-size: 1.3rem;
  line-height: 1;
  font-weight: bold;
}

.pagination .page-text {
  font-size: 0.95rem;
}

/* Page numbers container */
.pagination .page-numbers {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pagination .page-number {
  padding: 0.75rem 1rem;
  min-width: 48px;
  font-weight: 700;
}

/* Responsive pagination */
@media (max-width: 768px) {
  .pagination {
    gap: 0.4rem;
  }

  .pagination .page-link {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .pagination .page-prev,
  .pagination .page-next {
    padding: 0.6rem 1.2rem;
  }

  .pagination .page-number {
    padding: 0.6rem 0.9rem;
    min-width: 44px;
  }
}

@media (max-width: 480px) {
  .pagination {
    gap: 0.3rem;
  }

  .pagination .page-text {
    display: none;
  }

  .pagination .page-prev,
  .pagination .page-next {
    padding: 0.6rem 1rem;
    min-width: 44px;
  }

  .pagination .page-link {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }

  .pagination .page-number {
    padding: 0.5rem 0.7rem;
    min-width: 40px;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 0;
  background: var(--color-bg-secondary);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--color-primary);
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  color: var(--color-text-secondary);
  margin: 0 0.5rem;
}

/* Detail Section */
.detail-section {
  padding: 3rem 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.detail-image-wrapper {
  position: relative;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--color-border);
}

.detail-image-wrapper img {
  width: 100%;
  display: block;
}

.favorite-btn-large {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 60px;
  height: 60px;
  background: white;
  border: none;
  border-radius: 50%;
  font-size: 1.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}

.favorite-btn-large:hover,
.favorite-btn-large.active {
  color: var(--color-primary);
  transform: scale(1.1);
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.share-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.share-section p {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.share-buttons {
  display: flex;
  gap: 1rem;
}

.share-btn {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: white;
  transition: var(--transition);
}

.share-btn.facebook {
  background: #1877f2;
}

.share-btn.messenger {
  background: #0084ff;
}

.share-btn.pinterest {
  background: #e60023;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.detail-tags {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.detail-tags .tag {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

#detailTitle {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.rating-section {
  background: var(--color-bg-secondary);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.rating-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stars-display {
  display: flex;
  gap: 0.25rem;
  font-size: 1.25rem;
  color: var(--color-secondary);
}

.rating-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.rating-count {
  color: var(--color-text-secondary);
}

.rating-input p {
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.stars-input {
  display: flex;
  gap: 0.5rem;
  font-size: 1.75rem;
}

.stars-input i {
  cursor: pointer;
  color: var(--color-text-muted);
  transition: var(--transition);
}

.stars-input i:hover,
.stars-input i.active {
  color: var(--color-secondary);
  transform: scale(1.2);
}

.detail-description {
  margin-bottom: 2rem;
}

.detail-description h3 {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.detail-description p {
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-item i {
  font-size: 2rem;
  color: var(--color-primary);
}

.stat-item strong {
  display: block;
  font-size: 1.5rem;
  color: var(--color-text);
}

.stat-item span {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.detail-categories h4 {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.category-tags {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.category-tags .tag {
  background: var(--color-primary);
  color: white;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.category-tags .tag:hover {
  background: var(--color-primary-hover);
}

/* Related Section */
.related-section {
  padding: 4rem 0;
  background: var(--color-bg-secondary);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  padding: 2rem;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
  color: var(--color-text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: 1;
}

.modal-close:hover {
  color: var(--color-primary);
}

.modal-body {
  padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .page-header {
    padding: 2rem 0;
  }

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

  .hero-title {
    font-size: 2rem;
  }

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

  .search-bar {
    flex-direction: column;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .coloring-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  /* Mobile responsive for browse layout */
  .browse-layout {
    flex-direction: column;
  }

  .filters-sidebar {
    position: static;
    width: 100%;
    flex: 1;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .detail-actions {
    grid-template-columns: 1fr;
  }

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

  .detail-stats {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    padding: 2rem 0;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }
}

/* SEO Content Section */
.seo-section {
  padding: 3rem 0;
  background: var(--color-bg-secondary);
}

.seo-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.seo-text {
  color: var(--color-text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
  max-height: 4.5em;
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease;
}

.seo-text.expanded {
  max-height: 1000px;
}

.seo-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3em;
  background: linear-gradient(to bottom, transparent, var(--color-bg-secondary));
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.seo-text.expanded::after {
  opacity: 0;
}

.seo-toggle-btn {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.seo-toggle-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
}

.seo-toggle-btn i {
  transition: transform 0.3s ease;
}
