/* public/css/style.css
   Theme aligned with yugenrp.com — pure black backdrop with radial purple/blue
   glows, Barlow italic uppercase typography, glass cards, gradient accents. */

@font-face {
  font-family: 'Barlow';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url(/wiki/fonts/barlow-600-italic-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url(/wiki/fonts/barlow-800-italic-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/wiki/fonts/barlow-600-normal-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/wiki/fonts/barlow-800-normal-latin.woff2) format('woff2');
}

:root {
  --yugen-naruto: #cc4b00;
  --yugen-bc: #57d24b;
  --yugen-ds: #cb3aff;
  --yugen-discord: #00aaff;
  --yugen-black: #111111;

  --white: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.55);
  --text-faint: rgba(255, 255, 255, 0.30);

  --display: 'Barlow', system-ui, -apple-system, Segoe UI, sans-serif;

  --added:    #57d24b;
  --modified: #00aaff;
  --fixed:    #f59e0b;
  --removed:  #ef4444;

  --glass-bg: rgba(17, 17, 17, 0.55);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --glass-border-strong: 1px solid rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}
/* Pin the footer to the viewport bottom on short pages. Without this it
   floats up immediately after the last block of content, leaving a black
   gap below. SvelteKit wraps nav/main/footer in a `<div style="display:
   contents">` hydration shell, so the body > main selector misses — match
   either form. */
body { display: flex; flex-direction: column; }
body > main,
body > div > main { flex: 1 0 auto; }

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(203, 58, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(0, 170, 255, 0.06), transparent 60%),
    #000;
  background-attachment: fixed;
  color: var(--white);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* lg+ topbar is fixed (matches yugenrp.com) — pad content so it isn't hidden. */
@media (min-width: 1024px) {
  body { padding-top: 88px; }
}

a { color: inherit; }

::selection {
  background: rgba(203, 58, 255, 0.35);
  color: #fff;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--yugen-ds), var(--yugen-naruto));
  border-radius: 10px;
}

/* --- Embedded site nav (1:1 match with yugenrp.com Header.svelte) ------- */
.nav-links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 8px 24px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 24px; /* lg:gap-6 */
  border-radius: 999px;
}
@media (min-width: 1280px) { .nav-links { gap: 48px; /* xl:gap-12 */ } }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-links li { list-style: none; }
.nav-links a {
  position: relative;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.5rem; /* text-2xl */
  white-space: nowrap;
  text-decoration: none;
  color: #fff;
  opacity: 0.5;
  transition: all 0.3s ease;
}
@media (min-width: 1280px) { .nav-links a { font-size: 1.75rem; /* xl:text-[28px] */ } }
.nav-links a:hover { opacity: 0.9; transform: translateY(-2px); }
.nav-links a.active { opacity: 1; transform: none; }
.nav-active-bar {
  position: absolute;
  left: 0; right: 0; bottom: -4px; /* -bottom-1 */
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yugen-naruto), var(--yugen-ds), var(--yugen-bc));
}

/* --- Login page --------------------------------------------------------- */
.login-screen {
  min-height: calc(100vh - 250px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.login-card {
  max-width: 460px;
  width: 100%;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 48px 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.login-card h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 2.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  background: linear-gradient(90deg, #fff, rgba(203, 58, 255, 0.85));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-sub {
  color: var(--text-dim);
  font-family: var(--display);
  font-weight: 600;
  margin: 0 0 32px;
}
.login-cta { font-size: 1.05rem; padding: 14px 28px; }

/* --- Topbar -------------------------------------------------------------- */
/* Sticky-on-mobile / fixed-on-lg+ — same breakpoint logic as yugenrp.com.
   On mobile the bar follows scroll only when sticky positioning lets it (it
   doesn't with `relative`, so use `relative` to mimic yugen's mobile state). */
.topbar {
  position: relative;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px; /* mobile h-[64px] */
  padding: 0 max(16px, calc((100vw - 1920px) / 2)); /* matches max-w-[1920px] mx-auto + px-4 sm:px-6 lg:px-8 */
  background: rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(40px); /* backdrop-blur-2xl */
  -webkit-backdrop-filter: blur(40px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
@media (min-width: 640px)  { .topbar { height: 88px; padding-left: max(24px, calc((100vw - 1920px) / 2)); padding-right: max(24px, calc((100vw - 1920px) / 2)); } } /* sm:h-[88px], sm:px-6 */
@media (min-width: 1024px) { .topbar { position: fixed; left: 0; right: 0; padding-left: max(32px, calc((100vw - 1920px) / 2)); padding-right: max(32px, calc((100vw - 1920px) / 2)); } } /* lg:fixed, lg:px-8 */
.nav-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* gap-2 */
  flex-shrink: 0;
  text-decoration: none;
  position: relative;
}
.brand-logo { /* size-10 sm:size-12 lg:size-16 — exactly matches yugenrp.com */
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: filter 0.3s ease;
}
@media (min-width: 640px)  { .brand-logo { width: 48px; height: 48px; } }
@media (min-width: 1024px) { .brand-logo { width: 64px; height: 64px; } }
.brand::after { content: none; } /* underline moved to .nav-active-bar */
.brand:hover { filter: brightness(1.1); }

.btn-back {
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.875rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  opacity: 0.7;
}
.btn-back:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.875rem;
}
.user-chip img { width: 22px; height: 22px; border-radius: 50%; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(90deg, var(--yugen-discord), var(--yugen-ds));
  border-color: transparent;
  color: var(--white);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.btn-primary:hover { box-shadow: 0 10px 32px -8px rgba(203, 58, 255, 0.55); filter: brightness(1.1); }
.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--white); border-color: rgba(255, 255, 255, 0.18); }
.btn-steam {
  background: linear-gradient(90deg, var(--yugen-discord), #0066cc);
  border-color: transparent;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.btn-steam:hover { box-shadow: 0 10px 32px -8px rgba(0, 170, 255, 0.55); filter: brightness(1.1); }
.btn-small { padding: 6px 12px; font-size: 0.85rem; }
.btn-danger {
  background: linear-gradient(90deg, #ef4444, #b91c1c);
  border-color: transparent;
}
.btn-danger:hover { box-shadow: 0 8px 24px -8px rgba(239, 68, 68, 0.55); filter: brightness(1.08); }

/* --- Layout -------------------------------------------------------------- */
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 56px clamp(16px, 4vw, 48px) 120px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.page-header-text { display: flex; flex-direction: column; gap: 6px; }
.page-header h1 {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1;
  background: linear-gradient(90deg, #fff 0%, #fff 60%, rgba(203, 58, 255, 0.85) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle {
  color: var(--text-dim);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
}

/* --- Filters ------------------------------------------------------------- */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 14px;
  border-radius: 18px;
  border: var(--glass-border);
  margin-bottom: 32px;
}
.filters select,
.filters input[type="search"],
.filters input[type="text"],
.filters input[type="date"] {
  flex: 1;
  min-width: 160px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.filters select:focus,
.filters input:focus { border-color: var(--yugen-ds); background: rgba(0, 0, 0, 0.55); }

/* --- Version cards ------------------------------------------------------- */
.version-card {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: var(--glass-border);
  border-radius: 22px;
  padding: 28px;
  margin-bottom: 22px;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.version-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px -20px rgba(203, 58, 255, 0.25);
}
.version-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.server-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--white);
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.5);
}
.version-number {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  color: var(--yugen-discord);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-current {
  background: linear-gradient(90deg, var(--yugen-bc), #2fb024);
  color: var(--white);
  font-family: var(--display);
  font-style: italic;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.version-date {
  color: var(--text-faint);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.875rem;
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.version-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--white);
  margin: 6px 0 22px;
  line-height: 1.1;
}

.change-group {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 22px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--yugen-discord);
}
.change-added    { border-color: var(--added);    color: var(--added);    }
.change-modified { border-color: var(--modified); color: var(--modified); }
.change-fixed    { border-color: var(--fixed);    color: var(--fixed);    }
.change-removed  { border-color: var(--removed);  color: var(--removed);  }

.change-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.change-list > li {
  padding: 12px 0 12px 22px;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
}
.change-list > li:first-child { border-top: none; }
.change-list > li::before {
  content: '›';
  color: var(--yugen-ds);
  position: absolute;
  left: 4px;
  top: 12px;
  font-weight: 800;
  font-style: italic;
}
.entry-content { word-break: break-word; }
.entry-content p { margin: 0 0 6px; }
.entry-content p:last-child { margin-bottom: 0; }
.entry-content a {
  color: var(--yugen-discord);
  text-decoration: underline;
  text-decoration-color: rgba(0, 170, 255, 0.4);
}
.entry-content a:hover { text-decoration-color: var(--yugen-discord); }
.entry-content strong { font-weight: 800; color: var(--white); }
.entry-content code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(203, 58, 255, 0.25);
  padding: 1px 6px;
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  font-weight: 500;
}
.entry-content pre {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 16px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.875rem;
}
.entry-content pre code { background: none; border: none; padding: 0; }
.entry-content blockquote {
  border-left: 3px solid var(--yugen-ds);
  margin: 8px 0;
  padding: 6px 14px;
  color: var(--text-dim);
  background: rgba(203, 58, 255, 0.06);
  border-radius: 0 10px 10px 0;
}

/* --- Entry media --------------------------------------------------------- */
.entry-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.media-item {
  margin: 0;
  border: var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.media-item:hover { transform: translateY(-2px); border-color: rgba(203, 58, 255, 0.4); }
.media-item img,
.media-item video {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #000;
}
.media-item figcaption {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.empty {
  text-align: center;
  color: var(--text-dim);
  font-family: var(--display);
  font-weight: 600;
  padding: 48px 20px;
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: 18px;
}

/* --- Language picker ----------------------------------------------------- */
.lang-picker { position: relative; display: inline-block; }
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lang-trigger:hover { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.18); }
.lang-trigger .lang-flag { height: 14px; width: auto; border-radius: 2px; display: block; }
.lang-trigger .lang-chevron {
  width: 12px;
  height: 12px;
  color: rgba(255, 255, 255, 0.6);
  transition: transform 0.2s ease;
}
.lang-picker.open .lang-trigger .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  z-index: 60;
  overflow: hidden;
}
.lang-menu li { margin: 0; }
.lang-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--white);
  text-decoration: none;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.15s ease;
}
.lang-item:hover { background: rgba(255, 255, 255, 0.06); }
.lang-item.active { background: rgba(255, 255, 255, 0.10); }
.lang-item .lang-flag { height: 15px; width: auto; border-radius: 2px; display: block; }
.lang-item .lang-check { width: 16px; height: 16px; color: var(--yugen-bc); margin-left: auto; }

/* --- Admin table --------------------------------------------------------- */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: var(--glass-border);
  border-radius: 18px;
  overflow: hidden;
  font-family: var(--display);
}
.admin-table th,
.admin-table td {
  padding: 14px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
  font-weight: 600;
}
.admin-table thead th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--yugen-ds);
  font-style: italic;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.admin-table tbody tr:hover { background: rgba(203, 58, 255, 0.05); }
.admin-table .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.translation-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 170, 255, 0.12);
  border: 1px solid rgba(0, 170, 255, 0.3);
  color: var(--yugen-discord);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.translation-badge-empty {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--text-faint);
}

/* --- Admin form (edit.ejs) ---------------------------------------------- */
.edit-form {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: var(--glass-border);
  border-radius: 20px;
  padding: 28px;
}
.edit-form h2 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--white);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.edit-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.edit-form input,
.edit-form select,
.edit-form textarea {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  outline: none;
  text-transform: none;
  letter-spacing: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.edit-form input:focus,
.edit-form select:focus,
.edit-form textarea:focus { border-color: var(--yugen-ds); background: rgba(0, 0, 0, 0.55); }
.edit-form textarea { resize: vertical; min-height: 100px; }

.checkbox {
  flex-direction: row !important;
  align-items: center;
  font-weight: 600 !important;
  color: var(--white) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.checkbox input { width: 16px; height: 16px; }

.hint, .hint-inline {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--display);
  text-transform: none;
  letter-spacing: 0;
}

/* --- Lang tabs ----------------------------------------------------------- */
.lang-tabs-container {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 20px;
}
.lang-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.lang-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-tab:hover { border-color: rgba(255, 255, 255, 0.20); color: var(--white); }
.lang-tab.active {
  background: linear-gradient(90deg, var(--yugen-discord), var(--yugen-ds));
  border-color: transparent;
  color: var(--white);
}
.lang-panel { display: none; }
.lang-panel.active { display: block; }
.required-mark { color: #f59e0b; }
.translation-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--yugen-bc);
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
}

/* --- Entry block (admin edit) ------------------------------------------- */
.entry-block {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
}
.entry-block-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  align-items: center;
}
.media-section { margin-top: 12px; }
.media-upload-label {
  display: inline-block;
  padding: 8px 16px;
  border: 1px dashed rgba(203, 58, 255, 0.4);
  border-radius: 12px;
  cursor: pointer;
  color: var(--yugen-ds);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.media-upload-label:hover { background: rgba(203, 58, 255, 0.08); border-color: var(--yugen-ds); }
.media-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.media-preview {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.5);
}
.media-preview img,
.media-preview video {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #000;
}
.media-preview-info {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.media-preview-info input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: var(--display);
}
.media-preview-info small { color: var(--text-faint); font-size: 0.75rem; }

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* EasyMDE override to match dark theme */
.EasyMDEContainer .CodeMirror {
  background: rgba(0, 0, 0, 0.5) !important;
  color: var(--white) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
}
.editor-toolbar {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-bottom: none !important;
  border-radius: 12px 12px 0 0 !important;
}
.editor-toolbar button { color: var(--text-dim) !important; }
.editor-toolbar button:hover {
  background: rgba(203, 58, 255, 0.15) !important;
  color: var(--white) !important;
  border-color: transparent !important;
}
.editor-preview, .editor-preview-side {
  background: rgba(0, 0, 0, 0.85) !important;
  color: var(--white) !important;
}

/* --- Lightbox ------------------------------------------------------------ */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
#lightbox.open { display: flex; flex-direction: column; gap: 14px; }
#lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(203, 58, 255, 0.25);
  cursor: default;
}
.lightbox-caption {
  display: none;
  max-width: 80ch;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white);
  opacity: 0.85;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.5);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: var(--yugen-ds);
  color: var(--yugen-ds);
}

.lightbox-link img { cursor: zoom-in; transition: transform 0.4s ease; }
.lightbox-link:hover img { transform: scale(1.02); }

/* --- Footer -------------------------------------------------------------- */
.footer {
  position: relative;
  text-align: center;
  padding: 32px 20px 40px;
  margin-top: 60px;
  color: var(--text-faint);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer::before {
  content: '';
  display: block;
  height: 1px;
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto 28px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}
.footer p { margin: 0; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 768px) {
  .topbar { height: 64px; padding-left: 16px; padding-right: 16px; }
  .brand { font-size: 1.15rem; }
  .container { padding: 28px 14px 60px; }
  .page-header h1 { font-size: 1.8rem; }
  .version-card { padding: 20px; }
  .version-title { font-size: 1.2rem; }
  .admin-table { font-size: 0.85rem; }
  .admin-table th, .admin-table td { padding: 10px 8px; }
}
