/* Powered by INKRAH.com | Developed by INKRAH Web Design | https://inkrah.com */

:root {
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,.12);
  --transition: all .2s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-sans); background: var(--bg); color: var(--text);
  transition: background .3s ease, color .3s ease; line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: var(--surface); box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 100;
}
.site-header .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.3rem; }
.site-header .brand img { height: 36px; }

/* --- Hamburger trigger (mobile AND desktop) --- */
.hamburger-btn {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--chip); cursor: pointer; padding: 0 9px; flex-shrink: 0;
}
.hamburger-btn span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: var(--transition); }
.hamburger-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Dropdown menu panel, with separated sections --- */
.nav-panel {
  position: absolute; top: calc(100% + 8px); right: 24px; width: 280px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; z-index: 60;
  display: none; flex-direction: column; gap: 4px;
  max-height: calc(100vh - 90px); overflow-y: auto;
}
.nav-panel.open { display: flex; }
.nav-section { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.nav-section-title {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); font-weight: 700;
}
.nav-section a {
  color: var(--text); padding: 8px 10px; border-radius: 8px; transition: var(--transition);
}
.nav-section a:hover { background: var(--chip); text-decoration: none; }
.nav-divider { border: none; border-top: 1px solid var(--border); margin: 12px 0; }

.nav-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.25);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 90;
}
.nav-overlay.open { display: block; }

.search-box { position: relative; }
.search-box input {
  padding: 8px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); width: 100%;
}
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70;
  list-style: none; margin: 0; padding: 6px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow);
  max-height: 260px; overflow-y: auto;
}
.search-results li a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text); }
.search-results li a:hover { background: var(--chip); text-decoration: none; }
.search-results .search-no-results { padding: 8px 10px; color: var(--text-muted); font-size: .85rem; }
.search-results .search-see-all { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 6px; }
.search-results .search-see-all a { font-weight: 600; color: var(--accent); }

.search-page-form { display: flex; gap: 10px; max-width: 480px; margin: 16px 0 30px; }
.search-page-form input {
  flex: 1; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}

.entries-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.lang-filter-form select {
  padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.lang-tag {
  display: inline-block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
  background: var(--chip); color: var(--text-muted); padding: 2px 8px; border-radius: 999px; margin-bottom: 6px;
}
.footer-pages { margin: 10px 0; font-size: .85rem; }

.footer-social { display: flex; justify-content: center; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--chip);
  color: var(--text); transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover {
  transform: translateY(-3px) scale(1.08);
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.22), 0 0 16px var(--accent);
  text-decoration: none;
}

/* --- Animated gradient accents (optional, works across every theme
   because it draws purely from each theme's own --accent variables) --- */
.gradient-bg {
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 300% 300%;
  animation: inkrahGradientFlow 14s ease infinite;
}
@keyframes inkrahGradientFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .gradient-bg { animation: none; background-position: 0% 50%; }
}

.mode-switch {
  border: none; background: var(--chip); color: var(--text); border-radius: 999px;
  padding: 6px 12px; cursor: pointer; transition: var(--transition); font-size: .85rem;
}
.mode-switch:hover { filter: brightness(1.1); }

select.theme-select {
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); width: 100%;
}

main.container { max-width: 1180px; margin: 0 auto; padding: 28px; }

.hero {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; padding: 48px 32px; border-radius: var(--radius); margin-bottom: 32px;
}
.hero h1 { margin: 0 0 8px; font-family: var(--font-serif); font-size: 2.2rem; }
.hero p { opacity: .92; max-width: 620px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 20px; }
.article-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: var(--transition);
}
.article-card:hover { transform: translateY(-4px); }
.article-card img { width: 100%; height: 150px; object-fit: cover; }
.article-card .body { padding: 14px 16px; }
.article-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.article-card p { font-size: .9rem; color: var(--text-muted); }

.article-view { background: var(--surface); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.article-view h1 { font-family: var(--font-serif); }
.article-view figure { margin: 20px 0; }
.article-view figcaption { color: var(--text-muted); font-size: .85rem; text-align: center; margin-top: 6px; }
.article-view .meta { color: var(--text-muted); font-size: .85rem; margin-bottom: 20px; }
.article-body a.auto-link, .article-body a {
  color: var(--accent); text-decoration-color: transparent; border-bottom: 1px dotted var(--accent);
  transition: var(--transition);
}
.article-body a.auto-link:hover, .article-body a:hover {
  border-bottom-style: solid; text-decoration: none;
}

/* Every image pasted into article/page content is forced responsive —
   no more horizontal scrolling — with an elegant shadow + theme-coloured
   glow, since all images here are external URLs (never raw uploads). */
.article-body img, .editor-area img {
  max-width: 100%; height: auto; display: block; margin: 22px auto;
  border-radius: 10px; cursor: zoom-in;
  box-shadow: 0 8px 20px rgba(0,0,0,.25), 0 0 22px var(--accent);
  transition: transform .3s ease, box-shadow .3s ease;
}
.article-body img:hover {
  transform: scale(1.015);
  box-shadow: 0 10px 26px rgba(0,0,0,.3), 0 0 32px var(--accent);
}
.auto-wiki-link { border-bottom: 1px dotted var(--accent); }

.editor-toolbar { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; align-items: center; }
.editor-toolbar button {
  border: 1px solid var(--border); background: var(--chip); color: var(--text);
  padding: 6px 10px; border-radius: 6px; cursor: pointer;
}
.editor-toolbar .format-select {
  border: 1px solid var(--border); background: var(--chip); color: var(--text);
  padding: 6px 10px; border-radius: 6px; cursor: pointer;
}
.editor-area[contenteditable] {
  min-height: 320px; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; background: var(--bg); color: var(--text);
}
.editor-area strike-double, .editor-area .strike-double, .article-body .strike-double {
  text-decoration-line: line-through; text-decoration-style: double;
}
.editor-area .content-figure, .article-body .content-figure {
  margin: 22px auto; text-align: center;
}
.editor-area .content-figure figcaption, .article-body .content-figure figcaption {
  color: var(--text-muted); font-size: .85rem; margin-top: 8px; font-style: italic;
}
.editor-area .footnotes-list, .article-body .footnotes-list {
  font-size: .85rem; color: var(--text-muted); padding-left: 20px;
}
.editor-area .footnotes-separator, .article-body .footnotes-separator {
  border: none; border-top: 1px solid var(--border); margin: 30px 0 14px;
}
.footnote-ref a, .footnote-back { text-decoration: none; }

.dashboard { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.dashboard aside { background: var(--surface); padding: 20px; }
.dashboard aside a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); }
.dashboard aside a.active, .dashboard aside a:hover { background: var(--chip); text-decoration: none; }
.dashboard section { padding: 28px; }

table.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
table.data-table th, table.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.badge { padding: 3px 9px; border-radius: 999px; font-size: .75rem; }
.badge-active { background: #1f9d55; color: #fff; }
.badge-suspended { background: #b91c1c; color: #fff; }
.badge-pending { background: #b7791f; color: #fff; }

.btn { display: inline-block; padding: 9px 18px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-danger { background: #b91c1c; color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }

form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .9rem; }
form input, form select, form textarea {
  width: 100%; padding: 9px 12px; margin-top: 6px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: inherit;
}

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; }
.alert-error { background: #fde2e2; color: #7f1d1d; }
.alert-success { background: #d9f7e6; color: #065f46; }

.install-wrap { max-width: 760px; margin: 40px auto; padding: 32px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.install-form fieldset { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; padding: 16px; }
.install-form legend { padding: 0 8px; font-weight: 700; }

.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.admin-login-card {
  width: 100%; max-width: 380px; background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px 32px; text-align: center;
}
.admin-login-logo { max-height: 56px; max-width: 200px; margin-bottom: 14px; filter: drop-shadow(0 3px 8px rgba(0,0,0,.25)); }
.admin-login-card h1 { margin: 0 0 4px; font-size: 1.3rem; }
.admin-login-subtitle { color: var(--text-muted); font-size: .9rem; margin-bottom: 20px; }
.admin-login-card form { text-align: left; }
.admin-login-back { display: inline-block; margin-top: 18px; font-size: .85rem; color: var(--text-muted); }

/* --- Every image inside article/page content: forced responsive,
   never causing horizontal overflow, with an elegant shadow + glow --- */
.article-body img, .editor-area img, .article-view figure img {
  max-width: 100%; height: auto; display: block; margin: 22px auto;
  border-radius: 12px; transition: transform .25s ease, filter .25s ease;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.25)) drop-shadow(0 0 10px var(--accent));
}
.article-body img:hover, .article-view figure img:hover {
  transform: scale(1.015);
  filter: drop-shadow(0 8px 22px rgba(0,0,0,.3)) drop-shadow(0 0 18px var(--accent));
}

.site-footer { text-align: center; padding: 30px; color: var(--text-muted); font-size: .85rem; }
.inkrah-credit a { font-weight: 600; }

.footer-logo-wrap { display: flex; justify-content: center; margin-bottom: 18px; perspective: 700px; }
.footer-logo {
  max-height: 77%; max-width: 77%; width: auto; height: auto; object-fit: contain;
  cursor: pointer; will-change: transform, filter;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.28)) drop-shadow(0 0 12px var(--accent));
  transition: transform .2s ease-out, filter .3s ease;
  animation: footerLogoGlow 3.4s ease-in-out infinite;
}
.footer-logo:hover {
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.32)) drop-shadow(0 0 22px var(--accent));
}
@keyframes footerLogoGlow {
  0%, 100% { filter: drop-shadow(0 4px 10px rgba(0,0,0,.28)) drop-shadow(0 0 10px var(--accent)); }
  50%      { filter: drop-shadow(0 4px 10px rgba(0,0,0,.28)) drop-shadow(0 0 20px var(--accent)); }
}
@media (prefers-reduced-motion: reduce) {
  .footer-logo { animation: none; transition: none; }
}

@media (max-width: 768px) {
  .dashboard { grid-template-columns: 1fr; }
  .nav-panel { right: 12px; left: 12px; width: auto; }
}
