/* insta-followers-diff — styles.css
   System font stack, CSS custom properties, prefers-color-scheme dark/light.
   No external assets. All URLs relative. */

/* ─── Custom Properties ──────────────────────────────────────────────────── */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* Light theme */
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-raised: #f1f3f5;
  --border: #dee2e6;
  --text: #212529;
  --text-muted: #6c757d;
  --accent: #0d6efd;
  --accent-hover: #0b5ed7;
  --accent-text: #ffffff;
  --danger: #dc3545;
  --danger-surface: #fff5f5;
  --danger-border: #f5c6cb;
  --notice-surface: #fff8e1;
  --notice-border: #ffe082;
  --notice-text: #7a5600;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,.1);
  --radius: 8px;
  --radius-sm: 4px;
  --tab-active-border: #0d6efd;
  --drop-bg: #f0f7ff;
  --drop-border: #90c0ff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #1e2025;
    --surface-raised: #2a2d33;
    --border: #3a3d44;
    --text: #e8eaed;
    --text-muted: #9aa0a6;
    --accent: #4da3ff;
    --accent-hover: #73b7ff;
    --accent-text: #000000;
    --danger: #ff6b6b;
    --danger-surface: #2a1a1a;
    --danger-border: #7a2a2a;
    --notice-surface: #2a2200;
    --notice-border: #5a4400;
    --notice-text: #ffd54f;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
    --shadow-md: 0 2px 8px rgba(0,0,0,.4);
    --drop-bg: #1a2233;
    --drop-border: #3a6090;
  }
}

/* ─── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

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

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

code, pre {
  font-family: var(--font-mono);
  font-size: .875em;
  background: var(--surface-raised);
  border-radius: var(--radius-sm);
  padding: .1em .35em;
}

/* ─── Layout ──────────────────────────────────────────────────────────────── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ─── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.5px;
}

.site-tagline {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .1rem;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  background: #e6f4ea;
  color: #1a6b2e;
  border: 1px solid #a8d5b0;
  border-radius: 999px;
  padding: .25rem .75rem;
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .privacy-badge {
    background: #0e2e18;
    color: #7bcf91;
    border-color: #1e5530;
  }
}

.privacy-badge::before { content: "🔒"; font-size: .85em; }

.header-side { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}

.lang-btn {
  background: transparent;
  border: none;
  font-family: var(--font);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text-muted);
  padding: .28rem .6rem;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.lang-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── Main Content ────────────────────────────────────────────────────────── */
main {
  padding: 2rem 0;
}

/* ─── Drop Zone ───────────────────────────────────────────────────────────── */
#drop-zone {
  border: 2px dashed var(--drop-border);
  background: var(--drop-bg);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  transition: background .15s, border-color .15s;
}

#drop-zone.drag-over {
  background: var(--accent);
  border-color: var(--accent-hover);
  color: white;
}
#drop-zone.drag-over .drop-subtitle { color: rgba(255,255,255,.85); }

.drop-icon {
  font-size: 3rem;
  margin-bottom: .75rem;
  display: block;
  line-height: 1;
}

.drop-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: .4rem;
}

.drop-subtitle {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 1.5rem;
}

.drop-actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hidden file inputs */
#file-input,
#folder-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 500;
  padding: .5rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface-raised);
  color: var(--text);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Size Notice ─────────────────────────────────────────────────────────── */
#size-notice {
  background: var(--notice-surface);
  border: 1px solid var(--notice-border);
  color: var(--notice-text);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  margin-top: 1rem;
  font-size: .875rem;
}

/* ─── Error Section ───────────────────────────────────────────────────────── */
#error-section {
  background: var(--danger-surface);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  color: var(--text);
}

#error-section h2 {
  color: var(--danger);
  font-size: 1rem;
  margin-bottom: .5rem;
}

#error-msg ol, #error-msg ul {
  padding-left: 1.25rem;
  margin-top: .4rem;
}

#error-msg li { margin-bottom: .25rem; }

/* ─── Status Region ───────────────────────────────────────────────────────── */
#status-region {
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  margin-top: 1rem;
  min-height: 1.4em;
}

/* ─── Results Section ────────────────────────────────────────────────────── */
#results-section {
  margin-top: 0;
}

/* Summary Cards */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem .75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.summary-card .label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: .25rem;
}

.summary-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.summary-card.highlight .value {
  color: var(--danger);
}

/* ─── Tabs ────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1rem;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: .6rem 1.1rem;
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .12s, border-color .12s;
}

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

.tab-btn[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--tab-active-border);
}

.tab-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Controls Bar ────────────────────────────────────────────────────────── */
.controls-bar {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.controls-bar label {
  font-size: .8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

#search-input,
#sort-select {
  font-family: var(--font);
  font-size: .875rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .4rem .65rem;
  outline: none;
}

#search-input {
  flex: 1;
  min-width: 160px;
}

#sort-select {
  min-width: 195px;
}

#search-input:focus,
#sort-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(13,110,253,.2);
}

/* ─── Account List ───────────────────────────────────────────────────────── */
.account-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background .1s;
}

.account-row:last-child { border-bottom: none; }

.account-row:hover { background: var(--surface-raised); }

.account-link {
  font-weight: 500;
  color: var(--accent);
  font-size: .9rem;
}

.account-date {
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: 1rem;
}

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
  font-size: .95rem;
}

/* ─── Show All / Download Bar ────────────────────────────────────────────── */
#show-all-wrapper {
  text-align: center;
  margin-top: .75rem;
}

.bottom-bar {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ─── Help Section ────────────────────────────────────────────────────────── */
.help-section {
  margin-top: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-size: .875rem;
}

.help-section h2 {
  font-size: 1rem;
  margin-bottom: .75rem;
  color: var(--text);
}

.help-section ol, .help-section ul {
  padding-left: 1.25rem;
}

.help-section li { margin-bottom: .35rem; }

.help-privacy-note {
  margin-top: .75rem;
  color: var(--text-muted);
  font-size: .8rem;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

/* ─── Utility ─────────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .summary-card .value { font-size: 1.4rem; }
  #drop-zone { padding: 2rem 1rem; }
  .header-inner { flex-direction: column; align-items: flex-start; }
}
