*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy-900: #0a0f1a;
  --navy-800: #111827;
  --navy-700: #1a2332;
  --eco-400: #34d399;
  --eco-500: #10b981;
  --eco-600: #059669;
  --teal-400: #22d3ee;
  --teal-500: #06b6d4;
  --warn-400: #fbbf24;
  --warn-500: #f59e0b;
  --danger-400: #f87171;
  --danger-500: #ef4444;
  --pink-400: #f472b6;
  --purple-400: #8b5cf6;
}

body {
  background: var(--navy-900);
  color: #fff;
  font-family: 'Bricolage Grotesque', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==================== LAYOUT ==================== */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 1.5rem 1rem;
  max-width: 1024px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 640px) {
  .main-content {
    padding: 2rem 1.5rem;
  }
}

/* ==================== GLASSMORPHISM ==================== */
.glass {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.glass-strong {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
}

/* ==================== HEADER ==================== */
.app-header {
  position: relative;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.header-inner {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.header-title .eco { color: var(--eco-400); }
.header-title .white { color: #fff; }

.header-tagline {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
  font-family: 'JetBrains Mono', monospace;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scan-counter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 999px;
}

.scan-counter .count {
  color: var(--eco-400);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.scan-counter .label {
  color: rgba(255, 255, 255, 0.4);
}

.history-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.history-btn:hover, .history-btn.active {
  background: rgba(255, 255, 255, 0.1);
}

/* Scan line */
@keyframes scanLine {
  0% { transform: translateX(-100%); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--eco-500), var(--teal-500), transparent);
  animation: scanLine 3s ease-in-out infinite;
  z-index: 1;
}

/* ==================== SCANNER VIEW ==================== */
.scanner-frame {
  position: relative;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .scanner-frame {
    padding: 2rem;
  }
}

.scanner-label {
  text-align: center;
  margin-bottom: 1.5rem;
}

.scanner-label-title {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.scanner-label-sub {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

/* Corner brackets */
@keyframes cornerPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.corner-bracket {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--eco-500);
  animation: cornerPulse 2s ease-in-out infinite;
  pointer-events: none;
}

.corner-tl { top: 0; left: 0; border-top: 2px solid; border-left: 2px solid; border-radius: 4px 0 0 0; }
.corner-tr { top: 0; right: 0; border-top: 2px solid; border-right: 2px solid; border-radius: 0 4px 0 0; }
.corner-bl { bottom: 0; left: 0; border-bottom: 2px solid; border-left: 2px solid; border-radius: 0 0 0 4px; }
.corner-br { bottom: 0; right: 0; border-bottom: 2px solid; border-right: 2px solid; border-radius: 0 0 4px 0; }

/* Search input */
.search-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.3s;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.search-input:focus {
  border-color: rgba(16, 185, 129, 0.6);
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.3), 0 0 20px rgba(16, 185, 129, 0.1); }
  50% { box-shadow: 0 0 16px rgba(16, 185, 129, 0.6), 0 0 40px rgba(16, 185, 129, 0.2); }
}

.search-input {
  animation: pulseGlow 2s ease-in-out infinite;
  padding-right: 7.5rem;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(52, 211, 153, 0.6);
  font-size: 1rem;
  pointer-events: none;
}

/* AI Search Button */
.ai-search-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.375rem 0.875rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.3));
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  min-height: 32px;
  z-index: 2;
  white-space: nowrap;
}

.ai-search-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(6, 182, 212, 0.5));
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
}

.ai-search-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.ai-search-btn.loading {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
}

.ai-btn-loading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  letter-spacing: 2px;
}

/* AI Loading Bar */
@keyframes aiShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.ai-loading-bar {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.05), rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.05));
  background-size: 200% 100%;
  animation: aiShimmer 2s linear infinite;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.ai-loading-text {
  color: rgba(196, 181, 253, 0.8);
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
}

.ai-error-msg {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger-400);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
}

.ai-warn-msg {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--warn-400);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
}

.ai-warn-msg {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--warn-400);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
}

/* AI Scan Card */
.ai-scan-card {
  width: 100%;
  display: block;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  cursor: pointer;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(6, 182, 212, 0.08));
  color: #fff;
  text-align: left;
  transition: all 0.3s;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.ai-scan-card:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.15));
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.2), 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.ai-scan-card:disabled {
  opacity: 0.5;
  cursor: wait;
}

.ai-scan-card-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-scan-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.ai-scan-text {
  flex: 1;
  min-width: 0;
}

.ai-scan-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #c4b5fd;
  margin-bottom: 0.125rem;
}

.ai-scan-sub {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-scan-arrow {
  font-size: 1.25rem;
  color: rgba(139, 92, 246, 0.6);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.ai-scan-card:hover .ai-scan-arrow {
  transform: translateX(4px);
  color: rgba(196, 181, 253, 0.8);
}

/* AI Generated Badge */
.ai-generated-badge {
  display: inline-block;
  margin-top: 0.375rem;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  font-size: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

/* Barcode */
.barcode {
  display: flex;
  gap: 1px;
  align-items: flex-end;
  justify-content: center;
  height: 20px;
  opacity: 0.15;
  margin-bottom: 1rem;
}

.barcode-line {
  background: var(--eco-500);
}

/* Category filters */
.cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.cat-filter-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.5);
  min-height: 36px;
}

.cat-filter-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
}

.cat-filter-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--eco-400);
}

.cat-filter-btn.clear {
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger-400);
}

.cat-filter-btn.clear:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Category cards */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.category-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: none;
  color: #fff;
}

.category-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2), 0 8px 32px rgba(0, 0, 0, 0.4);
  border-color: rgba(16, 185, 129, 0.4);
}

.category-card .cat-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}

.category-card .cat-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.category-card .cat-count {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  font-family: 'JetBrains Mono', monospace;
}

.section-label {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 1rem;
}

/* Product list items */
.product-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  background: none;
  color: #fff;
  text-align: left;
  transition: background 0.2s;
  margin-bottom: 0.5rem;
}

.product-list-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.product-list-item .prod-emoji {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.product-list-item .prod-info {
  flex: 1;
  min-width: 0;
}

.product-list-item .prod-name {
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.product-list-item:hover .prod-name {
  color: var(--eco-400);
}

.product-list-item .prod-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'JetBrains Mono', monospace;
}

.product-list-item .prod-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.greenwash-badge {
  font-size: 0.7rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger-400);
  font-family: 'JetBrains Mono', monospace;
}

.score-badge {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.8rem;
}

.score-badge-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.7rem;
}

.no-results {
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
}

/* ==================== SCANNING STATE ==================== */
@keyframes scanning {
  0% { top: 0; }
  50% { top: calc(100% - 2px); }
  100% { top: 0; }
}

.scanning-bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--eco-500) 20%, var(--teal-500) 50%, var(--eco-500) 80%, transparent 100%);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
  animation: scanning 2s ease-in-out infinite;
  z-index: 1;
}

.scanning-content {
  text-align: center;
  padding: 2.5rem 1rem;
  position: relative;
  z-index: 2;
}

.scanning-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.scanning-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.scanning-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--eco-400);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
}

@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

.dot-1 { display: inline-block; animation: dotBounce 1.4s ease-in-out infinite; }
.dot-2 { display: inline-block; animation: dotBounce 1.4s ease-in-out 0.2s infinite; }
.dot-3 { display: inline-block; animation: dotBounce 1.4s ease-in-out 0.4s infinite; }

/* ==================== PRODUCT DETAIL ==================== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeSlideUp 0.5s ease-out forwards;
}

.fade-up-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-3 { animation-delay: 0.3s; opacity: 0; }
.fade-up-4 { animation-delay: 0.4s; opacity: 0; }
.fade-up-5 { animation-delay: 0.5s; opacity: 0; }

.back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.back-btn:hover {
  color: var(--eco-400);
}

.scorecard {
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .scorecard {
    padding: 2rem;
  }
}

.scorecard-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .scorecard-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

.scorecard-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.scorecard-right {
  flex: 1;
  width: 100%;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.product-brand {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'JetBrains Mono', monospace;
}

.score-label-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.greenwash-alert-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger-400);
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  min-height: 36px;
}

@keyframes alertPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.greenwash-alert-btn {
  animation: alertPulse 2s infinite;
}

.greenwash-alert-btn:hover {
  background: rgba(239, 68, 68, 0.3);
}

.price-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  flex-wrap: wrap;
}

.price-label { color: rgba(255, 255, 255, 0.5); }
.price-value { color: #fff; }
.true-cost-value { color: var(--danger-400); font-weight: 600; }

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Progress bars */
.progress-wrapper {
  margin-bottom: 0.25rem;
}

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

.progress-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.progress-value {
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

@keyframes barFill {
  from { width: 0; }
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  animation: barFill 1s ease-out forwards;
}

.progress-sublabel {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  font-family: 'JetBrains Mono', monospace;
  margin-left: 1.5rem;
  margin-top: 0.125rem;
  margin-bottom: 0.75rem;
}

/* Did you know */
.dyk-card {
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.dyk-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.dyk-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--warn-400);
  margin-bottom: 0.25rem;
}

.dyk-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

/* Comparison section */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .comparison-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.comparison-card {
  padding: 1.25rem;
}

.comparison-card.alt-card {
  border-color: rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.08);
}

.comparison-card.current-card {
  border-color: rgba(239, 68, 68, 0.1);
}

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

.comp-emoji { font-size: 1.75rem; flex-shrink: 0; }
.comp-name { font-weight: 600; font-size: 0.875rem; }
.comp-brand { font-size: 0.7rem; color: rgba(255, 255, 255, 0.4); font-family: 'JetBrains Mono', monospace; }
.comp-info { flex: 1; min-width: 0; }

.recommended-badge {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--eco-400);
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.comp-score-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.comp-price {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
}

.comp-price .eco-price { color: var(--eco-400); }
.comp-price .danger-price { color: var(--danger-400); }

.mini-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.375rem;
}

.mini-bar-label {
  width: 60px;
  flex-shrink: 0;
}

.mini-bar-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.mini-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.mini-bar-value {
  width: 24px;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

.switch-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.625rem 1rem;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--eco-400);
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: background 0.2s;
  min-height: 44px;
}

.switch-btn:hover {
  background: rgba(16, 185, 129, 0.3);
}

/* ==================== DONUT CHART ==================== */
.donut-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.donut-score {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}

.donut-max {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'JetBrains Mono', monospace;
}

/* ==================== SIDEBAR ==================== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
}

.sidebar-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sidebar-panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--navy-800);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  height: 100%;
  overflow-y: auto;
  padding: 1.25rem;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

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

.sidebar-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 0.875rem;
  transition: color 0.2s;
  min-height: 32px;
}

.close-btn:hover { color: #fff; }

.stats-card {
  padding: 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.stats-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--eco-400);
  font-family: 'JetBrains Mono', monospace;
}

.stats-text {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.25rem;
}

.tree-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

@keyframes treeGrow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to { transform: scaleY(1); transform-origin: bottom; }
}

.tree-emoji {
  font-size: 1.75rem;
  animation: treeGrow 1s ease-out forwards;
}

.tree-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'JetBrains Mono', monospace;
}

.badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.badge-card {
  padding: 0.75rem;
  text-align: center;
  border-radius: 12px;
}

.badge-card.locked { opacity: 0.3; }

.badge-icon { font-size: 1.5rem; margin-bottom: 0.25rem; }
.badge-name { font-size: 0.7rem; font-weight: 600; }
.badge-desc { font-size: 0.6rem; color: rgba(255, 255, 255, 0.3); font-family: 'JetBrains Mono', monospace; margin-top: 0.25rem; }

.history-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  background: none;
  color: #fff;
  text-align: left;
  transition: background 0.2s;
  margin-bottom: 0.375rem;
  min-height: 44px;
}

.history-item:hover { background: rgba(255, 255, 255, 0.05); }
.history-item .hi-emoji { font-size: 1.25rem; flex-shrink: 0; }
.history-item .hi-info { flex: 1; min-width: 0; }
.history-item .hi-name { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item .hi-date { font-size: 0.6rem; color: rgba(255, 255, 255, 0.3); font-family: 'JetBrains Mono', monospace; }

.empty-history {
  text-align: center;
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.875rem;
}

/* ==================== MODAL ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  max-width: 420px;
  width: 100%;
  padding: 1.5rem;
  border-color: rgba(239, 68, 68, 0.2);
  animation: fadeSlideUp 0.3s ease-out;
}

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

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--danger-400);
}

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

.modal-product-emoji { font-size: 1.75rem; }
.modal-product-name { font-weight: 600; font-size: 0.875rem; }
.modal-product-brand { font-size: 0.7rem; color: rgba(255, 255, 255, 0.4); font-family: 'JetBrains Mono', monospace; }

.modal-reason {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.modal-reason p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.modal-footer-text {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

/* ==================== FOOTER ==================== */
.app-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem 1rem;
  margin-top: 3rem;
  text-align: center;
}

.footer-tagline {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 0.5rem;
}

.footer-link {
  font-size: 0.7rem;
  color: rgba(52, 211, 153, 0.4);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--eco-400);
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
::-webkit-scrollbar-thumb { background: rgba(16, 185, 129, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(16, 185, 129, 0.5); }

/* ==================== UTILITIES ==================== */
.mb-section { margin-bottom: 1rem; }
.mb-section-lg { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.space-y > * + * { margin-top: 0.75rem; }