﻿@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;800&family=Rajdhani:wght@400;500;600;700&display=swap");

:root {
  --bg: #0a0a0d;
  --bg-2: #131218;
  --panel: #1a181d;
  --panel-2: #221f27;
  --panel-3: #2a2530;
  --text: #efe8d8;
  --muted: #b6ab96;
  --line: #4a3f33;
  --line-soft: #3a3127;
  --accent: #d4a23d;
  --accent-2: #8f5f25;
  --danger: #b8422f;
  --ok: #4a9d5a;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  --noise: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%),
    linear-gradient(315deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%);
}

body.light , html.light body {
  --bg: #ded7c8;
  --bg-2: #efe9db;
  --panel: #f7f1e3;
  --panel-2: #efe6d4;
  --panel-3: #e5d9c4;
  --text: #2d2418;
  --muted: #665744;
  --line: #b39d7f;
  --line-soft: #cdb99a;
  --accent: #9a621f;
  --accent-2: #d39a3f;
  --danger: #a0362d;
  --ok: #2f7d3f;
  --shadow: 0 10px 22px rgba(53, 34, 14, 0.2);
  --noise: linear-gradient(135deg, rgba(0, 0, 0, 0.03) 25%, transparent 25%),
    linear-gradient(225deg, rgba(0, 0, 0, 0.03) 25%, transparent 25%),
    linear-gradient(45deg, rgba(0, 0, 0, 0.03) 25%, transparent 25%),
    linear-gradient(315deg, rgba(0, 0, 0, 0.03) 25%, transparent 25%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Rajdhani", "Trebuchet MS", sans-serif;
  letter-spacing: 0.2px;
  background:
    radial-gradient(circle at 20% 0%, rgba(212, 162, 61, 0.12), transparent 35%),
    radial-gradient(circle at 95% 25%, rgba(143, 95, 37, 0.2), transparent 38%),
    var(--noise),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-size: auto, auto, 12px 12px, auto;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.5)),
    linear-gradient(120deg, #1c1a20, #111014);
  backdrop-filter: blur(6px);
}

body.light .topbar , html.light body .topbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.56)),
    linear-gradient(120deg, #f2ead7, #e5dac5);
}

.topbar-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  border: 1px solid rgba(255, 227, 170, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 236, 198, 0.35), var(--shadow);
}

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

.nav a,
.theme-toggle {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-3), var(--panel));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 226, 168, 0.1);
  transition: 0.18s ease;
}

.nav a:hover,
.theme-toggle:hover {
  border-color: var(--accent);
  color: #fff0cc;
  transform: translateY(-1px);
}

body.light .nav a:hover,
body.light .theme-toggle:hover,
html.light body .nav a:hover,
html.light body .theme-toggle:hover {
  color: #3d2a10;
}

.is-active {
  border-color: var(--accent);
  outline: 1px solid rgba(212, 162, 61, 0.35);
}

.theme-toggle {
  cursor: pointer;
}

.flash {
  margin-top: 14px;
  border: 1px solid rgba(74, 157, 90, 0.6);
  background: rgba(20, 66, 31, 0.44);
  border-radius: 10px;
  padding: 12px 14px;
}

body.light .flash , html.light body .flash {
  background: rgba(82, 169, 98, 0.15);
}

.hero {
  padding: 24px 0 16px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(41, 34, 26, 0.66), rgba(19, 18, 23, 0.88)),
    var(--noise),
    linear-gradient(130deg, #292223, #1b1920);
  box-shadow: var(--shadow);
}

body.light .hero-card , html.light body .hero-card {
  background:
    linear-gradient(180deg, rgba(245, 238, 224, 0.94), rgba(232, 222, 204, 0.94)),
    var(--noise);
}

.hero-copy {
  padding: 28px;
}

.eyebrow {
  display: inline-block;
  font-family: "Cinzel", serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #f1c873;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 162, 61, 0.45);
  background: rgba(88, 58, 21, 0.35);
  margin-bottom: 12px;
}

body.light .eyebrow , html.light body .eyebrow {
  color: #8e5917;
  background: rgba(212, 162, 61, 0.14);
}

.hero h1,
.section-head h2,
.article h1,
.admin-main h1,
.panel h3,
h2,
h3 {
  font-family: "Cinzel", serif;
  letter-spacing: 0.5px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4.2vw, 56px);
  line-height: 1.05;
}

.hero-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-visual {
  min-height: 300px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.68)),
    url("https://images.unsplash.com/photo-1542751371-adc38448a05e?auto=format&fit=crop&w=1200&q=80") center/cover;
  border-left: 1px solid var(--line-soft);
}

.section {
  padding: 16px 0 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
}

.btn,
.btn-ghost,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.18s ease;
}

.btn {
  color: #fff5db;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-color: rgba(255, 232, 193, 0.24);
}

.btn-ghost {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border-color: var(--line);
}

.btn-danger {
  color: #ffe9e5;
  background: linear-gradient(180deg, #cf4a35, #8b2d20);
  border-color: rgba(255, 199, 189, 0.3);
}

.btn:hover,
.btn-ghost:hover,
.btn-danger:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.post-card,
.panel,
.article,
.admin-nav,
.admin-main,
.login-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, var(--panel-2), var(--panel)),
    var(--noise);
  box-shadow: var(--shadow);
}

.post-card {
  overflow: hidden;
  transition: 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.post-card.is-featured {
  position: relative;
}

.post-card.is-featured .post-body,
.post-card.is-featured .post-cover {
  position: relative;
  z-index: 1;
}

.post-card.is-featured--gold {
  border-color: rgba(212, 162, 61, 0.7);
  box-shadow: 0 0 0 1px rgba(212, 162, 61, 0.35), var(--shadow);
}

.post-card.is-featured--gold::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(212, 162, 61, 0.1), rgba(255, 236, 173, 0.58), rgba(212, 162, 61, 0.1));
  background-size: 240% 240%;
  mix-blend-mode: screen;
  animation: featuredBorderPulse 2.8s linear infinite;
  z-index: 0;
}

.post-card.is-featured--hot {
  border: 1px solid rgba(255, 110, 40, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 90, 30, 0.35), 0 0 18px rgba(255, 70, 20, 0.45);
}

.post-card.is-featured--hot::before {
  content: "HOT";
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.8px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #ff7a2f, #d92b1f);
  box-shadow: 0 0 12px rgba(255, 80, 30, 0.65);
  animation: hotPulse 1.2s ease-in-out infinite;
}

.post-card.is-featured--hot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 13px;
  pointer-events: none;
  background: radial-gradient(circle at 30% 20%, rgba(255, 170, 70, 0.18), transparent 45%),
    radial-gradient(circle at 80% 90%, rgba(255, 70, 40, 0.16), transparent 48%);
  animation: emberWave 2.2s linear infinite;
  z-index: 0;
}

.post-card.is-featured--opal {
  border: 1px solid rgba(129, 184, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(176, 210, 255, 0.2), 0 10px 22px rgba(0, 0, 0, 0.32);
}

.post-card.is-featured--opal::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(188, 215, 255, 0.2), rgba(138, 205, 255, 0.46), rgba(188, 215, 255, 0.2));
  background-size: 240% 240%;
  animation: opalFlow 3.4s ease-in-out infinite;
  z-index: 0;
}

.post-cover {
  aspect-ratio: 16/9;
  background: #0d0c10;
}

.post-body {
  padding: 14px;
}

.post-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.post-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.post-card p {
  margin: 0 0 12px;
  line-height: 1.55;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.panel {
  padding: 18px;
}

.content {
  line-height: 1.7;
}

.content img {
  border-radius: 10px;
  margin: 14px 0;
}

.content iframe {
  max-width: 100%;
}

.single {
  padding: 24px 0 32px;
}

.single-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
}

.article {
  padding: 22px;
}

.article h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
}

.article-cover {
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
}

.sidebar .panel {
  position: sticky;
  top: 84px;
}

.admin-shell {
  padding: 22px 0 34px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
}

.admin-nav {
  padding: 14px;
}

.admin-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  margin-bottom: 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.08);
}

.admin-nav a.is-current,
.admin-nav a:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(212, 162, 61, 0.14);
}

.admin-main {
  padding: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.field label {
  font-weight: 700;
}

.input,
.textarea,
.select {
  width: 100%;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.36));
  padding: 11px 12px;
}

body.light .input,
body.light .textarea,
body.light .select,
html.light body .input,
html.light body .textarea,
html.light body .select {
  background: linear-gradient(180deg, #fff, #f5eddc);
}

.textarea {
  min-height: 170px;
  resize: vertical;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.toolbar button,
.rich-toolbar button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(180deg, var(--panel-3), var(--panel));
  color: var(--text);
  padding: 7px 9px;
  cursor: pointer;
}

.toolbar button:hover,
.rich-toolbar button:hover {
  border-color: var(--accent);
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
}

.list-table th,
.list-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(212, 162, 61, 0.5);
  background: rgba(212, 162, 61, 0.14);
  color: #f0c56c;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

body.light .badge , html.light body .badge {
  color: #7d4f15;
}

.empty {
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 20px;
}

.login-wrap {
  padding: 36px 0;
}

.login-card {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.rich-source-hidden {
  display: none;
}

.rich-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.rich-editor {
  min-height: 260px;
  padding: 12px;
  line-height: 1.7;
  outline: none;
}

.rich-editor .img-resizable {
  display: inline-block;
  resize: both;
  overflow: hidden;
  max-width: 100%;
  min-width: 120px;
  min-height: 90px;
  border: 1px dashed rgba(212, 162, 61, 0.45);
  border-radius: 6px;
  margin: 8px 0;
  vertical-align: top;
}

.rich-editor .img-resizable img {
  display: block;
  width: 100%;
  height: 100%;
}

.rich-editor blockquote {
  margin: 14px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(212, 162, 61, 0.12);
}

.image-input {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.12);
}

.image-preview {
  min-height: 66px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
}

.image-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.image-preview.is-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 14px;
}

.image-input-actions {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.footer-brand {
  font-family: "Cinzel", serif;
  font-size: 20px;
  letter-spacing: 0.8px;
  color: #f1c873;
}

@keyframes featuredBorderPulse {
  0% {
    background-position: 0% 50%;
    opacity: 0.6;
  }
  50% {
    background-position: 100% 50%;
    opacity: 1;
  }
  100% {
    background-position: 0% 50%;
    opacity: 0.6;
  }
}

@keyframes hotPulse {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.06);
    filter: brightness(1.2);
  }
}

@keyframes emberWave {
  0% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.55;
  }
}

@keyframes opalFlow {
  0%,
  100% {
    background-position: 0% 50%;
    opacity: 0.55;
  }
  50% {
    background-position: 100% 50%;
    opacity: 0.9;
  }
}

hr.sep {
  border: none;
  border-top: 1px solid var(--line-soft);
  margin: 18px 0;
}

.footer {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.5));
}

.footer-inner {
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-muted {
  color: var(--muted);
}

@media (max-width: 1000px) {
  .hero-card,
  .split,
  .single-wrap,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 220px;
    border-left: none;
    border-top: 1px solid var(--line-soft);
  }

  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
  }

  .nav a,
  .theme-toggle {
    flex: 1 1 auto;
    text-align: center;
  }

  .posts-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 20px;
  }

  .container {
    width: min(1180px, calc(100% - 18px));
  }
}

