/**
 * =========================================================
 * Theme Settings UI Styles
 * Styling for the theme selection component
 * =========================================================
 */

/* Theme Settings Panel */
.theme-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Section */
.theme-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.theme-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: var(--font-heading-weight, 600);
  color: var(--color-text);
  margin: 0;
}

.theme-section-title .icon {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
}

.theme-section-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Filter Bar */
.theme-filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.theme-filter-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all var(--motion-fast) var(--motion-easing);
}

.theme-filter-btn:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.theme-filter-btn.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

/* Theme Grid - Compact */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
}

/* Theme Card - Shows Theme Color */
.theme-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.theme-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.theme-card.active {
  border-color: var(--color-primary);
  border-width: 2px;
  box-shadow: 0 0 8px rgba(var(--color-primary-rgb), 0.3);
}

.theme-card:focus-visible {
  outline: none;
  box-shadow: var(--color-focus-ring);
}

/* Theme Preview - Shows accent color bar */
.theme-preview {
  position: relative;
  width: 100%;
  height: 28px;
  border-radius: 4px;
  overflow: hidden;
}

.theme-preview-accent {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  height: 4px;
  border-radius: 2px;
}

/* Theme Name - Compact */
.theme-name {
  font-size: 0.6rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

/* Theme Badge - Compact */
.theme-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.6rem;
  line-height: 1;
}

/* Theme Check */
.theme-check {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: white;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

/* Option Row */
.theme-option-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Option Card - Glass Effect */
.theme-option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  background: rgba(var(--color-surface-rgb, 30, 35, 45), 0.5);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: all var(--motion-normal) var(--motion-easing);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.theme-option-card:hover {
  background: rgba(var(--color-surface-rgb, 30, 35, 45), 0.65);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.theme-option-card.active {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.12);
  box-shadow:
    0 0 16px rgba(var(--color-primary-rgb), 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.theme-option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-option-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.theme-option-icon svg {
  width: 28px;
  height: 28px;
}

.font-sample {
  font-size: 1.5rem;
  font-weight: 600;
}

.font-preview-system .font-sample {
  font-family: system-ui, sans-serif;
}

.font-preview-modern .font-sample {
  font-family: 'Inter', sans-serif;
}

.font-preview-serif .font-sample {
  font-family: 'Source Serif 4', Georgia, serif;
}

.font-preview-display-poppins .font-sample {
  font-family: 'Poppins', sans-serif;
}

.font-preview-classic-georgia .font-sample {
  font-family: Georgia, serif;
}

.font-preview-luxury-playfair .font-sample {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
}

.font-preview-mono-code .font-sample {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
}

.font-preview-tech-space .font-sample {
  font-family: 'Space Grotesk', sans-serif;
}

.font-preview-rounded .font-sample {
  font-family: 'Nunito', sans-serif;
}

.font-preview-condensed .font-sample {
  font-family: 'Roboto Condensed', sans-serif;
}

.font-preview-humanist .font-sample {
  font-family: 'Lato', sans-serif;
}

.font-preview-editorial .font-sample {
  font-family: 'DM Serif Display', Georgia, serif;
}

.theme-option-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.theme-option-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Level Slider Row */
.theme-slider-row {
  display: flex;
  gap: 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 0.25rem;
}

.theme-level-option {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all var(--motion-fast) var(--motion-easing);
}

.theme-level-option:hover {
  color: var(--color-text);
  background: var(--color-hover-bg);
}

.theme-level-option.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.theme-level-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-level-name {
  pointer-events: none;
}

/* Theme Actions */
.theme-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.theme-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all var(--motion-normal) var(--motion-easing);
}

.theme-actions .btn .icon {
  width: 18px;
  height: 18px;
}

.theme-actions .btn-outline {
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
}

.theme-actions .btn-outline:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.theme-actions .btn-primary {
  color: white;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.theme-actions .btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

/* Responsive */
@media (max-width: 768px) {
  .theme-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .theme-card {
    padding: 0.75rem;
  }

  .theme-preview {
    height: 45px;
  }

  .theme-name {
    font-size: 0.7rem;
  }

  .theme-option-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .theme-option-card {
    padding: 1rem 0.5rem;
  }

  .theme-option-desc {
    display: none;
  }

  .theme-slider-row {
    flex-wrap: wrap;
  }

  .theme-level-option {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .theme-actions {
    flex-direction: column;
  }

  .theme-actions .btn {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .theme-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .theme-option-row {
    grid-template-columns: 1fr;
  }

  .theme-option-card {
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
    padding: 1rem;
  }

  .theme-option-desc {
    display: block;
    text-align: left;
  }
}

/* =========================================================
 * NEW v2.0 - Tabs Navigation
 * ========================================================= */

.theme-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  margin-bottom: 1.5rem;
}

.theme-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all var(--motion-fast) var(--motion-easing);
}

.theme-tab:hover {
  color: var(--color-text);
  background: var(--color-hover-bg);
}

.theme-tab.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.theme-tab .icon {
  font-size: 1rem;
}

/* Tab Content */
.theme-tab-content {
  display: none;
  animation: fadeIn var(--motion-normal) var(--motion-easing);
}

.theme-tab-content.active {
  display: block;
}

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

/* =========================================================
 * NEW v2.0 - Category Filter Pills
 * ========================================================= */

.theme-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.theme-category-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--motion-fast) var(--motion-easing);
}

.theme-category-btn:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.theme-category-btn.active {
  color: white;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* Category-specific colors */
.theme-category-btn[data-category="enterprise"].active {
  background: #475569;
  border-color: #475569;
}

.theme-category-btn[data-category="luxury"].active {
  background: #a855f7;
  border-color: #a855f7;
}

.theme-category-btn[data-category="nature"].active {
  background: #22c55e;
  border-color: #22c55e;
}

.theme-category-btn[data-category="tech"].active {
  background: #0ea5e9;
  border-color: #0ea5e9;
}

.theme-category-btn[data-category="minimal"].active {
  background: #6b7280;
  border-color: #6b7280;
}

.theme-category-btn[data-category="vibrant"].active {
  background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  border-color: transparent;
}

/* =========================================================
 * NEW v2.0 - Mode Filter (Light/Dark)
 * ========================================================= */

.theme-mode-filter {
  display: flex;
  gap: 0.5rem;
}

.theme-mode-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all var(--motion-fast) var(--motion-easing);
}

.theme-mode-btn:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.theme-mode-btn.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.theme-mode-btn[data-mode="light"].active {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border-color: #fbbf24;
}

.theme-mode-btn[data-mode="dark"].active {
  color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
  border-color: #6366f1;
}

/* =========================================================
 * NEW v2.0 - Enhanced Theme Grid
 * ========================================================= */

.theme-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

/* =========================================================
 * NEW v2.0 - Premium Badge
 * ========================================================= */

.premium-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fbbf24;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-full);
}

/* =========================================================
 * NEW v2.0 - Animation Preview Grid
 * ========================================================= */

.animation-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.animation-preview-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: all var(--motion-fast) var(--motion-easing);
}

.animation-preview-btn:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
}

.animation-preview-btn.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.animation-preview-btn .icon {
  font-size: 1.25rem;
}

/* =========================================================
 * NEW v2.0 - Animation Keyframes
 * ========================================================= */

.animate-fade {
  animation: animFade 0.4s ease-out;
}

.animate-slide-up {
  animation: animSlideUp 0.4s ease-out;
}

.animate-scale {
  animation: animScale 0.4s ease-out;
}

.animate-flip {
  animation: animFlip 0.6s ease-out;
}

.animate-bounce {
  animation: animBounce 0.6s ease-out;
}

.animate-shake {
  animation: animShake 0.5s ease-out;
}

.animate-pulse {
  animation: animPulse 0.5s ease-out;
}

.animate-glow {
  animation: animGlow 0.5s ease-out;
}

@keyframes animFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes animScale {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes animFlip {
  from { opacity: 0; transform: perspective(400px) rotateX(90deg); }
  to { opacity: 1; transform: perspective(400px) rotateX(0); }
}

@keyframes animBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.15); }
  50% { transform: scale(0.95); }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes animShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes animPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

@keyframes animGlow {
  0% { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), 0.4); }
  50% { box-shadow: 0 0 20px 10px rgba(var(--color-primary-rgb), 0.2); }
  100% { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), 0); }
}

/* =========================================================
 * NEW v2.0 - Empty State
 * ========================================================= */

.theme-empty-message {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--color-text-muted);
}

.theme-empty-message .empty-icon {
  font-size: 2.5rem;
  opacity: 0.6;
}

.theme-empty-message p {
  margin: 0;
  font-size: 0.9375rem;
}

.theme-empty-message .btn-reset-filters {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all var(--motion-fast) var(--motion-easing);
}

.theme-empty-message .btn-reset-filters:hover {
  background: var(--color-primary);
  color: white;
}

/* =========================================================
 * NEW v2.0 - Icon Pack Preview
 * ========================================================= */

.icon-pack-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  transition: transform var(--motion-fast) var(--motion-easing);
}

.icon-pack-preview svg {
  width: 32px;
  height: 32px;
}

.icon-pack-preview.preview-active {
  animation: iconPreviewPop 0.4s ease-out;
}

@keyframes iconPreviewPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* =========================================================
 * NEW v2.0 - Theme Card Enhancements
 * ========================================================= */

.theme-card[data-mode="dark"] {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.theme-card[data-mode="light"] {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.theme-card .theme-group-tag {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  opacity: 0.7;
}

/* =========================================================
 * SIMPLIFIED THEME SETTINGS - Single Page Layout
 * ========================================================= */

.theme-settings-simple {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem;
}

.theme-settings-simple .theme-section {
  gap: 0.5rem;
}

.theme-settings-simple .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.theme-settings-simple .section-header h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

/* Theme Mode Filter - Compact */
.theme-settings-simple .theme-mode-filter {
  display: flex;
  gap: 0.25rem;
}

.theme-settings-simple .mode-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-settings-simple .mode-btn:hover {
  border-color: var(--color-primary);
}

.theme-settings-simple .mode-btn.active {
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.1);
  border-color: var(--color-primary);
}

/* Compact Category Filter - Smaller with Colored Icons */
.theme-category-filter.compact {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.theme-category-filter.compact .theme-category-btn {
  padding: 0.2rem 0.4rem;
  font-size: 0.6rem;
  gap: 0.2rem;
  border-radius: 12px;
  background: rgba(var(--color-surface-rgb), 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
}

.theme-category-filter.compact .theme-category-btn .cat-icon {
  width: 14px;
  height: 14px;
}

.theme-category-filter.compact .theme-category-btn .cat-name {
  display: inline;
  font-weight: 500;
  font-size: 0.55rem;
}

.theme-category-filter.compact .theme-category-btn.active {
  background: rgba(var(--color-primary-rgb), 0.15);
  border-color: var(--color-primary);
}

/* Compact Theme Grid - Medium Cards */
.theme-grid.compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 0.35rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.theme-grid.compact::-webkit-scrollbar {
  width: 4px;
}

.theme-grid.compact::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

/* Compact Theme Card */
.theme-grid.compact .theme-card {
  padding: 0.35rem;
  gap: 0.25rem;
}

.theme-grid.compact .theme-preview {
  height: 26px;
  border-radius: 4px;
}

.theme-grid.compact .theme-name {
  font-size: 0.55rem;
  font-weight: 500;
}

.theme-grid.compact .theme-check {
  width: 12px;
  height: 12px;
  font-size: 0.55rem;
  top: 3px;
  left: 3px;
}

/* Quick Settings Row */
.quick-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0.5rem;
  background: rgba(var(--color-surface-rgb), 0.3);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.quick-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.quick-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-options {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

/* Compact Option */
.compact-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem;
  background: rgba(var(--color-surface-rgb), 0.5);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 36px;
}

.compact-option:hover {
  background: rgba(var(--color-surface-rgb), 0.8);
  border-color: var(--color-border);
}

.compact-option.active {
  background: rgba(var(--color-primary-rgb), 0.15);
  border-color: var(--color-primary);
}

.compact-option input {
  display: none;
}

.compact-icon {
  width: 16px;
  height: 16px;
}

.compact-icon svg {
  width: 100%;
  height: 100%;
}

.compact-font {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
}

.compact-name {
  font-size: 0.5rem;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Level Row */
.level-row {
  display: flex;
  gap: 0.25rem;
}

.level-btn {
  padding: 0.25rem 0.4rem;
  font-size: 0.6rem;
  color: var(--color-text-muted);
  background: rgba(var(--color-surface-rgb), 0.5);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.level-btn:hover {
  background: rgba(var(--color-surface-rgb), 0.8);
}

.level-btn.active {
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.15);
  border-color: var(--color-primary);
}

.level-btn input {
  display: none;
}

/* Compact Actions */
.theme-actions.compact {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}

.btn-reset,
.btn-save {
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset {
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
}

.btn-reset:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

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

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

/* Responsive for Simple Layout */
@media (max-width: 480px) {
  .quick-settings {
    grid-template-columns: 1fr;
  }

  .theme-grid.compact {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }
}

/* =========================================================
 * Responsive Adjustments
 * ========================================================= */

@media (max-width: 768px) {
  .theme-tabs {
    flex-wrap: wrap;
  }

  .theme-tab {
    flex: 1 1 45%;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
  }

  .theme-category-filter {
    gap: 0.375rem;
  }

  .theme-category-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .theme-tabs {
    flex-direction: column;
  }

  .theme-tab {
    flex: 1 1 100%;
  }

  .theme-option-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================
 * Icon Packs Section - Large & Visible
 * ========================================================= */

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

.section-count {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  background: rgba(var(--color-primary-rgb), 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

/* Icon Grid - Scrollable with many items */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.5rem;
  background: rgba(var(--color-surface-rgb), 0.3);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

/* Custom scrollbar for icon grid */
.icon-grid::-webkit-scrollbar {
  width: 6px;
}

.icon-grid::-webkit-scrollbar-track {
  background: rgba(var(--color-surface-rgb), 0.3);
  border-radius: 3px;
}

.icon-grid::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

.icon-grid::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-hover);
}

/* Individual Icon Option Card */
.icon-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.25rem;
  background: rgba(var(--color-bg-rgb), 0.8);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.icon-option:hover {
  background: rgba(var(--color-primary-rgb), 0.1);
  border-color: rgba(var(--color-primary-rgb), 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.icon-option.active {
  background: rgba(var(--color-primary-rgb), 0.15);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.2);
}

.icon-option input {
  display: none;
}

/* Icon Preview - Large & Visible */
.icon-preview {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.icon-preview svg {
  width: 100%;
  height: 100%;
}

.icon-name {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--color-text-muted);
  max-width: 65px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.icon-option.active .icon-name {
  color: var(--color-primary);
  font-weight: 600;
}

/* =========================================================
 * Settings Row - Fonts, Effects, Motion
 * ========================================================= */

.settings-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.settings-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-col .section-header {
  margin-bottom: 0.25rem;
}

.settings-col .section-header h4 {
  font-size: 0.75rem;
  margin: 0;
}

/* Font Grid */
.font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
  gap: 0.35rem;
  max-height: 150px;
  overflow-y: auto;
  padding: 0.35rem;
  background: rgba(var(--color-surface-rgb), 0.3);
  border-radius: 6px;
}

.font-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.2rem;
  background: rgba(var(--color-bg-rgb), 0.8);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.font-option:hover {
  border-color: var(--color-border);
  background: rgba(var(--color-primary-rgb), 0.05);
}

.font-option.active {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.1);
}

.font-option input {
  display: none;
}

.font-preview {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1;
}

.font-name {
  font-size: 0.5rem;
  color: var(--color-text-muted);
  max-width: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Effects & Motion Grid */
.effects-grid,
.motion-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.35rem;
  background: rgba(var(--color-surface-rgb), 0.3);
  border-radius: 6px;
}

.effect-btn,
.motion-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.4rem;
  background: rgba(var(--color-bg-rgb), 0.8);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 42px;
}

.effect-btn:hover,
.motion-btn:hover {
  border-color: var(--color-border);
  background: rgba(var(--color-primary-rgb), 0.05);
}

.effect-btn.active,
.motion-btn.active {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.15);
}

.effect-btn input,
.motion-btn input {
  display: none;
}

.effect-icon,
.motion-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.effect-label,
.motion-label {
  font-size: 0.5rem;
  color: var(--color-text-muted);
  text-transform: capitalize;
}

.effect-btn.active .effect-label,
.motion-btn.active .motion-label {
  color: var(--color-primary);
  font-weight: 600;
}

/* Responsive for Settings Row */
@media (max-width: 600px) {
  .settings-row {
    grid-template-columns: 1fr;
  }

  .icon-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    max-height: 180px;
  }
}

