/* ═══════════════════════════════════════════════════════════════
   Ingefy Shared Styles — Global polish layer
   Loaded on every page for consistency
   ═══════════════════════════════════════════════════════════════ */

/* ── Custom scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.2);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.35); }
* { scrollbar-width: thin; scrollbar-color: rgba(99, 102, 241, 0.2) transparent; }

/* ── Focus states ────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.6);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.6);
  outline-offset: 2px;
}

/* ── Selection ───────────────────────────────────────────────── */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: #f1f1f4;
}

/* ── Smooth page transitions ─────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ── Card hover micro-interactions ───────────────────────────── */
.strat-card,
.watch-card,
.summary-box,
.stat-box,
.glass-card {
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.strat-card:hover,
.watch-card:hover,
.glass-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.06);
}

/* ── Button hover polish ─────────────────────────────────────── */
.btn-primary, .btn-analyze, .btn-run, .btn-add, .btn-link {
  transition: all 0.2s ease;
}
.btn-primary:hover, .btn-analyze:hover, .btn-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.btn-primary:active, .btn-analyze:active, .btn-link:active {
  transform: translateY(0);
}

/* ── Empty states ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}
.empty-state .empty-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.25rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 16px;
  color: rgba(99, 102, 241, 0.7);
}
.empty-state .empty-icon svg {
  width: 28px; height: 28px;
}
.empty-state h3 {
  font-size: 1.15rem; font-weight: 600;
  margin-bottom: 0.5rem;
}
.empty-state p {
  color: var(--text-secondary, #8b8b9e);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 420px;
  margin-left: auto; margin-right: auto;
  line-height: 1.55;
}

/* ── Loading states (skeleton pulse) ─────────────────────────── */
.loading {
  text-align: center; padding: 3rem;
  color: var(--text-muted, #55556a);
  font-size: 0.88rem;
}
.loading::after {
  content: '';
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--border, #1e1e2e);
  border-top-color: var(--accent, #6366f1);
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
  animation: spin-loader 0.7s linear infinite;
}
@keyframes spin-loader { to { transform: rotate(360deg); } }

/* ── Table polish ────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
table th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted, #55556a);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border, #1e1e2e);
}
table td {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(30, 30, 46, 0.5);
}
table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}
table tbody tr {
  transition: background 0.15s ease;
}
table tbody tr:hover {
  background: rgba(99, 102, 241, 0.03);
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer-disclaimer {
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border, #1e1e2e);
  font-size: 0.72rem;
  color: var(--text-muted, #55556a);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}

/* ── Responsive helpers ──────────────────────────────────────── */
@media (max-width: 640px) {
  .page { padding-left: 1rem !important; padding-right: 1rem !important; }
}
