/* OSRS Flip Finder - dark theme, RuneScape gold accent */
:root {
  --bg: #0e0c08;
  --panel: rgba(26, 22, 14, 0.85);
  --border: rgba(255, 220, 150, 0.12);
  --text: #ece3d0;
  --dim: #9a8f78;
  --gold: #ffce5c;
  --green: #6ee07a;
  --red: #ff6b6b;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5;
  background-image: radial-gradient(60% 50% at 50% 0%, rgba(255,206,92,0.06), transparent 70%); min-height: 100vh; }
#app { max-width: 1000px; margin: 0 auto; padding: 24px 16px 40px; }

header { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.pulse { width: 11px; height: 11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 var(--gold); animation: sonar 2.4s ease-out infinite; flex-shrink: 0; }
@keyframes sonar { 0% { box-shadow: 0 0 0 0 rgba(255,206,92,0.5); } 70% { box-shadow: 0 0 0 12px rgba(255,206,92,0); } 100% { box-shadow: 0 0 0 0 rgba(255,206,92,0); } }
h1 { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; color: #fff; line-height: 1.1; }
.sub { font-size: 12px; color: var(--dim); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); margin: 0 3px; }
.dot.ok { background: var(--green); } .dot.err { background: var(--red); } .dot.loading { background: var(--gold); animation: blink 1s step-start infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.muted { color: var(--dim); font-size: 12px; }

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
#search { flex: 1; min-width: 180px; padding: 9px 13px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; color: var(--text); font-size: 14px; outline: none; }
#search:focus { border-color: var(--gold); }
#search::placeholder { color: #6b6354; }
.ctl { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--dim); }
.ctl select { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 7px 9px; font-size: 13px; outline: none; cursor: pointer; }

.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
table { width: 100%; border-collapse: collapse; }
thead th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--dim); font-weight: 600; padding: 11px 10px; text-align: right; cursor: pointer; user-select: none; white-space: nowrap; border-bottom: 1px solid var(--border); }
thead th.left { text-align: left; }
thead th:hover { color: var(--text); }
thead th.active { color: var(--gold); }
tbody td { padding: 9px 10px; text-align: right; border-bottom: 1px solid rgba(255,255,255,0.04); font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,206,92,0.05); }
td.item { text-align: left; display: flex; align-items: center; gap: 9px; }
td.item img { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; image-rendering: -webkit-optimize-contrast; }
td.item .nm { overflow: hidden; text-overflow: ellipsis; }
.profit { color: var(--green); font-weight: 700; }
.roi { color: var(--gold); }
.f2p { color: var(--dim); font-size: 10px; border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; margin-left: 6px; }
.empty { padding: 30px; text-align: center; color: var(--dim); }

footer { margin-top: 14px; font-size: 11px; color: var(--dim); text-align: center; }
footer a { color: var(--gold); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  thead th.opt, tbody td.opt { display: none; }
  #app { padding: 16px 10px 30px; }
}
