/* Custom properties for theme colors */
:root {
  --bg-color: #080711;
  --bg-card: rgba(17, 18, 36, 0.75);
  --bg-card-hover: rgba(25, 27, 54, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  
  --primary-color-rgb: 139, 92, 246; /* default purple */
  --border-glow: rgba(var(--primary-color-rgb), 0.3);
  --primary-color: rgb(var(--primary-color-rgb));
  --primary-glow: rgba(var(--primary-color-rgb), 0.4);
  --secondary-theme-color: #6366f1; /* default indigo */
  
  --secondary-color: #3b82f6;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --favorite-color: #f43f5e;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --font-family-title: 'Outfit', sans-serif;
  --font-family-body: 'Inter', sans-serif;
  --transition-speed: 0.3s;
}

/* General Resets & Defaults */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}


body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family-body);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
}

/* Background Glow Effects */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
}

.bg-glow-1 {
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  top: -10vw;
  right: -10vw;
  transition: background var(--transition-speed);
}

.bg-glow-2 {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
  bottom: 10vh;
  left: -10vw;
}

/* Typography & Utility classes */
h1, h2, h3, h4 {
  font-family: var(--font-family-title);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-theme-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all var(--transition-speed);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(8, 7, 17, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(var(--primary-color-rgb), 0.3);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--primary-color-rgb), 0.6);
}

/* Glassmorphism Panel base */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-family: var(--font-family-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-theme-color) 100%);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px var(--primary-glow);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-glow {
  position: relative;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 12px;
  box-shadow: 0 0 20px var(--primary-glow);
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
  z-index: -1;
}

.btn-glow:hover::after {
  opacity: 1;
}

/* Header & Theme picker */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(8, 7, 17, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-family-title);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 1.4rem;
  color: var(--primary-color);
  text-shadow: 0 0 10px var(--primary-glow);
  transition: color var(--transition-speed);
}

/* Theme accent selector dots */
.theme-color-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  border-radius: 20px;
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.color-dot:hover {
  transform: scale(1.3);
}

.color-dot-purple { background-color: #8b5cf6; color: #8b5cf6; }
.color-dot-blue { background-color: #3b82f6; color: #3b82f6; }
.color-dot-green { background-color: #10b981; color: #10b981; }
.color-dot-orange { background-color: #f59e0b; color: #f59e0b; }

.color-dot.active {
  transform: scale(1.3);
  border-color: #fff;
}
.color-dot-purple.active { box-shadow: 0 0 8px #8b5cf6; }
.color-dot-blue.active { box-shadow: 0 0 8px #3b82f6; }
.color-dot-green.active { box-shadow: 0 0 8px #10b981; }
.color-dot-orange.active { box-shadow: 0 0 8px #f59e0b; }

.header-nav {
  display: flex;
  gap: 10px;
}

/* App Content Area */
.app-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 140px 20px; /* offset bottom for comparison bar */
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 50px;
}

.hero-text-wrapper {
  max-width: 800px;
  margin: 0 auto 30px auto;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 15px;
  animation: fadeInDown 0.8s ease;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Search Box */
.search-box-container {
  max-width: 700px;
  margin: 0 auto 25px auto;
}

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

.search-icon {
  position: absolute;
  left: 20px;
  color: var(--text-muted);
  font-size: 1.2rem;
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  padding: 18px 50px 18px 55px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-primary);
  font-family: var(--font-family-body);
  font-size: 1.05rem;
  transition: all var(--transition-speed) ease;
  backdrop-filter: blur(10px);
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 20px var(--primary-glow);
}

.clear-btn {
  position: absolute;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
}

.clear-btn:hover {
  color: var(--text-primary);
}

.fast-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.tags-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-right: 5px;
}

.fast-tag-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fast-tag-btn:hover {
  background: rgba(var(--primary-color-rgb), 0.1);
  border-color: var(--primary-color);
  color: var(--text-primary);
}

/* Collapsible Forms/Panels Container */
.expandables-container {
  max-width: 800px;
  margin: 30px auto 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.collapsible-panel {
  padding: 25px 30px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.panel-header h3 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.panel-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  transform: rotate(90deg);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.panel-intro {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* Forms Grid Setup */
.calc-form, .suggest-form {
  width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group input, .form-group select, .form-group textarea {
  background: rgba(8, 7, 17, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-family-body);
  font-size: 0.9rem;
  transition: border var(--transition-speed);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Dynamic Prompt Fields */
.prompt-fields-group {
  margin-top: 10px;
  animation: fadeIn 0.3s ease;
}

/* Workload Calculation Results Box */
.calc-result-box {
  margin-top: 25px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 20px;
  animation: fadeIn 0.4s ease;
}

.calc-res-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
  padding-bottom: 12px;
  margin-bottom: 15px;
}

.calc-res-header h4 {
  font-size: 1.15rem;
  color: var(--success-color);
}

.calc-total-cost {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.calc-cost-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--success-color);
  font-family: var(--font-family-title);
  line-height: 1;
}

.calc-cost-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.calc-res-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-res-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(8, 7, 17, 0.4);
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.calc-item-name {
  font-weight: 700;
}

.calc-item-cap {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Wizard CTA */
.wizard-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;
  margin: 40px auto 0 auto;
  padding: 25px 30px;
  text-align: left;
  gap: 20px;
}

.wizard-cta-box h3 {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.wizard-cta-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Interactive Wizard Section */
.wizard-section {
  max-width: 800px;
  margin: 0 auto 50px auto;
  padding: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.wizard-header h2 {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wizard-progress-bar {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 40px;
  border-radius: 10px;
}

.progress-line {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
  border-radius: 10px;
  transition: width 0.4s ease;
}

.steps-indicators {
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1e1b4b;
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.step-dot.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Wizard Steps */
.wizard-steps-container {
  min-height: 250px;
  margin-bottom: 30px;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.wizard-step h3 {
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

.wizard-option {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  font-family: var(--font-family-body);
}

.wizard-option:hover {
  background: rgba(var(--primary-color-rgb), 0.05);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.wizard-option.selected {
  background: rgba(var(--primary-color-rgb), 0.15);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.2);
}

.option-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.wizard-option.selected .option-icon {
  text-shadow: 0 0 10px var(--primary-glow);
}

.option-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 5px;
}

.option-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Wizard Footer */
.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.step-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Recommendation Result Card */
.recommendation-card {
  background: rgba(var(--primary-color-rgb), 0.08);
  border: 1px solid var(--border-glow);
  border-radius: 18px;
  padding: 25px;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  animation: scaleUp 0.4s ease;
}

.rec-title-wrap h4 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.rec-badge {
  background: var(--primary-color);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 8px;
}

.rec-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.rec-reason {
  font-size: 0.9rem;
  background: rgba(8, 7, 17, 0.4);
  padding: 10px 15px;
  border-radius: 10px;
  border-left: 3px solid var(--secondary-color);
  color: var(--text-primary);
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 15px;
}

.result-animation-box {
  text-align: center;
  margin-bottom: 15px;
}

.success-icon {
  font-size: 3rem;
  color: var(--success-color);
  margin-bottom: 10px;
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

/* Directory Section & Headers */
.directory-section {
  margin-top: 40px;
}

.section-header-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.section-header-title {
  display: flex;
  flex-direction: column;
}

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

.results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Gallery Controls */
.gallery-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 20px;
  border-radius: 14px;
}

.btn-control-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 10px;
  font-family: var(--font-family-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-control-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-control-toggle.active {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--favorite-color);
  color: var(--favorite-color);
}

.btn-control-toggle.active .icon-fav {
  font-weight: 900;
  color: var(--favorite-color);
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.control-select {
  background: rgba(8, 7, 17, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 6px 12px;
  font-family: var(--font-family-body);
  font-size: 0.85rem;
  cursor: pointer;
}

.control-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Platform / Device Filter Tabs styling */
.platform-tabs-container {
  margin-bottom: 15px;
}

.platform-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-tab {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 10px;
  font-family: var(--font-family-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  gap: 6px;
}

.platform-tab:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.platform-tab.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* Category Pills Bar */
.category-tabs-container {
  overflow-x: auto;
  margin-bottom: 25px;
  padding-bottom: 8px;
  scrollbar-width: none; /* Firefox */
}

.category-tabs-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-tabs-pills {
  display: flex;
  gap: 12px;
  white-space: nowrap;
}

.category-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 30px;
  font-family: var(--font-family-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-pill:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.category-pill.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.35);
}

/* Tools Grid & Cards */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px;
  transition: all var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  height: 100%;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 20px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}

.tool-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 20px;
  background: radial-gradient(
    280px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(var(--primary-color-rgb), 0.12),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

.tool-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  box-shadow: 0 12px 30px rgba(var(--primary-color-rgb), 0.15);
  border-color: rgba(var(--primary-color-rgb), 0.25);
}

.tool-card:hover::after {
  opacity: 1;
}

.card-top {
  margin-bottom: 20px;
  position: relative;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tool-icon-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(var(--primary-color-rgb), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.3rem;
  border: 1px solid var(--border-glow);
}

/* Glowing status dots inside tool-icon-wrapper */
.status-dot {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-color);
  z-index: 5;
}

.status-dot-online {
  background-color: var(--success-color);
  box-shadow: 0 0 8px var(--success-color);
  animation: pulse-glow 2s infinite;
}

.status-dot-busy {
  background-color: var(--warning-color);
  box-shadow: 0 0 8px var(--warning-color);
  animation: pulse-glow 2.5s infinite;
}

.status-dot-offline {
  background-color: var(--error-color);
  box-shadow: 0 0 6px var(--error-color);
}

@keyframes pulse-glow {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px currentColor; }
  100% { transform: scale(1); opacity: 0.8; }
}

.card-actions-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.favorite-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.favorite-btn:hover {
  background: rgba(244, 63, 94, 0.08);
  border-color: var(--favorite-color);
  color: var(--favorite-color);
}

.favorite-btn.active {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--favorite-color);
  color: var(--favorite-color);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
}

.compare-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.compare-checkbox-label:hover {
  background: rgba(var(--primary-color-rgb), 0.1);
  border-color: var(--primary-color);
}

.compare-checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--border-color);
  border-radius: 3.5px;
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

.compare-checkbox-label input[type="checkbox"]:checked {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 6px rgba(var(--primary-color-rgb), 0.5);
}

.compare-checkbox-label input[type="checkbox"]:checked::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.6rem;
  color: #fff;
  display: block;
}

.tool-title-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.tool-name-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.tool-badges-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.tool-name {
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s;
}

.tool-name:hover {
  color: var(--primary-color);
}

/* Trending fire badge */
.trend-badge {
  color: #f97316;
  font-size: 0.95rem;
  text-shadow: 0 0 8px rgba(249, 115, 22, 0.3);
  animation: fire-pulse 1.8s infinite;
}

@keyframes fire-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); text-shadow: 0 0 12px #f97316; }
  100% { transform: scale(1); }
}

.tool-badge {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.tool-rating-badge {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tool-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}

/* Free details list */
.free-details-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
}

.free-box-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--success-color);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.free-features-list {
  list-style: none;
}

.free-features-list li {
  font-size: 0.85rem;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.free-features-list li:last-child {
  margin-bottom: 0;
}

.free-features-list li i {
  color: var(--success-color);
  margin-top: 3px;
  font-size: 0.8rem;
}

.card-limitations {
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
  margin-bottom: 15px;
}

.card-limitations strong {
  color: var(--warning-color);
  font-weight: 600;
}

.card-bottom-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  width: 100%;
}

.card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.watermark-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.watermark-indicator span {
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
}

/* Card Platforms small icons row */
.card-platforms {
  display: flex;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.card-platforms i {
  transition: color 0.2s;
}

.card-platforms i.active {
  color: var(--text-secondary);
}

.card-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}

.card-actions .btn {
  flex: 1;
  padding: 10px 16px;
  justify-content: center;
}

/* Sliding Right Details Drawer Overlay */
.detail-drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(8, 7, 17, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: none; /* controlled by JS as flex/none */
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

/* Centered Card Popup Modal on Desktop */
.detail-drawer {
  position: relative;
  width: 650px;
  max-width: 95%;
  height: 680px;
  max-height: 85vh;
  background: var(--bg-card);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  display: flex;
  flex-direction: column;
}

.detail-drawer.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  padding: 30px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.drawer-title-wrap h2 {
  font-size: 1.8rem;
  margin-top: 6px;
}

.drawer-meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.drawer-rating-star {
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: rgba(8, 7, 17, 0.2);
}

.drawer-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  padding: 14px 10px;
  font-family: var(--font-family-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.drawer-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.drawer-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: rgba(var(--primary-color-rgb), 0.05);
}

.drawer-body {
  padding: 30px;
  overflow-y: auto;
  flex-grow: 1;
  overscroll-behavior: contain;
}

.drawer-tab-content {
  display: none;
}

.drawer-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.drawer-tab-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.drawer-bullet-list {
  list-style: none;
}

.drawer-bullet-list li {
  font-size: 0.95rem;
  margin-bottom: 15px;
  position: relative;
  padding-left: 25px;
}

.drawer-bullet-list li::before {
  content: '💡';
  position: absolute;
  left: 0;
  top: 0;
}

/* Prompt Card inside Drawer */
.drawer-prompts-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prompt-card {
  background: rgba(8, 7, 17, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
}

.prompt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.prompt-card-header h5 {
  font-size: 0.95rem;
  font-weight: 700;
}

.btn-copy-prompt {
  background: rgba(var(--primary-color-rgb), 0.15);
  border: 1px solid var(--border-glow);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

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

.prompt-text {
  font-family: var(--font-family-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Reviews List & Form */
.drawer-reviews-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.review-card {
  background: rgba(8, 7, 17, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  gap: 12px;
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.review-content {
  flex-grow: 1;
}

.review-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.review-user {
  font-weight: 600;
  font-size: 0.9rem;
}

.review-stars {
  color: #fbbf24;
  font-size: 0.75rem;
}

.review-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.add-review-section {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.add-review-section h4 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.review-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Sticky Comparison Bar */
.comparison-bar-wrapper {
  position: fixed;
  bottom: 25px;
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  transform: translateY(150px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.comparison-bar-wrapper.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.comparison-bar {
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 1px 1px var(--primary-glow);
  border-color: var(--primary-color);
  gap: 20px;
}

.comparison-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.comp-count-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 0 10px var(--primary-glow);
}

.comp-text strong {
  display: block;
  font-size: 0.95rem;
}

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

.comparison-thumbs {
  display: flex;
  gap: 8px;
  flex-grow: 1;
  justify-content: center;
  overflow-x: auto;
}

.comp-thumb-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comp-thumb-pill button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
}

.comp-thumb-pill button:hover {
  color: var(--error-color);
}

.comparison-actions {
  display: flex;
  gap: 10px;
}

/* Fullscreen Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(8, 7, 17, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal-container {
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header h2 {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-body {
  padding: 25px;
  overflow-y: auto;
}

.modal-footer {
  padding: 15px 25px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

/* Comparison Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.comparison-table th, .comparison-table td {
  padding: 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.comparison-table th {
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-family-title);
  font-size: 1rem;
  font-weight: 700;
}

.comparison-table th:first-child {
  width: 180px;
  color: var(--text-secondary);
}

.comparison-table tr:last-child th, .comparison-table tr:last-child td {
  border-bottom: none;
}

.comp-col-header {
  min-width: 220px;
}

.comp-col-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.comp-col-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--secondary-color);
  font-weight: 600;
}

.comparison-table td ul {
  padding-left: 15px;
}

.comparison-table td li {
  margin-bottom: 6px;
}

.comparison-table td li:last-child {
  margin-bottom: 0;
}

/* Footer */
.app-footer {
  margin-top: 80px;
  padding: 40px 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(8, 7, 17, 0.9);
  text-align: center;
}

.footer-logo {
  font-family: var(--font-family-title);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.footer-logo i {
  color: var(--primary-color);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Keyframes Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

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

/* Responsive CSS */
@media (max-width: 900px) {
  .hero-title {
    font-size: 2.3rem;
  }
  .wizard-cta-box {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .comparison-bar {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  .comparison-thumbs {
    width: 100%;
    justify-content: flex-start;
  }
  .comparison-actions {
    width: 100%;
    justify-content: space-between;
  }
  .comparison-actions .btn {
    flex-grow: 1;
  }
  .section-header-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .gallery-controls {
    justify-content: space-between;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .app-content {
    padding: 20px 15px 160px 15px;
  }
  .search-input-wrapper input {
    padding: 15px 40px 15px 45px;
    font-size: 0.95rem;
  }
  .search-icon {
    left: 15px;
  }
  .fast-tags {
    display: none;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .recommendation-card {
    grid-template-columns: 1fr;
  }
  .options-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .header-container {
    flex-direction: column;
    gap: 12px;
  }
  .header-nav {
    width: 100%;
    justify-content: space-between;
  }
  .header-nav .btn {
    padding: 8px 12px;
    font-size: 0.8rem;
    flex-grow: 1;
  }
}

/* Upgraded Prompt Builder Styles */
.style-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.preset-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.preset-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.preset-card.active {
  background: rgba(var(--primary-color-rgb), 0.1);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.25);
}

.preset-icon {
  font-size: 1.6rem;
}

.preset-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Aspect Ratio Row */
.aspect-ratios-row {
  display: flex;
  gap: 10px;
}

.aspect-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.aspect-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

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

.ratio-box {
  display: inline-block;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  background: transparent;
}

.ratio-1-1 {
  width: 12px;
  height: 12px;
}

.ratio-16-9 {
  width: 18px;
  height: 10px;
}

.ratio-9-16 {
  width: 10px;
  height: 18px;
}

/* Negatives / Advanced checkboxes */
.negatives-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 8px;
}

.negative-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 20px;
  transition: all 0.2s;
}

.negative-checkbox-label:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.negative-checkbox-label input[type="checkbox"] {
  accent-color: var(--primary-color);
  cursor: pointer;
  width: 14px;
  height: 14px;
}

/* Before / After Tabs */
.prompt-tabs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.prompt-tab-buttons {
  display: flex;
  gap: 8px;
}

.prompt-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prompt-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
}

.prompt-tab-btn.active {
  color: var(--primary-color);
  background: rgba(var(--primary-color-rgb), 0.1);
}

/* AI loading overlay */
.ai-loading-container {
  background: rgba(8, 7, 17, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  animation: fadeIn 0.2s ease;
}

.ai-loading-box {
  text-align: center;
  padding: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  max-width: 320px;
}

.ai-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(var(--primary-color-rgb), 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.ai-loading-title {
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
}

.ai-loading-step-text {
  color: var(--text-secondary);
  font-size: 0.8rem;
  min-height: 20px;
}

.text-glow-pulse {
  transition: box-shadow 0.3s, border-color 0.3s;
}

.text-glow-pulse.copied-success {
  border-color: #10b981 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Advanced Search Filters Styles */
.filter-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}

.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s, transform 0.2s;
  padding: 6px 0;
}

.filter-checkbox-label:hover {
  color: var(--text-primary);
  transform: translateX(2px);
}

.filter-checkbox-label input[type="checkbox"] {
  accent-color: var(--primary-color);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Interactive Star Rating Selector */
.interactive-stars-rating {
  display: flex;
  gap: 8px;
}

.interactive-stars-rating .star-btn {
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.15s, color 0.15s, text-shadow 0.15s;
}

.interactive-stars-rating .star-btn:hover {
  transform: scale(1.2);
}

.interactive-stars-rating .star-btn.active {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

/* Comparison Column Remove Button */
.comp-col-header {
  position: relative;
  padding-top: 25px !important;
}

.comp-col-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.2s;
}

.comp-col-remove-btn:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

/* Floating Controls & Chatbot Widget Styles */
.floating-btn:hover {
  transform: scale(1.08);
}

.btn-back-to-top:hover {
  background: var(--primary-color) !important;
  color: #fff !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.4) !important;
}

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

/* Chat Messages Bubble Styles */
.chat-msg {
  animation: messageSlideIn 0.3s ease;
}

.user-msg {
  align-self: flex-end;
  display: flex;
  justify-content: flex-end;
  max-width: 85%;
}

.user-msg-bubble {
  background: var(--primary-color);
  color: #fff;
  border-radius: 16px 0 16px 16px;
  padding: 12px 16px;
  font-size: 0.85rem;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.2);
}

.chat-recommendation-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(var(--primary-color-rgb), 0.12);
  border: 1px solid rgba(var(--primary-color-rgb), 0.3);
  color: var(--primary-color);
  font-weight: 600;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  margin: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-recommendation-badge:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(var(--primary-color-rgb), 0.3);
}

.quick-suggest-btn:hover {
  background: rgba(var(--primary-color-rgb), 0.1) !important;
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

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

/* Scrollbar styling for chatbot panel */
.chat-messages::-webkit-scrollbar {
  width: 5px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25);
}

/* Mobile Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 65px;
  background: rgba(13, 11, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1001;
  justify-content: space-around;
  align-items: center;
  padding: 5px 10px;
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.5);
}

.mobile-nav-item {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.mobile-nav-item i {
  font-size: 1.3rem;
}

.mobile-nav-item:hover, .mobile-nav-item.active {
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.4);
}

/* Comprehensive Media Query for Mobile screens (<= 768px) */
@media (max-width: 768px) {
  /* Prevent automatic iOS input zoom */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Compact spacing for Mobile Hero Section */
  .hero-section {
    padding: 70px 15px 25px 15px !important;
    text-align: center;
  }

  .hero-title {
    font-size: 1.75rem !important;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 0.9rem !important;
    margin-bottom: 20px;
  }

  .search-container {
    max-width: 100% !important;
  }

  .section-title {
    font-size: 1.4rem !important;
  }

  /* Tool Card padding & description adjustments */
  .tool-card {
    padding: 16px !important;
  }

  .tool-card .tool-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.95em;
    font-size: 0.82rem;
  }

  /* Detail Drawer becomes Bottom Sheet */
  .detail-drawer {
    position: fixed !important;
    width: 100% !important;
    height: 82vh !important;
    max-height: 82vh !important;
    top: auto !important;
    bottom: -82vh !important;
    right: 0 !important;
    left: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    border-left: none !important;
    border-top: 1px solid var(--border-color) !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5) !important;
  }

  .detail-drawer.open {
    bottom: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Drag indicator/handle for Bottom Sheet drawer */
  .detail-drawer::before {
    content: "";
    display: block;
    width: 45px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin: 8px auto 0 auto;
    flex-shrink: 0;
  }

  /* Mobile Bottom Navigation Bar activation */
  .mobile-bottom-nav {
    display: flex !important;
  }

  body {
    padding-bottom: 75px !important; /* space for bottom nav bar */
  }

  /* Shift floating action buttons above bottom nav bar */
  .floating-controls-container {
    bottom: 80px !important;
    right: 20px !important;
  }

  /* Mobile Chatbot Fullscreen Experience */
  .chatbot-panel {
    bottom: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    z-index: 1002 !important; /* sits on top of everything else */
    animation: slideUpFade 0.25s ease-out !important;
  }

  /* Adjust comparison bar on mobile */
  .comparison-bar {
    bottom: 75px !important;
    width: calc(100% - 30px) !important;
    left: 15px !important;
    transform: none !important;
    border-radius: 12px !important;
  }

  /* Horizontal scrolling for top header nav buttons on mobile */
  .header-nav {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    width: 100% !important;
    padding: 5px 0 !important;
    gap: 8px !important;
    scrollbar-width: none !important;
    justify-content: flex-start !important;
  }
  .header-nav::-webkit-scrollbar {
    display: none !important;
  }
  .header-nav .btn {
    flex-shrink: 0 !important;
  }

  /* Compact padding for panels on mobile to prevent horizontal overflow */
  .wizard-section {
    padding: 15px !important;
  }
  .wizard-progress-bar {
    margin-bottom: 25px !important;
  }
  .recommendation-card {
    padding: 15px !important;
  }
  .collapsible-panel {
    padding: 15px !important;
  }

  /* Hide scrollbars for comparison thumbs */
  .comparison-thumbs {
    scrollbar-width: none !important;
  }
  .comparison-thumbs::-webkit-scrollbar {
    display: none !important;
  }

  /* Make device/platform filter tabs scrollable on mobile instead of wrapping */
  .platform-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    width: 100% !important;
    padding-bottom: 6px !important;
    justify-content: flex-start !important;
  }
  .platform-tabs::-webkit-scrollbar {
    display: none !important;
  }
  .platform-tab {
    flex-shrink: 0 !important;
  }

  /* Reduce wizard headers size on mobile */
  .wizard-header h2 {
    font-size: 1.2rem !important;
  }

  /* Comparison modal adjustments on mobile */
  .modal-overlay {
    padding: 10px !important;
  }
  .modal-container {
    max-height: 95vh !important;
  }
  .modal-header {
    padding: 15px !important;
  }
  .modal-header h2 {
    font-size: 1.15rem !important;
  }
  .modal-body {
    padding: 15px !important;
  }
  .comparison-table th, .comparison-table td {
    padding: 10px !important;
    font-size: 0.8rem !important;
  }

  /* Prompt builder adjustments on mobile to prevent overflow */
  .style-presets-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
  }
  .aspect-ratios-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .prompt-tabs-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  /* Hide top budget calculator button on mobile since it is present in the bottom sticky bar */
  #btn-open-calc {
    display: none !important;
  }

  /* Add padding bottom to drawer-body on mobile so contents scroll above the bottom nav bar */
  .drawer-body {
    padding: 20px 20px 90px 20px !important;
  }

  /* Single-column form grid & CTA box vertical stack on small mobile screens */
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  .form-group[style*="span 2"] {
    grid-column: span 1 !important;
  }
  .wizard-cta-box {
    flex-direction: column !important;
    text-align: center !important;
  }
  .options-grid {
    grid-template-columns: 1fr !important;
  }
  .btn, .mobile-nav-item, .fast-tag-btn, .aspect-btn {
    min-height: 44px;
  }
}

/* Card Filter Animation */
.tool-card {
  animation: cardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Minimalist Floating Logo Container (No Container Box) */
.tool-logo-container {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: all 0.3s ease;
}

.tool-logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
}

/* Hover dynamic colored glow interaction for the floating brand logo */
.tool-card:hover .tool-logo-container img {
  transform: scale(1.15);
  filter: drop-shadow(0 6px 12px rgba(var(--primary-color-rgb), 0.5));
}

.tool-logo-fallback {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-color);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Pricing Badges */
.pricing-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing-free {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
}

.pricing-freemium {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #f59e0b;
}

.pricing-paid {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

/* Empty Search Results State */
.empty-state-box {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  margin: 20px 0;
  animation: cardFadeIn 0.3s ease-out;
}

.empty-state-icon {
  font-size: 3.5rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.04);
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 340px;
  line-height: 1.5;
}

/* Drawer / Bottom-Sheet Tabbed Layout */
.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  padding: 0 5px;
}

.drawer-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 14px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.drawer-tab:hover {
  color: var(--text-primary);
}

.drawer-tab.active {
  color: var(--primary-color);
}

.drawer-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-color);
}

.drawer-tab-content {
  display: none;
  animation: tabFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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


