/* ═══ PROBLEM ═══ */
#problem {
  background: var(--bg-primary);
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

#problem::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 85%, rgba(207, 102, 121, 0.15) 0%, transparent 40%),
    radial-gradient(ellipse at 75% 80%, rgba(232, 147, 90, 0.12) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 100%, rgba(207, 102, 121, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

#problem::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 24px,
      rgba(207, 102, 121, 0.035) 24px,
      rgba(207, 102, 121, 0.035) 25px
    );
  mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
  pointer-events: none;
}

/* Problem points row */
.problems-row {
  max-width: 1100px;
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.problem-point { display: flex; align-items: flex-start; gap: 14px; }
.problem-point-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
}
.problem-point h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.problem-point p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; font-weight: 300; }
@media (max-width: 768px) { .problems-row { grid-template-columns: 1fr 1fr; gap: 24px; } }
@media (max-width: 480px) { .problems-row { grid-template-columns: 1fr; } }

/* Comparison panels */
.comparison-title {
  text-align: center; font-size: 1.35rem; font-weight: 500;
  color: var(--text-secondary); margin: 56px auto 32px;
  letter-spacing: -0.01em;
}
.comparison {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
@media (max-width: 768px) { .comparison { grid-template-columns: 1fr; gap: 32px; } }

.panel { display: flex; flex-direction: column; }
.panel-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: 16px 16px 0 0;
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
}
.panel-before .panel-header { background: rgba(207,102,121,0.08); border: 1px solid rgba(207,102,121,0.15); border-bottom: none; color: var(--red-soft); }
.panel-after .panel-header { background: rgba(92,185,122,0.08); border: 1px solid rgba(92,185,122,0.15); border-bottom: none; color: #5CB97A; }
.panel-header-dot { width: 8px; height: 8px; border-radius: 50%; }
.panel-before .panel-header-dot { background: var(--red-soft); }
.panel-after .panel-header-dot { background: #5CB97A; }

/* Scene */
.scene {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  background: var(--bg-primary); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0 0 16px 16px; overflow: hidden;
}
.scene::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px; pointer-events: none;
}
.panel-before .scene { border-color: rgba(207,102,121,0.12); background: radial-gradient(ellipse at 50% 50%, rgba(207,102,121,0.03) 0%, transparent 60%), var(--bg-primary); }
.panel-after .scene { border-color: rgba(92,185,122,0.12); background: radial-gradient(ellipse at 50% 50%, rgba(92,185,122,0.02) 0%, transparent 60%), var(--bg-primary); }

.scene-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow-trail { fill: none; stroke-width: 1; stroke-linecap: round; opacity: 0.07; }
.flow-path { fill: none; stroke: none; }
.flow-dot { filter: url(#glow); }
.flow-dot-g { filter: url(#glow-g); }

/* Nodes */
.scene .node { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 2; }
.scene .node-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: #2a2a32; border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 3px 12px rgba(0,0,0,0.3);
}
.scene .node-icon i[data-lucide] { width: 22px; height: 22px; }
.scene .node-label { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }

/* Before positions */
.panel-before .n-t1 { top: 6%; left: 6%; }
.panel-before .n-t2 { top: 30%; left: 3%; }
.panel-before .n-t3 { top: 55%; left: 5%; }
.panel-before .n-t4 { bottom: 5%; left: 10%; }
.panel-before .n-waiter { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.panel-before .n-bar { top: 10%; right: 8%; }
.panel-before .n-kitchen { bottom: 8%; right: 8%; }
.node-table .node-icon { border-radius: 50%; width: 46px; height: 46px; }
.panel-before .n-waiter .node-icon {
  width: 54px; height: 54px; border-radius: 50%;
  border-color: rgba(207,102,121,0.35); background: rgba(207,102,121,0.07);
  animation: waiterStress 2.5s ease-in-out infinite;
}
@keyframes waiterStress {
  0%, 100% { box-shadow: 0 0 0 0 rgba(207,102,121,0.25), 0 3px 12px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 0 12px rgba(207,102,121,0), 0 3px 12px rgba(0,0,0,0.3); }
}
.panel-before .n-bar .node-icon { border-color: rgba(155,127,212,0.2); background: rgba(155,127,212,0.04); }
.panel-before .n-kitchen .node-icon { border-color: rgba(232,147,90,0.2); background: rgba(232,147,90,0.04); }

/* After positions */
.panel-after .n-t1 { top: 5%; left: 4%; }
.panel-after .n-t2 { top: 28%; left: 4%; }
.panel-after .n-t3 { top: 52%; left: 4%; }
.panel-after .n-t4 { bottom: 5%; left: 4%; }
.panel-after .n-bar { top: 16%; right: 4%; }
.panel-after .n-kitchen { bottom: 16%; right: 4%; }
.panel-after .node-table .node-icon { border-color: rgba(92,185,122,0.2); }
.panel-after .n-bar .node-icon { border-color: rgba(92,185,122,0.2); background: rgba(92,185,122,0.04); }
.panel-after .n-kitchen .node-icon { border-color: rgba(92,185,122,0.2); background: rgba(92,185,122,0.04); }

/* Pipeline */
.pipeline { position: absolute; left: 50%; top: 10%; bottom: 10%; transform: translateX(-50%); width: 3px; background: linear-gradient(to bottom, #5CB97A, #4DB6AC); opacity: 0.15; border-radius: 4px; z-index: 1; }
.pipeline-glow { position: absolute; left: 50%; top: 10%; bottom: 10%; transform: translateX(-50%); width: 24px; background: linear-gradient(to bottom, rgba(92,185,122,0.04), rgba(77,182,172,0.04)); border-radius: 12px; z-index: 0; }
.pipeline-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.pipeline-label-badge {
  padding: 6px 14px; background: rgba(92,185,122,0.12);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(92,185,122,0.25); border-radius: 100px;
  font-family: 'Playfair Display', serif; font-size: 0.7rem; font-weight: 600;
  color: #5CB97A; white-space: nowrap; letter-spacing: 0.02em;
}
.pipeline-label-sub { font-size: 0.45rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.15em; color: #5CB97A; opacity: 0.6; }

/* ═══ MOBILE SCENE FIXES ═══ */
@media (max-width: 480px) {
  .scene .node-icon { width: 36px; height: 36px; border-radius: 10px; }
  .scene .node-icon i[data-lucide] { width: 16px; height: 16px; }
  .node-table .node-icon { width: 34px; height: 34px; }
  .scene .node-label { font-size: 0.5rem; letter-spacing: 0.05em; }
  .panel-before .n-waiter .node-icon { width: 42px; height: 42px; }
  .pipeline-label-badge { font-size: 0.6rem; padding: 4px 10px; }
  .pipeline-label-sub { font-size: 0.4rem; }
}
