/* =====================================================================
   Momentum masters Scanner — Premium Dark Style
   ===================================================================== */

:root {
  --bg:        #0d0d1a;
  --bg2:       #12122a;
  --surface:   #1a1a35;
  --surface2:  #22234a;
  --border:    #2a2c5a;
  --accent:    #6c63ff;
  --accent2:   #a89cff;
  --green:     #a6e3a1;
  --red:       #f38ba8;
  --yellow:    #f9e2af;
  --blue:      #89b4fa;
  --text:      #cdd6f4;
  --text-dim:  #7c7fa8;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 8px 32px rgba(0,0,0,0.5);
  --glow:      0 0 24px rgba(108,99,255,0.25);
}

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

body {
  font-family: 'Inter', 'Malgun Gothic', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== HEADER ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,26,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  font-size: 2rem;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 6px #f9e2af88); }
  50%       { filter: drop-shadow(0 0 16px #f9e2afcc); }
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a89cff 0%, #89b4fa 50%, #a6e3a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 1px;
  font-weight: 400;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge-adr { background: rgba(249,226,175,0.12); color: var(--yellow); border: 1px solid #f9e2af44; }
.badge-vol { background: rgba(137,180,250,0.12); color: var(--blue);   border: 1px solid #89b4fa44; }
.badge-sma { background: rgba(166,227,161,0.12); color: var(--green);  border: 1px solid #a6e3a144; }

.help-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.help-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }

.guide-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.22s ease;
}
.guide-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(108,99,255,0.4);
}

.install-pwa-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(166,227,161,0.12);
  border: 1px solid rgba(166,227,161,0.3);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.22s ease;
  animation: install-pulse 2s infinite alternate;
}
.install-pwa-btn:hover {
  background: var(--green);
  color: #0d0d1a;
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(166,227,161,0.5);
  animation-play-state: paused;
}
@keyframes install-pulse {
  0% { transform: scale(1); box-shadow: 0 0 4px rgba(166,227,161,0.2); }
  100% { transform: scale(1.02); box-shadow: 0 0 12px rgba(166,227,161,0.4); }
}

/* ===== MAIN LAYOUT ===== */
.app-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  min-height: calc(100vh - 68px);
}

/* ===== PANEL ===== */
.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
}

.card:hover { box-shadow: var(--shadow), var(--glow); }

.card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

/* ===== CONTROLS ===== */
.control-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.select-wrapper {
  flex: 1;
  position: relative;
}

.select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  font-size: 0.8rem;
}

#market-select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  padding: 10px 32px 10px 14px;
  border-radius: var(--radius-sm);
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
  outline: none;
}
#market-select:focus { border-color: var(--accent); }

.btn-scan {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b7fff 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(108,99,255,0.4);
  letter-spacing: 0.3px;
}
.btn-scan:hover  { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(108,99,255,0.6); }
.btn-scan:active { transform: translateY(0); }
.btn-scan:disabled {
  background: var(--surface2);
  color: var(--text-dim);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.btn-scan .btn-icon { font-size: 1.1rem; }

/* ===== PROGRESS ===== */
.progress-wrap {
  margin-top: 14px;
}

.progress-bar {
  background: var(--bg2);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  border-radius: 4px;
  transition: width 0.2s ease;
  background-size: 200% 100%;
}

.progress-label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ===== STATS ROW ===== */
.stats-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 14px;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-val {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
}

.stat-val.stat-match { color: var(--green); }

.stat-lbl {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ===== LOG AREA ===== */
.log-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

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

.log-clear-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.log-clear-btn:hover { border-color: var(--red); color: var(--red); }

.log-area {
  flex: 1;
  overflow-y: auto;
  background: #0a0a18;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--green);
  min-height: 280px;
  max-height: calc(100vh - 400px);
}

.log-line { display: block; animation: fadeIn 0.2s ease; }
.log-line.match  { color: var(--yellow); font-weight: 600; }
.log-line.error  { color: var(--red); }
.log-line.info   { color: var(--text-dim); }
.log-line.system { color: var(--blue); }

@keyframes fadeIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; } }

/* ===== RESULTS PANEL ===== */
.results-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.action-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent2);
  background: rgba(108,99,255,0.1);
}
.action-btn:active:not(:disabled) {
  transform: scale(0.97);
}
.action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.action-btn.success {
  border-color: var(--green);
  color: var(--green);
  background: rgba(166,227,161,0.1);
}

.result-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  margin-left: 6px;
}

.results-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  color: var(--text-dim);
  gap: 10px;
}

.empty-icon { font-size: 3rem; opacity: 0.3; }
.results-empty p { font-size: 0.85rem; }
.empty-hint { font-size: 0.75rem; color: var(--text-dim); opacity: 0.7; }

.results-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 200px);
}

/* ===== RESULT CARD ===== */
.result-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.22s;
  animation: slideIn 0.3s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0; /* Prevents flexbox container from squeezing the card height */
}

.result-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--blue));
  border-radius: 2px 0 0 2px;
}

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

.result-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(108,99,255,0.2);
}

.result-card-ticker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--yellow);
  margin-bottom: 6px;
}

.result-card-setups {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setup-tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  width: fit-content;
}

.setup-tag.s1 { background: rgba(166,227,161,0.12); color: var(--green); border: 1px solid #a6e3a133; }
.setup-tag.s2 { background: rgba(137,180,250,0.12); color: var(--blue);   border: 1px solid #89b4fa33; }
.setup-tag.s3 { background: rgba(243,139,168,0.12); color: var(--red);    border: 1px solid #f38ba833; }
.setup-tag.s4 { background: rgba(250,179,135,0.12); color: #fab387;      border: 1px solid rgba(250,179,135,0.2); }
.setup-tag.s5 { background: rgba(203,166,247,0.12); color: #cba6f7;      border: 1px solid rgba(203,166,247,0.2); }
.setup-tag.s6 { background: rgba(148,226,233,0.12); color: #94e2d5;      border: 1px solid rgba(148,226,233,0.2); }

.result-card-time {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 8px;
}

.result-card-action {
  font-size: 0.72rem;
  color: var(--accent);
  margin-top: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}
.result-card:hover .result-card-action { opacity: 1; }

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

.modal.hidden { display: none !important; }

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

.modal-content {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: min(90vw, 900px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
  animation: modalIn 0.25s ease;
}

.modal-help {
  width: min(90vw, 640px);
}

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

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

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue);
}

.modal-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { border-color: var(--red); color: var(--red); }

.modal-body {
  overflow-y: auto;
  padding: 20px 22px;
  flex: 1;
}

.modal-interactive-chart {
  width: 100%;
  height: 480px;
  background: #0d0d1a;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.modal-setups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* ===== HELP MODAL ===== */
.help-body { font-size: 0.88rem; line-height: 1.7; }
.help-body h4 { color: var(--blue); margin: 18px 0 8px; font-size: 0.85rem; }
.help-body ul, .help-body ol { padding-left: 20px; color: var(--text); }
.help-body li { margin-bottom: 4px; }
.help-body p { color: var(--text); margin-bottom: 8px; }
.help-body strong { color: var(--yellow); }
.help-body em { color: var(--accent2); }

.setup-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.setup-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.setup-item strong { font-size: 0.85rem; }
.setup-item span { color: var(--text-dim); font-size: 0.78rem; }
.setup-item.s1 { background: rgba(166,227,161,0.08); border-left: 3px solid var(--green); }
.setup-item.s2 { background: rgba(137,180,250,0.08); border-left: 3px solid var(--blue); }
.setup-item.s3 { background: rgba(243,139,168,0.08); border-left: 3px solid var(--red); }
.setup-item.s4 { background: rgba(250,179,135,0.08); border-left: 3px solid #fab387; }
.setup-item.s5 { background: rgba(203,166,247,0.08); border-left: 3px solid #cba6f7; }
.setup-item.s6 { background: rgba(148,226,233,0.08); border-left: 3px solid #94e2d5; }

.help-tip {
  background: rgba(249,226,175,0.08);
  border: 1px solid #f9e2af22;
  border-left: 3px solid var(--yellow);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.7;
}

/* ===== GUIDE MODAL SPECIFICS ===== */
.modal-guide {
  width: min(90vw, 960px) !important;
}

/* ===== TABS IN GUIDE MODAL ===== */
.guide-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.tab-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(108,99,255,0.05);
}

.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(108,99,255,0.3);
}

.tab-content.hidden {
  display: none !important;
}

/* ===== SETUP-SPECIFIC CARD LIST ===== */
.setup-guide-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  padding-right: 4px;
}

@media (min-width: 768px) {
  .setup-guide-list {
    grid-template-columns: 1fr 1fr;
  }
}

.setup-guide-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.setup-guide-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(108,99,255,0.15);
  transform: translateY(-2px);
}

.setup-guide-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 2px 0 0 2px;
}

.setup-guide-card.s1::before { background: var(--green); }
.setup-guide-card.s2::before { background: var(--blue); }
.setup-guide-card.s3::before { background: var(--red); }
.setup-guide-card.s4::before { background: #fab387; }
.setup-guide-card.s5::before { background: #cba6f7; }
.setup-guide-card.s6::before { background: #94e2d5; }

.setup-guide-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.setup-guide-header h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.setup-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  color: white;
  text-transform: uppercase;
}

.setup-badge.s1 { background: var(--green); color: #0d0d1a; }
.setup-badge.s2 { background: var(--blue); color: #0d0d1a; }
.setup-badge.s3 { background: var(--red); color: white; }
.setup-badge.s4 { background: #fab387; color: #0d0d1a; }
.setup-badge.s5 { background: #cba6f7; color: #0d0d1a; }
.setup-badge.s6 { background: #94e2d5; color: #0d0d1a; }

.setup-guide-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setup-guide-row {
  display: grid;
  grid-template-columns: 55px 1fr;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.76rem;
  line-height: 1.5;
}

.row-label {
  font-weight: 700;
  text-align: center;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 0.68rem;
  white-space: nowrap;
}

.row-label.green { background: rgba(166,227,161,0.12); color: var(--green); border: 1px solid rgba(166,227,161,0.2); }
.row-label.red { background: rgba(243,139,168,0.12); color: var(--red); border: 1px solid rgba(243,139,168,0.2); }
.row-label.blue { background: rgba(137,180,250,0.12); color: var(--blue); border: 1px solid rgba(137,180,250,0.2); }

.setup-guide-row p {
  margin: 0;
  color: var(--text);
}

.guide-intro {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 20px;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

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

.guide-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.22s ease;
}

.guide-section:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(108,99,255,0.1);
  transform: translateY(-2px);
}

.guide-section.buy { border-top: 4px solid var(--green); }
.guide-section.stop { border-top: 4px solid var(--red); }
.guide-section.target { border-top: 4px solid var(--blue); }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.guide-section.buy .section-title h4 { color: var(--green); }
.guide-section.stop .section-title h4 { color: var(--red); }
.guide-section.target .section-title h4 { color: var(--blue); }

.indicator {
  font-size: 1rem;
}

.guide-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-list li {
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--text);
  position: relative;
  padding-left: 12px;
}

.guide-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

.guide-list li strong {
  color: var(--yellow);
  font-weight: 600;
}

/* ===== LOADING SPINNER ===== */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== UTILITY ===== */
.hidden { display: none !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .app-main {
    grid-template-columns: 1fr;
  }
  .header-badges .badge { display: none; }
  .log-area { max-height: 250px; }
  .results-list { max-height: 400px; }
}

@media (max-width: 600px) {
  .modal-content {
    width: 95vw;
    max-height: 95vh;
  }
  .modal-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
  }
  .modal-interactive-chart {
    height: 320px;
  }
  .modal-body {
    padding: 10px;
  }
  .app-header {
    padding: 0 12px;
    position: static;
  }
  .header-inner {
    height: auto;
    padding: 10px 0;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .brand-title {
    font-size: 1.1rem;
  }
  .app-main {
    padding: 12px;
  }
  .card {
    padding: 12px;
  }
  .control-row {
    flex-direction: column;
  }
  .btn-scan {
    width: 100%;
    justify-content: center;
  }
}
