/* ========== ICON LIST LAYOUT ========== */
#iconList {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-flow: row wrap;
  gap: 1.5rem;
  padding: 1rem 0;
}

.icon-item {
  flex: 0 1 220px;
  min-width: 200px;
  max-width: 240px;
}

/* ========== MODERN CARD DESIGN ========== */
.modern-card {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  height: 100%;
}

/* Hover effects */
.modern-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
}

/* Card inner structure */
.card-inner {
  padding: 1.25rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  height: 100%;
}

/* ========== ICON STYLING ========== */
.icon-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.icon-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

/* .type-colorful .icon-circle {
  background: linear-gradient(135deg, rgba(0, 34, 27, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
} */

/* .type-bw .icon-circle {
  background: linear-gradient(135deg, rgba(67, 67, 67, 0.05) 0%, rgba(0, 0, 0, 0.08) 100%);
} */

.modern-card:hover .icon-circle {
  transform: scale(1.1) rotate(5deg);
}

.icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.icon-image {
  max-width: 85px;
  max-height: 85px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.modern-card:hover .icon-image {
  transform: scale(1.05);
}

/* ========== CARD CONTENT ========== */
.card-content {
  text-align: center;
  flex-grow: 1;
  width: 100%;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a202c;
  margin: 0 0 0.35rem 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card-description {
  font-size: 0.75rem;
  color: #718096;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2rem;
}

/* ========== BADGES ========== */
.card-footer-badges {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: auto;
}

.badge {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 3px;
  letter-spacing: 0.01em;
  transition: all 0.15s ease;
}

.badge-type {
  text-transform: uppercase;
  font-weight: 600;
}

.badge-type.type-colorful {
  background: #5a67d8;
  color: white;
}

.badge-type.type-bw {
  background: #4a5568;
  color: white;
}

.badge-category {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.modern-card:hover .badge-type {
  transform: scale(1.05);
}

/* ========== CATEGORY SECTIONS ========== */
.category-header {
  margin: 2rem 0 1rem;
  font-weight: 600;
  font-size: 1.25rem;
  color: #1a202c;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.cat-section .cat-grid {
  display: flex;
  flex-flow: row wrap;
  gap: 1.5rem;
  justify-content: center;
}

/* ========== CONTROLS & PROGRESS ========== */
#controlsRow {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.controls-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.search-container {
  flex: 1 1 300px;
  min-width: 250px;
  max-width: 400px;
}

.category-container {
  flex: 0 1 200px;
  min-width: 180px;
}

.mix-toggle-container {
  flex: 0 0 auto;
}

#loadProgress {
  height: 0.75rem;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
}

#loadProgress .progress-bar {
  background: #5a67d8;
}

#resultMeta {
  font-size: 0.9rem;
  font-weight: 500;
  color: #718096;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
  .icon-item {
    flex: 0 1 100%;
    max-width: 100%;
  }

  .card-inner {
    padding: 1.5rem 1rem 1rem;
  }

  .icon-circle {
    width: 100px;
    height: 100px;
  }

  .icon-image {
    max-width: 70px;
    max-height: 70px;
  }

  .controls-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container,
  .category-container {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
  }

  .btn-group-toggle {
    width: 100%;
    justify-content: center;
  }

  .mix-toggle-container {
    text-align: center;
  }

  .container h3 {
    font-size: 2rem;
  }
}

/* ========== HEADER STYLING ========== */
.container h3 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.container p {
  color: #718096;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.container p a {
  color: #4a5568;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.container p a:hover {
  color: #1a202c;
}

/* ========== SEARCH INPUT ========== */
#searchInput {
  border: 1px solid #d2d6dc;
  border-radius: 4px;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease;
  background: white;
  width: 100%;
  color: #1a202c;
  font-weight: 400;
}

#searchInput:focus {
  border-color: #9ca3af;
  outline: none;
}

#searchInput::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* ========== CATEGORY DROPDOWN ========== */
#categoryFilter {
  border: 1px solid #d2d6dc;
  border-radius: 4px;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease;
  background: white;
  cursor: pointer;
  font-weight: 400;
  color: #1a202c;
  width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%236b7280' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

#categoryFilter:focus {
  border-color: #9ca3af;
  outline: none;
}

#categoryFilter:hover {
  border-color: #9ca3af;
}

/* ========== TYPE FILTER BUTTONS ========== */
.btn-group-toggle {
  display: flex;
  gap: 0.375rem;
}

.btn-group-toggle .btn {
  border: 1px solid #d2d6dc;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  background: white;
  color: #4a5568;
  cursor: pointer;
}

.btn-group-toggle .btn:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.btn-group-toggle .btn.active {
  background: #5a67d8;
  border-color: #5a67d8;
  color: white;
}

/* ========== MIX MODE TOGGLE ========== */
.custom-control-label {
  font-weight: 500;
  font-size: 0.875rem;
  color: #4a5568;
  cursor: pointer;
  user-select: none;
  padding-left: 0.5rem;
}

.custom-control-input:checked~.custom-control-label::before {
  background: #5a67d8;
  border-color: #5a67d8;
}

.custom-control-input:focus~.custom-control-label::before {
  box-shadow: 0 0 0 2px rgba(90, 103, 216, 0.15);
}


/* ========== SPINNER ========== */
.spinner-border {
  color: #667eea;
}

/* ========== PROGRESS BAR ENHANCEMENT ========== */
#loadProgress {
  background: rgba(0, 0, 0, 0.05);
}

#loadProgress .progress-bar {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

#resultMeta {
  color: #718096;
}