@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url("../fonts/vazirmatn-arabic-400-normal.995cd8bfda8c.woff2") format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Vazirmatn; font-weight: 700; font-display: swap; src: url("../fonts/vazirmatn-arabic-700-normal.7946124b2cee.woff2") format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Vazirmatn; font-weight: 800; font-display: swap; src: url("../fonts/vazirmatn-arabic-800-normal.e39b152f735a.woff2") format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url("../fonts/vazirmatn-latin-400-normal.97b491c18ad5.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: Vazirmatn; font-weight: 700; font-display: swap; src: url("../fonts/vazirmatn-latin-700-normal.b57285a381ee.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: Lalezar; font-display: swap; src: url("../fonts/lalezar-arabic-400-normal.ec193a9339b3.woff2") format("woff2"); }

:root {
  --ground: #090c09;
  --surface: #0e130e;
  --card: #121812;
  --line: #26332a;
  --line-strong: #3a4a3d;
  --text: #e8f0e6;
  --text-soft: #c4d2c5;
  --muted: #b2c2b3;
  --neon: #5bff1f;
  --link: #7dff4f;
  --danger: #ff8a7a;
  --display: Lalezar, Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 16px/1.7 Vazirmatn, Tahoma, sans-serif; }
a { color: var(--link); }
a:hover { color: #b4ff96; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }
input, select, textarea, button { font: inherit; }
input[type="text"], input[type="search"], input[type="password"], input[type="file"], select, textarea {
  width: 100%; min-height: 48px; padding: 8px 12px; color: var(--text); background: var(--card); border: 1px solid var(--line-strong); border-radius: 0;
}
input::placeholder { color: #93a595; }

.wrap { max-width: 1320px; margin-inline: auto; padding-inline: 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.display-2 { font: 400 32px/1.2 var(--display); }

.btn, .btn-outline, .btn-danger { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; font-weight: 800; text-decoration: none; cursor: pointer; border: 1px solid var(--neon); }
.btn { color: var(--ground); background: var(--neon); }
.btn:hover { color: var(--ground); background: #8bff63; }
.btn-outline { color: var(--text); background: transparent; border-color: var(--line-strong); font-weight: 700; }
.btn-danger { color: var(--ground); background: var(--danger); border-color: var(--danger); }
.btn-large { min-height: 60px; font-size: 20px; width: 100%; }
.link-button { padding: 0; color: var(--link); background: none; border: 0; text-decoration: underline; cursor: pointer; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font: 400 28px/1 var(--display); }
.brand img { border-radius: 50%; display: block; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a { padding: 10px 14px; color: var(--text); text-decoration: none; }
.site-nav a[aria-current] { color: var(--link); font-weight: 700; border-bottom: 2px solid var(--neon); }
.site-footer { padding-block: 20px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

.hero { border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding-block: 48px; }
.hero-copy { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.eyebrow { color: var(--link); font-weight: 700; text-align: right; }
.hero h1 { font: 400 clamp(44px, 7vw, 84px)/1.1 var(--display); }
.lead { max-width: 560px; color: var(--text-soft); font-size: 18px; }
.hero-logo { flex: 1 1 280px; width: 100%; max-width: 380px; height: auto; margin-inline: auto; display: block; }
.search-field { max-width: 620px; }
.search-field input { min-height: 56px; font-size: 18px; border-color: var(--neon); }
.key-band { height: 14px; background: url("../img/key.e304f7d6ae8a.svg") repeat-x; opacity: .8; }

.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend { font-weight: 700; }

.catalog { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; padding-block: 32px 64px; }
.filters { flex: 1 1 260px; display: flex; flex-direction: column; gap: 28px; }
.filters fieldset { margin: 0; padding: 0; border: 0; }
.filters legend { padding: 0 0 10px; font-weight: 800; }
.player-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; display: block; cursor: pointer; }
.chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; font-size: 14px; background: var(--card); border: 1px solid var(--line-strong); }
.player-grid .chip span { padding: 0; font-size: 16px; font-weight: 700; }
.chip input:checked + span { color: var(--ground); background: var(--neon); border-color: var(--neon); font-weight: 700; }
.chip input:focus-visible + span { outline: 2px solid var(--neon); outline-offset: 2px; }

.catalog-main { position: relative; flex: 999 1 560px; min-width: 0; }
.sort-row { position: absolute; inset-inline-end: 0; top: 0; display: flex; align-items: center; gap: 8px; }
.sort-row label { white-space: nowrap; }
.sort-row select { min-height: 44px; }
#results > .display-2 { min-height: 44px; margin-bottom: 20px; }

.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 20px; }
.map-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); }
.thumb { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #2b2a1e; }
.thumb img, .detail-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-players { position: absolute; top: 10px; inset-inline-start: 10px; padding: 0 8px; font-size: 13px; font-weight: 700; color: var(--text); background: var(--ground); }
.minimap { position: absolute; inset: 0; display: block; background: linear-gradient(135deg, #4a3f29 0 30%, #2f2919 30% 34%, #4a3f29 34% 70%, #5a4e33 70%); }
.minimap span { position: absolute; width: 24px; height: 24px; margin: -12px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--ground); background: var(--neon); }
.map-card-body { flex-grow: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
.map-card-body h3 { font-size: 19px; font-weight: 800; line-height: 1.4; }
.map-card-body h3 a { color: var(--text); text-decoration: none; }
.map-card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 1px 8px; font-size: 12px; color: var(--text-soft); border: 1px solid var(--line-strong); text-decoration: none; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; text-align: center; border: 1px dashed var(--line-strong); font-size: 18px; font-weight: 700; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; padding-top: 28px; }
.pagination a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); text-decoration: none; }

.install { background: var(--surface); border-top: 1px solid var(--line); padding-block: 40px; }
.install-steps { margin: 20px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; }
.install-steps li { display: flex; flex-direction: column; gap: 6px; }
.install-steps strong { color: var(--link); font-size: 18px; }
.path { font-size: 13px; overflow-wrap: anywhere; }

.detail { display: flex; flex-direction: column; gap: 24px; padding-block: 24px 64px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14px; }
.detail-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; }
.detail-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.detail-main h1 { font: 400 clamp(40px, 5vw, 64px)/1.15 var(--display); overflow-wrap: anywhere; }
.detail-main h2 { margin-bottom: 8px; font-size: 22px; font-weight: 800; }
.detail-preview { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line-strong); background: #2b2a1e; }
.detail-preview .minimap span { width: 36px; height: 36px; margin: -18px; font-size: 18px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.gallery img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.prose { max-width: 720px; color: var(--text-soft); }
.prose p + p { margin-top: 12px; }
.detail-install { padding-top: 24px; border-top: 1px solid var(--line); }
.detail-side { flex: 1 1 320px; display: flex; flex-direction: column; gap: 20px; padding: 20px; background: var(--card); border: 1px solid var(--line); }
.detail-side dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 20px; }
.detail-side dt { color: var(--muted); }
.detail-side dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.side-tags { padding-top: 16px; border-top: 1px solid var(--line); }
.side-tags .tag { padding: 4px 10px; font-size: 13px; color: var(--text); }
.notice { padding: 10px 14px; background: var(--card); border: 1px solid var(--neon); }
.message-page { padding-block: 96px; text-align: center; }
.message-page h1 { font: 400 44px/1.2 var(--display); margin-bottom: 12px; }

.panel { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 100vh; }
.panel-side { flex: 1 1 240px; display: flex; flex-direction: column; gap: 20px; padding: 20px; background: var(--surface); border-inline-end: 1px solid var(--line); }
.panel-side .brand { font-size: 24px; gap: 10px; }
.panel-nav { display: flex; flex-direction: column; gap: 4px; }
.panel-nav a { padding: 10px 12px; color: var(--text); text-decoration: none; }
.panel-nav a:hover { color: var(--ground); background: var(--neon); }
.panel-user { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.panel-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; padding: 32px 24px 56px; }
.panel-main h1, .panel-form h1 { font: 400 44px/1.2 var(--display); overflow-wrap: anywhere; }
.panel-main h2 { font-size: 22px; font-weight: 800; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.panel-form { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 20px; }
.panel-form input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--neon); }
.panel-form .field div:has(> div > label) { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.panel-form .field div > label { display: flex; align-items: center; gap: 8px; min-height: 32px; font-weight: 400; }
.permissions { margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line-strong); }
.permissions legend { padding: 0 8px; font-weight: 800; }
.check-row { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 8px 0; cursor: pointer; }
.check-row input[type="checkbox"] { flex: none; margin-top: 5px; }
.check-row > span { display: flex; flex-direction: column; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.remove-images { display: flex; flex-wrap: wrap; gap: 12px; }
.remove-images label { display: flex; align-items: center; gap: 8px; }
.remove-images img { object-fit: cover; display: block; }
.errors { color: var(--danger); font-size: 14px; }
.errors ul { margin: 0; padding: 0; list-style: none; }
.status-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.status-tabs a { padding: 8px 14px; color: var(--text); border: 1px solid var(--line-strong); text-decoration: none; }
.status-tabs a[aria-current] { color: var(--ground); background: var(--neon); border-color: var(--neon); font-weight: 700; }
.table-box { overflow-x: auto; background: var(--card); border: 1px solid var(--line); }
table { width: 100%; min-width: 640px; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--line); }
thead tr { background: var(--surface); }
tbody th { font-weight: 500; }
.row-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.status { padding: 1px 8px; font-size: 13px; border: 1px solid var(--line-strong); }
.status-published { color: var(--link); border-color: var(--neon); }
.status-pending { color: #ffd166; border-color: #ffd166; }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login .panel-form { max-width: 420px; }
.login-logo { align-self: center; border-radius: 50%; }

@media (max-width: 640px) {
  .sort-row { position: static; margin-bottom: 12px; }
  .hero-row { padding-block: 32px; }
}
