/* ── PRK Community — Project Rubi Ka ── */

:root {
  --bg-0: #05070d;
  --bg-1: #0a0d18;
  --surface: #12121c;
  --surface-edge: #1e1e2e;
  --surface-deep: #0a0a10;
  --panel: rgba(18, 22, 34, 0.72);
  --panel-edge: rgba(255,255,255,0.06);
  --text: #e9edf5;
  --muted: #8a93a8;
  --muted-2: #5e6678;
  --accent: #e8b84a;
  --accent-dim: rgba(232, 184, 74, 0.15);
  --green: #7cf26f;
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg-0); }

html, body {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

body { background: transparent; }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(180, 120, 40, 0.10), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(60, 100, 180, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 60%, var(--bg-0) 100%);
}
.starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}
.orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.16;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.5), rgba(232,184,74,0.12) 45%, transparent 70%);
  border: 1px solid rgba(255,255,255,0.04);
  animation: orbDrift 60s ease-in-out infinite;
}
.orb--1 { width: 320px; height: 320px; top: 12%; left: 8%;  animation-delay: -5s; }
.orb--2 { width: 240px; height: 240px; top: 18%; right: 22%; animation-delay: -22s; opacity: 0.08; }
.orb--3 { width: 380px; height: 380px; bottom: 18%; right: 6%; animation-delay: -38s; }
.orb--4 { width: 200px; height: 200px; bottom: 28%; left: 18%; animation-delay: -50s; opacity: 0.10; }
@keyframes orbDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%       { transform: translate(20px, -30px) scale(1.04); }
  50%       { transform: translate(-15px, 25px) scale(0.98); }
  75%       { transform: translate(-25px, -15px) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
}

.topbar {
  position: relative;
  z-index: 10;
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar__home {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  font-family: "Press Start 2P", ui-monospace, "Courier New", monospace;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}
.topbar__home:hover { color: rgba(255,255,255,0.8); }
.topbar__home svg { width: 14px; height: 14px; opacity: 0.7; }
.topbar__sep { color: rgba(255,255,255,0.12); font-size: 13px; flex-shrink: 0; }
.topbar__breadcrumb {
  font-family: "Press Start 2P", ui-monospace, "Courier New", monospace;
  font-size: clamp(7px, 1.1vw, 9px);
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
  line-height: 1.8;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar__breadcrumb a { color: rgba(255,255,255,0.45); transition: color 0.2s; }
.topbar__breadcrumb a:hover { color: rgba(255,255,255,0.8); }
.topbar__breadcrumb .sep { margin: 0 6px; color: rgba(255,255,255,0.18); }
.topbar__breadcrumb .current { color: rgba(255,255,255,0.55); }

.prk-page {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.prk-subnav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
  background: rgba(0,0,0,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
}
.prk-subnav__link {
  display: inline-block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-2);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.prk-subnav__link:hover { color: var(--muted); }
.prk-subnav__link.active { color: var(--accent); border-bottom-color: var(--accent); }
.prk-subnav__link.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.prk-hero { margin-bottom: 36px; }
.prk-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
.prk-hero h1 span { color: var(--accent); }
.prk-hero p { margin-top: 8px; color: var(--muted-2); font-size: 0.92rem; max-width: 52ch; }

.prk-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.prk-card {
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-radius: 10px;
  padding: 22px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
a.prk-card:hover {
  border-color: rgba(232, 184, 74, 0.35);
  transform: translateY(-2px);
}
.prk-card__tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}
.prk-card__title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.prk-card__desc { font-size: 0.85rem; color: var(--muted-2); line-height: 1.5; }
.prk-card.disabled { opacity: 0.45; pointer-events: none; }

.search-wrap { max-width: 640px; margin: 0 auto 24px; }
.search-row { display: flex; gap: 8px; flex-wrap: wrap; }
.search-row input,
.search-row select {
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.92rem;
  padding: 12px 14px;
  font-family: inherit;
}
.search-row input { flex: 1; min-width: 180px; }
.search-row input:focus,
.search-row select:focus {
  outline: none;
  border-color: rgba(232, 184, 74, 0.45);
}
.search-row button {
  background: var(--accent);
  color: #0a0a10;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 12px 20px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}
.search-row button:hover { opacity: 0.9; }
.search-row button:disabled { opacity: 0.5; cursor: not-allowed; }

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.filter-row select,
.filter-row input[type="number"] {
  width: auto;
  min-width: 100px;
  font-size: 0.82rem;
  padding: 8px 10px;
}

.search-notice {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--muted-2);
  text-align: center;
}
.search-notice a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.results-meta {
  font-size: 0.78rem;
  color: var(--muted-2);
  margin-bottom: 12px;
  text-align: center;
}

.item-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.item-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-radius: 8px;
  padding: 14px 18px;
  transition: border-color 0.2s, background 0.2s;
}
a.item-row:hover {
  border-color: rgba(232, 184, 74, 0.3);
  background: rgba(255,255,255,0.02);
}
.item-row__name { font-weight: 500; color: var(--text); }
.item-row__meta { font-size: 0.78rem; color: var(--muted-2); margin-top: 2px; }
.item-row__ql {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}
.item-row__class {
  font-size: 0.72rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 72px;
  text-align: right;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.pagination button {
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  color: var(--muted);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
}
.pagination button:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination span { font-size: 0.82rem; color: var(--muted-2); }

.msg { color: var(--muted-2); font-size: 0.9rem; padding: 24px 0; text-align: center; }
.msg.error { color: #f07070; }
.msg.center { text-align: center; }

.item-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.item-header__text { flex: 1; min-width: 0; }
.item-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 8px; }
.item-icons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.item-icon {
  image-rendering: pixelated;
  border-radius: 4px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--surface-edge);
}
.item-icon--main { width: 48px; height: 48px; }
.item-icon--effect { width: 32px; height: 32px; opacity: 0.95; }

.prop-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.88rem;
}
.prop-table th,
.prop-table td {
  border: 1px solid var(--surface-edge);
  padding: 8px 12px;
  text-align: left;
}
.prop-table th {
  color: var(--muted);
  font-weight: 500;
  width: 38%;
  background: rgba(0,0,0,0.2);
}

.effect-group { margin-bottom: 16px; }
.effect-group__head {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.effect-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.effect-list li {
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-radius: 6px;
  font-size: 0.88rem;
}

.raw-stats {
  margin-top: 24px;
  color: var(--muted-2);
  font-size: 0.82rem;
}
.raw-stats summary { cursor: pointer; margin-bottom: 8px; }
.stat-line--raw { opacity: 0.85; }

.item-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--muted-2);
}
.item-badge {
  display: inline-block;
  background: var(--accent-dim);
  border: 1px solid rgba(232, 184, 74, 0.25);
  color: var(--accent);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.item-desc {
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-radius: 8px;
  padding: 18px 20px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
  line-height: 1.65;
}

.section-head {
  font-size: 0.68rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--surface-edge);
}
.section-head:first-of-type { margin-top: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.85rem;
}
.stat-line__name { color: var(--muted); }
.stat-line__value { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 500; }

.spell-block {
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}
.spell-block strong { color: var(--text); display: block; margin-bottom: 4px; }

.prk-footer {
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--surface-edge);
  text-align: center;
}
.prk-footer__mark {
  font-family: "Press Start 2P", ui-monospace, monospace;
  font-size: 0.55rem;
  color: rgba(255,255,255,0.25);
  margin-bottom: 12px;
}
.prk-footer__nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 10px;
}
.prk-footer__nav a { font-size: 0.78rem; color: var(--muted-2); transition: color 0.2s; }
.prk-footer__nav a:hover { color: var(--muted); }
.prk-footer__copy { font-size: 0.72rem; color: var(--muted-2); }

@media (max-width: 560px) {
  .item-row { grid-template-columns: 1fr; gap: 4px; }
  .item-row__class { text-align: left; }
}
