/* ============================================================
   RS3 GOUDGIDS — Design Systeem
   RS3-thema: diepzwart + oud goud
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Cinzel:wght@400;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --bg-deep:       #07070d;
  --bg-card:       #111118;
  --bg-card-hover: #18181f;
  --bg-input:      #0e0e15;
  --border:        #2a2a3a;
  --border-gold:   #c9a22780;

  --gold:          #c9a227;
  --gold-light:    #f0c040;
  --gold-dim:      #8a6e1a;

  --text:          #e8e0d0;
  --text-muted:    #8a8070;
  --text-bright:   #fff8e8;

  --green:         #4cbe76;
  --green-bg:      #1a3325;
  --red:           #e05555;
  --red-bg:        #331a1a;
  --blue:          #5b9bd5;
  --blue-bg:       #1a2533;

  --radius:        10px;
  --radius-lg:     16px;
  --shadow:        0 4px 24px #0006;
  --shadow-gold:   0 0 20px #c9a22718;

  --nav-height:    64px;
  --transition:    0.2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-card); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   NAVIGATIE
═══════════════════════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: #0a0a12ee;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 0;
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
  white-space: nowrap;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo span { font-size: 1.5rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.nav-links a:hover {
  color: var(--gold-light);
  background: #c9a22710;
  border-color: var(--border-gold);
}
.nav-links a.active {
  color: var(--gold);
  background: #c9a22718;
  border-color: var(--border-gold);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  padding: 8px;
  margin-left: auto;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: #0d0d15f0;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-gold);
  padding: 12px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--gold-light);
  background: #c9a22715;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════════ */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.page-header h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--gold);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* ═══════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
}

.card-gold {
  background: linear-gradient(135deg, #1a1608 0%, var(--bg-card) 100%);
  border-color: var(--gold-dim);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.stat-card-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.stat-card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Monster / Boss cards ── */
.monster-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.monster-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}
.monster-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.monster-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  border: 1px solid var(--border-gold);
}
.monster-card-name {
  font-weight: 700;
  color: var(--text-bright);
  font-size: 1rem;
}
.monster-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.monster-card-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.monster-card-footer {
  padding: 12px 20px;
  background: #0a0a10;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Boss difficulty stars ── */
.stars { display: flex; gap: 2px; }
.star { color: var(--gold-dim); font-size: 0.9rem; }
.star.filled { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   BADGES & TAGS
═══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-gold   { background: #c9a22720; color: var(--gold); border: 1px solid var(--border-gold); }
.badge-green  { background: var(--green-bg); color: var(--green); border: 1px solid #4cbe7640; }
.badge-red    { background: var(--red-bg); color: var(--red); border: 1px solid #e0555540; }
.badge-blue   { background: var(--blue-bg); color: var(--blue); border: 1px solid #5b9bd540; }
.badge-gray   { background: #1e1e28; color: var(--text-muted); border: 1px solid var(--border); }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
}
.tag-low    { background: #1a3325; color: #5dd68a; }
.tag-mid    { background: #2a2010; color: #e8a020; }
.tag-high   { background: #2a1010; color: #e05555; }
.tag-member { background: #1a2533; color: #5b9bd5; }
.tag-free   { background: #1a2510; color: #8fc47a; }

/* ═══════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
thead {
  background: #0e0e18;
  position: sticky;
  top: 0;
  z-index: 1;
}
th {
  padding: 13px 16px;
  text-align: left;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-gold);
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}
th:hover { color: var(--gold-light); }
th .sort-icon { margin-left: 4px; opacity: 0.5; font-size: 0.7rem; }
th.sort-asc .sort-icon, th.sort-desc .sort-icon { opacity: 1; }

td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr {
  background: var(--bg-card);
  transition: background var(--transition);
}
tbody tr:nth-child(even) { background: #0f0f17; }
tbody tr:hover { background: #1a1a25; }

.item-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.item-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
  border-radius: 4px;
}
.item-img-placeholder {
  width: 32px;
  height: 32px;
  background: var(--bg-input);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.price-up   { color: var(--green); font-weight: 600; }
.price-down { color: var(--red); font-weight: 600; }
.price-neu  { color: var(--text-muted); }

.num { font-variant-numeric: tabular-nums; font-weight: 500; }

/* ═══════════════════════════════════════════════════════════
   FORMS & INPUTS
═══════════════════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 11px 14px;
  width: 100%;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #c9a22718;
}
input::placeholder { color: var(--text-muted); }
select option { background: #13131f; }

/* Search bar */
.search-bar {
  position: relative;
}
.search-bar input {
  padding-left: 40px;
}
.search-bar .search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--gold);
  color: #0a0800;
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px #c9a22730;
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--border-gold);
}
.btn-outline:hover {
  background: #c9a22710;
  border-color: var(--gold);
}
.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: #e0555540;
}
.btn-danger:hover {
  background: var(--red-bg);
}
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { padding: 9px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ═══════════════════════════════════════════════════════════
   PROGRESS / RESULT BOX
═══════════════════════════════════════════════════════════ */
.result-box {
  background: var(--bg-input);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.result-row:last-child { border-bottom: none; }
.result-row .rl { color: var(--text-muted); }
.result-row .rv { font-weight: 700; font-variant-numeric: tabular-nums; }
.result-row.total { border-top: 2px solid var(--border-gold); margin-top: 4px; padding-top: 12px; }
.result-row.total .rv { color: var(--gold); font-size: 1.15rem; }
.result-profit { color: var(--green); }
.result-loss   { color: var(--red); }

/* ═══════════════════════════════════════════════════════════
   ALERTS / INFO BOXES
═══════════════════════════════════════════════════════════ */
.alert {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  border: 1px solid;
  line-height: 1.5;
}
.alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.alert-info    { background: var(--blue-bg);  color: #a0c4e8; border-color: #5b9bd540; }
.alert-success { background: var(--green-bg); color: #8fdba8; border-color: #4cbe7640; }
.alert-warning { background: #2a2010;         color: #e8c070; border-color: #c9a22740; }
.alert-danger  { background: var(--red-bg);   color: #e09090; border-color: #e0555540; }

/* ═══════════════════════════════════════════════════════════
   TABS
═══════════════════════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 1px;
}
.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ═══════════════════════════════════════════════════════════
   GP FORMATTER — colored values
═══════════════════════════════════════════════════════════ */
.gp { color: var(--gold); font-weight: 600; }
.gp-green { color: var(--green); font-weight: 600; }
.gp-red { color: var(--red); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   LOADING / SPINNER
═══════════════════════════════════════════════════════════ */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pulse {
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, #1a1a24 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-load 1.4s ease infinite;
  border-radius: 4px;
  height: 14px;
}
@keyframes skeleton-load {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════════
   TOOLBAR (filters bar boven tabellen)
═══════════════════════════════════════════════════════════ */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.toolbar-right { margin-left: auto; }

/* ═══════════════════════════════════════════════════════════
   REFRESH INDICATOR
═══════════════════════════════════════════════════════════ */
.refresh-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.refresh-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ═══════════════════════════════════════════════════════════
   HOMEPAGE HERO
═══════════════════════════════════════════════════════════ */
.hero {
  padding: 60px 0 48px;
  text-align: center;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, #c9a22715 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 6vw, 3.6rem);
  color: var(--gold);
  margin-bottom: 16px;
  text-shadow: 0 0 40px #c9a22740;
  line-height: 1.15;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   HOME QUICK STATS
═══════════════════════════════════════════════════════════ */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

/* ═══════════════════════════════════════════════════════════
   QUICK TIPS SECTION
═══════════════════════════════════════════════════════════ */
.tip-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tip-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: var(--bg-input);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  transition: border-color var(--transition);
}
.tip-item:hover { border-color: var(--border-gold); }
.tip-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.tip-text { color: var(--text); }
.tip-text strong { color: var(--gold-light); }

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
footer {
  margin-top: 80px;
  padding: 28px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.8;
}
footer a { color: var(--gold-dim); }
footer a:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   FLIP TRACKER SPECIFIC
═══════════════════════════════════════════════════════════ */
.tracker-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.flip-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
}
.flip-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .page-header { padding: 28px 0 20px; }
  .card { padding: 16px; }
  .hero { padding: 36px 0 28px; }
  .result-box { padding: 14px; }
  .flip-form { padding: 16px; }
  td, th { padding: 9px 10px; }
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.flex  { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }
