/* ==================== Hero Section ==================== */
.category-detail-hero {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 6rem 0 4rem;
  margin-top: 0;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.gradient-orb.orb-1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.gradient-orb.orb-2 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  bottom: -150px;
  right: -100px;
  animation-delay: 7s;
}

.gradient-orb.orb-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  top: 50%;
  right: 10%;
  animation-delay: 14s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.category-detail-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  z-index: 1;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2rem;
  font-size: 14px;
  animation: fadeInDown 0.6s ease-out;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.breadcrumb i {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb span {
  color: #ffffff;
  font-weight: 500;
}

/* Category Header */
.category-detail-header {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease-out;
}

.category-icon {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.category-icon i {
  font-size: 48px;
  color: white;
}

.category-info {
  flex: 1;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

.category-badge i {
  font-size: 12px;
}

.category-detail-title {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.2;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.category-detail-description {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  max-width: 800px;
}

/* Stats Grid */
.category-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 2rem;
  animation: fadeInUp 1s ease-out;
}

.stat-card {
  background: rgba(255, 255, 255, 0.15);
  padding: 24px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.stat-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  flex-shrink: 0;
}

.stat-icon i {
  font-size: 24px;
  color: white;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: white;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== Tools Section ==================== */
.tools-section {
  padding: 3rem 0;
}

/* Filters Section */
.filters-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

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

.filters-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.filters-title i {
  color: #6366f1;
  font-size: 1.1rem;
}

.filter-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-option {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.filter-option input[type="radio"] {
  display: none;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  transition: all 0.3s ease;
  user-select: none;
}

.filter-label i {
  font-size: 14px;
  transition: color 0.3s ease;
}

.filter-option input[type="radio"]:checked + .filter-label {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.filter-option:hover .filter-label {
  border-color: #667eea;
  transform: translateY(-2px);
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 2rem;
}

.tool-card {
  opacity: 0;
  animation: cardFadeIn 0.5s ease-out forwards;
  animation-delay: calc(var(--index, 0) * 0.1s);
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-card-inner {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tool-card-inner:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  border-color: #667eea;
}

.tool-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f3f4f6;
}

.tool-logo-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2px;
  flex-shrink: 0;
}

.tool-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  background: white;
}

.tool-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stars {
  color: #fbbf24;
  font-size: 14px;
  display: flex;
  gap: 2px;
}

.rating-value {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.tool-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tool-name {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 10px 0;
  line-height: 1.3;
}


.tool-description {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.tool-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #f3f4f6;
  font-size: 13px;
  color: #6b7280;
  margin-top: auto;
}

.tool-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-meta i {
  font-size: 12px;
}

.tool-price i {
  color: #10b981;
}

.tool-users i {
  color: #6366f1;
}

.tool-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #f3f4f6;
  background: #fafbfc;
}

.btn-details, .btn-visit {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-details {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-visit {
  background: white;
  color: #4b5563;
  border: 2px solid #e5e7eb;
}

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

.btn-visit:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
}

/* No Tools State */
.no-tools {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 16px;
  border: 2px dashed #e5e7eb;
}

.no-tools-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  opacity: 0.8;
}

.no-tools-icon i {
  font-size: 36px;
  color: white;
}

.no-tools h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.no-tools p {
  font-size: 1rem;
  color: #6b7280;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 3rem;
  padding: 2rem 0;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  color: #4b5563;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:not(:disabled):hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 15px;
  font-weight: 500;
  color: #6b7280;
  padding: 12px 20px;
  background: white;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
}

.pagination-info span {
  font-weight: 700;
  color: #667eea;
}

/* ==================== Dark Mode ==================== */
.dark-mode .category-detail-hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.dark-mode .breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
}

.dark-mode .breadcrumb a:hover {
  color: #ffffff;
}

.dark-mode .breadcrumb i {
  color: rgba(255, 255, 255, 0.5);
}

.dark-mode .breadcrumb span {
  color: #ffffff;
}

.dark-mode .category-icon {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.dark-mode .category-badge {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .category-detail-title {
  color: #ffffff;
}

.dark-mode .category-detail-description {
  color: rgba(255, 255, 255, 0.9);
}

.dark-mode .stat-card {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.dark-mode .stat-card:hover {
  background: rgba(255, 255, 255, 0.15);
}

.dark-mode .stat-icon {
  background: rgba(255, 255, 255, 0.15);
}

.dark-mode .filters-section {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .filters-title {
  color: #f8fafc;
}

.dark-mode .filter-label {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

.dark-mode .filter-option input[type="radio"]:checked + .filter-label {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
}

.dark-mode .filter-option:hover .filter-label {
  border-color: #818cf8;
}

.dark-mode .tool-card-inner {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .tool-card-inner:hover {
  border-color: #818cf8;
}

.dark-mode .tool-header {
  border-color: #334155;
}

.dark-mode .tool-name {
  color: #f8fafc;
}

.dark-mode .rating-value {
  color: #f8fafc;
}

.dark-mode .tool-description {
  color: #cbd5e1;
}

.dark-mode .tool-meta {
  border-color: #334155;
  color: #94a3b8;
}

.dark-mode .tool-actions {
  background: #0f172a;
  border-color: #334155;
}

.dark-mode .btn-visit {
  background: #334155;
  color: #cbd5e1;
  border-color: #475569;
}

.dark-mode .btn-visit:hover {
  border-color: #818cf8;
  color: #818cf8;
}

.dark-mode .no-tools {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .no-tools h3 {
  color: #f8fafc;
}

.dark-mode .no-tools p {
  color: #cbd5e1;
}

.dark-mode .pagination-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.dark-mode .pagination-btn:not(:disabled):hover {
  border-color: #818cf8;
  color: #818cf8;
}

.dark-mode .pagination-info {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.dark-mode .pagination-info span {
  color: #818cf8;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
  .category-detail-hero {
    padding: 4rem 0 3rem;
  }

  .category-detail-header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .category-icon {
    width: 80px;
    height: 80px;
  }

  .category-icon i {
    font-size: 36px;
  }

  .category-detail-title {
    font-size: 2rem;
  }

  .category-detail-description {
    font-size: 1rem;
  }

  .category-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
  }

  .stat-icon i {
    font-size: 20px;
  }

  .stat-value {
    font-size: 24px;
  }

  .stat-label {
    font-size: 11px;
  }

  .tools-section {
    padding: 2rem 0;
  }

  .filters-section {
    padding: 16px;
  }

  .filters-title {
    font-size: 1.1rem;
  }

  .filter-options {
    gap: 8px;
  }

  .filter-label {
    padding: 8px 14px;
    font-size: 13px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pagination {
    gap: 12px;
    flex-wrap: wrap;
  }

  .pagination-btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .pagination-info {
    order: -1;
    width: 100%;
    text-align: center;
  }
}