/* =========================================================
   Sanguo Saga — Main Stylesheet
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Be+Vietnam+Pro:wght@400;600;700&display=swap');

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: #000;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- CSS Vars ---- */
:root {
  --amber: #f7a11b;
  --amber-dark: #b87514;
  --amber-light: #ffd96b;
  --red-accent: rgba(218,16,34,0.3);
  --container: 1280px;
}

/* ---- Container ---- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1rem; }

/* ---- Blackpast font (fallback serif bold) ---- */
.blackpast {
  font-family: 'Blackpast', 'Georgia', serif;
  font-weight: 900;
  letter-spacing: 0.02em;
}
@font-face {
  font-family: 'Blackpast';
  src: url('/assets/blackpast.otf') format('opentype');
}

/* ---- Header ---- */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(0,0,0,.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .4rem 1rem;
}
.logo-img { height: 52px; width: auto; }
.desktop-nav { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  color: var(--amber);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: opacity .2s;
}
.nav-link:hover { opacity: .7; }

/* Burger */
.burger { display: none; flex-direction: column; gap: 5px; padding: .5rem; }
.burger span { display: block; width: 24px; height: 2px; background: #fff; transition: all .3s; border-radius: 2px; }
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile overlay + drawer */
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 150; }
.mobile-overlay.active { display: block; }
.mobile-drawer {
  position: fixed; inset: 0; background: #000; z-index: 200;
  display: flex; flex-direction: column; padding: 3rem 1.5rem;
  transform: translateX(100%); transition: transform .3s ease;
}
.mobile-drawer.active { transform: none; }
.drawer-close {
  position: absolute; top: .75rem; right: .75rem;
  color: #fff; font-size: 2rem; padding: .5rem;
  transition: color .2s;
}
.drawer-close:hover { color: var(--amber); }
.drawer-link {
  color: #fff; font-size: 1.5rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.1);
  transition: color .2s;
}
.drawer-link:hover { color: var(--amber); }

/* Topup modal */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.8);
  z-index: 500; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: #111; border: 2px solid var(--amber);
  border-radius: 1rem; padding: 2rem; max-width: 420px; width: 90%;
}
.modal-box h3 { color: var(--amber); margin-bottom: .75rem; font-size: 1.2rem; }
.modal-box p { color: rgba(255,255,255,.8); font-size: .9rem; line-height: 1.6; margin-bottom: 1.5rem; }
.modal-btns { display: flex; gap: 1rem; justify-content: flex-end; }
.btn-cancel { padding: .5rem 1.25rem; border-radius: .5rem; background: rgba(255,255,255,.1); color: #fff; }
.btn-agree { padding: .5rem 1.25rem; border-radius: .5rem; background: var(--amber); color: #000; font-weight: 700; }

/* ====== HERO SECTION ====== */
.hero-section {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; overflow: hidden;
}
.hero-bg, .hero-chars {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero-chars { z-index: 1; }
.hero-title {
  position: absolute; top: 9rem; inset-x: 0;
  text-align: center; z-index: 10;
  display: none;
}
@media (min-width: 1024px) { .hero-title { display: block; } }
.hero-title-main {
  font-size: clamp(120px, 14vw, 300px);
  line-height: 1;
  color: #FFC73A;
  -webkit-text-stroke: 3px #A86422;
  display: block;
}
.hero-title-sub {
  font-size: clamp(60px, 7vw, 116px);
  line-height: 1;
  color: #FFEFB0;
  -webkit-text-stroke: 4px #A86422;
  display: block;
}
.hero-title-mobile {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center; z-index: 10; padding: 0 1rem;
  transform: translateY(-5rem);
}
@media (min-width: 1024px) { .hero-title-mobile { display: none; } }
.hero-title-mobile .m-main {
  font-size: clamp(60px, 18vw, 120px);
  color: #FFC73A; -webkit-text-stroke: 2px #A86422; line-height: 1;
}
.hero-title-mobile .m-sub {
  font-size: clamp(50px, 15vw, 120px);
  color: #FFC73A; -webkit-text-stroke: 2px #A86422; line-height: 1;
}
.hero-links {
  position: absolute; bottom: 5%; inset-x: 0; z-index: 10;
}
/* Desktop hero download bar */
.hero-download-bar {
  display: none;
  flex-direction: column; align-items: center;
  gap: .6rem; padding: .4rem;
  backdrop-filter: blur(8px);
  border: 3px solid rgba(255,255,255,.1);
  border-radius: .75rem;
  width: fit-content; margin: 0 auto;
}
@media (min-width: 1024px) { .hero-download-bar { display: flex; flex-direction: row; } }
.hero-download-bar .app-icon { border-radius: 1rem; width: 90px; height: 90px; object-fit: cover; }
.hero-dl-btns { display: flex; flex-direction: column; gap: 4px; }
.hero-dl-btns a { display: block; position: relative; }
.hero-dl-btns img { width: 183px; height: auto; display: block; }
.hero-action-imgs { display: flex; align-items: center; }
.hero-action-imgs img { width: 110px; height: auto; cursor: pointer; }
/* Mobile hero */
.hero-mobile-bar {
  display: flex; align-items: center; gap: .6rem;
  backdrop-filter: blur(20px);
  border: 3px solid rgba(218,16,34,.3);
  border-radius: .75rem;
  width: fit-content; margin: 0 auto;
  padding: 4px;
}
@media (min-width: 1024px) { .hero-mobile-bar { display: none; } }
.hero-mobile-bar img { width: 55px; height: auto; cursor: pointer; }
.hero-mobile-bar .app-icon { width: 65px; height: 65px; border-radius: .75rem; object-fit: cover; margin-left: 4px; }
.hero-mobile-dl {
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
  padding: .75rem 1.25rem 0;
}
@media (min-width: 1024px) { .hero-mobile-dl { display: none; } }
.hero-mobile-dl a img { width: 100%; max-width: 160px; height: auto; }

/* ====== NEWS SECTION ====== */
.news-section {
  position: relative; min-height: 100vh;
}
.news-tower {
  position: absolute; right: 0; bottom: 0; height: 100%; width: auto;
  object-fit: cover; pointer-events: none;
}
.news-fade {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 66%; background: linear-gradient(to bottom, transparent, rgba(0,0,0,.9), #000);
  pointer-events: none;
}
.news-inner {
  position: relative; padding: 5rem 1rem;
  max-width: var(--container); margin: 0 auto;
}
.news-tabs {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem;
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: 1.5rem;
}
.news-tab-btn {
  color: #fff; background: none; transition: color .2s;
  font-size: inherit; font-weight: 900;
  font-family: 'Blackpast','Georgia',serif;
}
.news-tab-btn.active { color: var(--amber-light); text-decoration: underline; }
.news-tab-dot { color: #fff; }
.news-card {
  border-radius: .75rem; border: 3px solid #f59e0b;
  padding: 1.5rem; background: rgba(0,0,0,.8); max-width: 42rem;
}
.news-card img { width: 100%; border-radius: .5rem; display: block; }
.news-list { margin-top: 2rem; border-top: 1px solid rgba(255,255,255,.2); }
.news-list-item {
  padding: .75rem 0 .75rem 1.75rem;
  border-bottom: 1px solid rgba(255,255,255,.2);
  font-weight: 700; position: relative;
  transition: color .2s;
}
.news-list-item:hover { color: var(--amber); }
.news-list-item::before {
  content: '';
  position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  background: url('/images/news/bullet.png') center/contain no-repeat;
}
.news-read-more {
  display: inline-block; margin-top: 1.5rem;
  background: #f59e0b; color: #000; font-weight: 600;
  padding: .5rem 1.25rem; border-radius: .5rem; transition: background .2s;
}
.news-read-more:hover { background: #d97706; color: #fff; }

/* ====== CLASS SYSTEM ====== */
.class-section {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 5rem 1rem;
}
.class-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.class-inner { position: relative; z-index: 2; width: 100%; max-width: 80rem; margin: 0 auto; }
.class-title {
  text-align: center; color: var(--amber-light);
  font-size: clamp(3rem, 8vw, 5rem); margin-bottom: 2.5rem;
}
.class-grid { display: grid; gap: 1.5rem; align-items: center; justify-items: center; }
@media (min-width: 1024px) { .class-grid { grid-template-columns: 1fr 1fr; } }
.class-aura-wrap {
  position: relative; width: min(340px, 80vw); height: min(340px, 80vw);
}
@media (min-width: 1280px) { .class-aura-wrap { width: 600px; height: 600px; } }
.class-aura {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  animation: spinSlow 20s linear infinite, pulse 2s cubic-bezier(.4,0,.6,1) infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.8} }
.class-char { position: relative; z-index: 10; width: 100%; height: 100%; object-fit: cover; }
.class-title-img { width: 100%; max-width: 500px; object-fit: contain; margin-top: -2rem; }
.class-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; position: relative; z-index: 2; margin-top: 1.5rem; }
@media (min-width: 768px) { .class-btns { grid-template-columns: repeat(4,1fr); } }
.class-btn {
  position: relative; cursor: pointer; transition: transform .2s;
}
.class-btn:hover { transform: scale(1.05); }
.class-btn img { width: 100%; display: block; }
.class-btn-label {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  text-align: center; width: 100%;
  background: linear-gradient(to right, #C09645, #FFC977, #C09645);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  font-size: 1.4rem; font-weight: 900; font-family: 'Blackpast','Georgia',serif;
  pointer-events: none; text-transform: capitalize;
}

/* ====== VISUAL GALLERY ====== */
.gallery-section {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; padding: 10rem 1rem;
}
.gallery-fade-top {
  position: absolute; top: 0; inset-x: 0; height: 8rem;
  background: linear-gradient(to bottom, #000, transparent); pointer-events: none;
}
.gallery-fade-bot {
  position: absolute; bottom: 0; inset-x: 0; height: 8rem;
  background: linear-gradient(to top, #000, transparent); pointer-events: none;
}
.gallery-decor-l { position: absolute; top: 20%; left: 0; width: 280px; }
.gallery-decor-r { position: absolute; bottom: 0; right: 0; width: 280px; }
.gallery-inner { position: relative; z-index: 2; width: 100%; max-width: 80rem; margin: 0 auto; }
.gallery-title {
  text-align: center; color: var(--amber-light);
  font-size: clamp(3rem, 8vw, 5.5rem); margin-bottom: 3rem;
}
.gallery-slider {
  background: rgba(0,0,0,.1); backdrop-filter: blur(20px);
  padding: .5rem;
  border-radius: .75rem; border: 3px solid rgba(218,16,34,.3);
  position: relative; overflow: hidden;
}
@media (min-width: 768px) { .gallery-slider { padding: 1.5rem; } }
.gallery-slide-wrap { position: relative; width: 100%; aspect-ratio: 16/9; }
.gallery-slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: .75rem;
  transition: opacity .5s ease-in-out;
  opacity: 0;
}
.gallery-slide.active { opacity: 1; z-index: 2; }
.gallery-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.gallery-dot {
  width: 2.5rem; height: .6rem; border-radius: 9999px;
  border: 1px solid rgba(255,255,255,.2);
  background: transparent; transition: background .2s; cursor: pointer;
}
.gallery-dot.active { background: #fff; }

/* ====== NEWS / GUIDES LISTING ====== */
.page-section {
  position: relative; min-height: 100vh; padding: 6rem 1rem 3rem;
}
.page-bg-fixed {
  position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.page-bg-overlay {
  position: fixed; inset: 0; z-index: 1;
  background: rgba(0,0,0,.75);
}
.page-content { position: relative; z-index: 2; max-width: 72rem; margin: 0 auto; }
.page-back { color: #3b82f6; font-size: .9rem; display: inline-block; margin-bottom: 2rem; }
.page-back:hover { color: #60a5fa; }
.page-h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 3rem; }
.posts-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .posts-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .posts-grid { grid-template-columns: 1fr 1fr 1fr; } }
.post-card {
  border-radius: .75rem; border: 1px solid rgba(218,16,34,.3);
  background: rgba(0,0,0,.8); padding: 1.5rem;
  transition: border-color .2s, background .2s;
  display: block;
}
.post-card:hover { border-color: #da1022; background: rgba(0,0,0,.9); }
.post-card-thumb { width: 100%; height: 12rem; object-fit: cover; border-radius: .5rem; display: block; margin-bottom: 1rem; overflow: hidden; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; }
.post-card-title:hover { color: #3b82f6; }
.post-card-desc { color: rgba(255,255,255,.7); font-size: .85rem; line-height: 1.6; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-meta { font-size: .75rem; color: rgba(255,255,255,.5); }
.empty-state { text-align: center; padding: 5rem 0; color: rgba(255,255,255,.5); font-size: 1.1rem; }

/* ====== POST DETAIL ====== */
.post-article { padding: 6rem 1rem 3rem; position: relative; }
.post-inner { max-width: 52rem; margin: 0 auto; position: relative; z-index: 2; }
.post-header { margin-bottom: 2rem; }
.post-header h1 { font-size: 2rem; font-weight: 500; margin-bottom: .5rem; }
.post-meta { font-size: .85rem; color: rgba(255,255,255,.6); margin-bottom: 2rem; }
.post-body { line-height: 1.8; }
.post-body h2 { font-size: 1.5rem; font-weight: 700; color: var(--amber); margin: 2rem 0 1rem; }
.post-body h3 { font-size: 1.2rem; font-weight: 600; color: var(--amber-light); margin: 1.5rem 0 .75rem; }
.post-body p { margin-bottom: 1rem; }
.post-body img { border-radius: .5rem; margin: 1rem 0; max-width: 100%; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.post-body li { margin-bottom: .4rem; }
.post-body a { color: #3b82f6; text-decoration: underline; }
.post-body blockquote { border-left: 3px solid var(--amber); padding-left: 1rem; color: rgba(255,255,255,.7); margin: 1rem 0; font-style: italic; }
.post-body pre { background: rgba(255,255,255,.05); border-radius: .5rem; padding: 1rem; overflow-x: auto; font-size: .85rem; margin: 1rem 0; }
.post-body code { font-family: monospace; background: rgba(255,255,255,.1); padding: .1em .3em; border-radius: .25em; }
.post-body table,
.post-body figure.table table { width: auto !important; border-collapse: collapse !important; margin: 1.25rem 0 !important; font-size: .9rem; }
.post-body figure.table { margin: 1.25rem 0; overflow-x: auto; }
.post-body table th,
.post-body table td,
.post-body figure.table th,
.post-body figure.table td { border: 1px solid rgba(255,255,255,.3) !important; padding: .55rem .9rem !important; text-align: left !important; }
.post-body table th,
.post-body figure.table th { background: rgba(245,158,11,.2) !important; color: #fbbf24 !important; font-weight: 700 !important; }
.post-body table tr:nth-child(even) td,
.post-body figure.table tr:nth-child(even) td { background: rgba(255,255,255,.05) !important; }
.post-body table tr:hover td,
.post-body figure.table tr:hover td { background: rgba(245,158,11,.08) !important; }

/* ====== DOWNLOAD PAGE ====== */
.download-grid { display: grid; gap: 1.5rem; max-width: 64rem; margin: 0 auto 2rem; }
@media (min-width: 768px) { .download-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .download-grid { grid-template-columns: 1fr 1fr 1fr; } }
.dl-card {
  background: linear-gradient(135deg, #18181b, #09090b);
  border: 1px solid #3f3f46; border-radius: .75rem; padding: 1.5rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: border-color .3s;
}
.dl-card:hover { border-color: rgba(245,158,11,.5); }
.dl-card img { width: 183px; height: auto; margin-bottom: 1rem; }
.dl-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.dl-card p { color: rgba(255,255,255,.6); font-size: .85rem; margin-bottom: 1.25rem; }
.dl-btn {
  background: #f59e0b; color: #000; font-weight: 700;
  padding: .65rem 1.5rem; border-radius: .5rem; transition: background .2s;
  display: inline-block; cursor: pointer;
}
.dl-btn:hover { background: #d97706; }

/* ====== ADMIN ====== */
.admin-body { background: #0f0f0f; min-height: 100vh; font-family: 'Poppins',sans-serif; color: #e5e5e5; }
.admin-top { background: #1a1a1a; border-bottom: 2px solid var(--amber); padding: .75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.admin-top .brand { color: var(--amber); font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.admin-top .admin-links a { color: #ccc; font-size: .85rem; margin-left: 1rem; }
.admin-top .admin-links a:hover { color: var(--amber); }
.admin-layout { display: flex; min-height: calc(100vh - 53px); }
.admin-sidebar { width: 220px; background: #111; border-right: 1px solid #2a2a2a; padding: 1.5rem 0; flex-shrink: 0; }
.sidebar-link { display: block; padding: .7rem 1.5rem; color: #aaa; font-size: .9rem; transition: all .2s; }
.sidebar-link:hover, .sidebar-link.active { background: rgba(247,161,27,.1); color: var(--amber); border-left: 3px solid var(--amber); }
.admin-main { flex: 1; padding: 2rem; overflow-x: hidden; }
.admin-section-title { font-size: 1.4rem; font-weight: 700; color: var(--amber); margin-bottom: 1.5rem; display: flex; align-items: center; gap: .75rem; }
.admin-table { width: 100%; border-collapse: collapse; background: #1a1a1a; border-radius: .5rem; overflow: hidden; }
.admin-table th { background: #222; padding: .75rem 1rem; text-align: left; font-size: .8rem; color: #888; text-transform: uppercase; letter-spacing: .05em; }
.admin-table td { padding: .75rem 1rem; border-bottom: 1px solid #2a2a2a; font-size: .9rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 9999px; font-size: .75rem; font-weight: 600; }
.badge-news { background: rgba(59,130,246,.2); color: #60a5fa; }
.badge-guides { background: rgba(34,197,94,.2); color: #4ade80; }
.badge-highlights { background: rgba(168,85,247,.2); color: #c084fc; }
.action-link { color: var(--amber); font-size: .85rem; margin-right: .75rem; }
.action-link:hover { text-decoration: underline; }
.action-del { color: #f87171; font-size: .85rem; }
.action-del:hover { text-decoration: underline; }
/* Admin forms */
.admin-form { max-width: 860px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .85rem; color: #aaa; margin-bottom: .4rem; }
.form-group input[type=text],
.form-group input[type=date],
.form-group input[type=password],
.form-group select,
.form-group textarea {
  width: 100%; background: #1a1a1a; border: 1px solid #333;
  border-radius: .5rem; padding: .65rem .9rem; color: #e5e5e5;
  font-family: inherit; font-size: .9rem;
  transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--amber);
}
.form-row { display: grid; gap: 1rem; }
@media(min-width:640px){ .form-row.cols-2 { grid-template-columns: 1fr 1fr; } }
@media(min-width:640px){ .form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; } }
.form-group textarea { min-height: 120px; resize: vertical; }
#content-editor { min-height: 400px; }
.btn-primary { background: var(--amber); color: #000; font-weight: 700; padding: .65rem 1.75rem; border-radius: .5rem; transition: background .2s; }
.btn-primary:hover { background: #d97706; }
.btn-secondary { background: #333; color: #e5e5e5; font-weight: 600; padding: .65rem 1.5rem; border-radius: .5rem; transition: background .2s; margin-left: .75rem; }
.btn-secondary:hover { background: #444; }
.alert { padding: .85rem 1.25rem; border-radius: .5rem; font-size: .9rem; margin-bottom: 1.25rem; }
.alert-success { background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.3); color: #4ade80; }
.alert-error { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); color: #f87171; }
/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #0a0a0a; }
.login-box { background: #1a1a1a; border: 1px solid #333; border-radius: 1rem; padding: 2.5rem; width: 100%; max-width: 380px; }
.login-box h2 { color: var(--amber); text-align: center; margin-bottom: 2rem; font-size: 1.4rem; }
.login-box .form-group input {
  background: #111;
  color: #e5e5e5;
  border: 1px solid #333;
  border-radius: .5rem;
  padding: .65rem .9rem;
  font-family: inherit;
  font-size: .9rem;
  width: 100%;
}
.login-box .form-group input:focus {
  outline: none;
  border-color: var(--amber);
}
.login-btn { width: 100%; background: var(--amber); color: #000; font-weight: 700; padding: .75rem; border-radius: .5rem; margin-top: .5rem; }

/* ====== FOOTER ====== */
.site-footer { background: #000; border-top: 2px solid #f59e0b; padding: 0; margin-top: 5rem; }
.footer-inner { display: flex; flex-direction: column; gap: 2rem; padding: 3rem 0; }
@media(min-width:768px){ .footer-inner { flex-direction: row; gap: 4rem; } }
.footer-logo { width: 140px; height: auto; margin-bottom: .75rem; }
.social-links { display: flex; gap: .75rem; margin-bottom: .75rem; }
.social-links a { color: #ccc; transition: color .2s; }
.social-links a:hover { color: var(--amber); }
.footer-warning { color: #6b7280; max-width: 18rem; font-size: .85rem; line-height: 1.5; }
.footer-col { display: flex; flex-direction: column; gap: .5rem; }
.footer-col strong { font-size: .9rem; margin-bottom: .25rem; }
.footer-col a { color: #9ca3af; font-size: .85rem; transition: color .2s; }
.footer-col a:hover { color: var(--amber); }
.footer-col p { color: #9ca3af; font-size: .85rem; }
.footer-copy { border-top: 2px solid #f59e0b; padding: 1rem 0; }
.footer-copy p { color: #6b7280; font-size: .8rem; }

/* ====== UTIL ====== */
.text-amber { color: var(--amber); }
.mt-20 { margin-top: 5rem; }
.sr-only { position: absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .burger { display: flex; }
}

/* ====== TERRITORIAL RESTRICTION DIALOG (exact from source) ====== */
.trd-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.8); z-index: 500;
  align-items: center; justify-content: center;
  padding: 1rem;
}
.trd-overlay.active { display: flex; }
.trd-box {
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .75rem;
  max-width: 480px; width: 100%;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,.6);
}
.trd-header { padding: 1.25rem 1.5rem .5rem; }
.trd-title { font-size: 1.05rem; font-weight: 700; color: #f4f4f5; }
.trd-body { padding: .5rem 1.5rem 1rem; }
.trd-desc p {
  font-size: .875rem; line-height: 1.6;
  color: #a1a1aa; margin-bottom: .75rem;
}
.trd-semibold { font-weight: 600; color: #d4d4d8 !important; }
.trd-list {
  list-style: disc; padding-left: 1.25rem;
  margin-bottom: .5rem;
}
.trd-list li {
  font-size: .875rem; color: #a1a1aa;
  line-height: 1.6; margin-bottom: .25rem;
}
.trd-footer {
  padding: .75rem 1.5rem 1.25rem;
  display: flex; justify-content: flex-end; gap: .75rem;
}
.trd-cancel {
  padding: .5rem 1.25rem; border-radius: .5rem;
  background: rgba(255,255,255,.08); color: #d4d4d8;
  font-size: .875rem; font-weight: 500;
  border: 1px solid rgba(255,255,255,.1);
  cursor: pointer; transition: background .2s;
}
.trd-cancel:hover { background: rgba(255,255,255,.15); }
.trd-confirm {
  padding: .5rem 1.25rem; border-radius: .5rem;
  background: #b45309; color: #fff;
  font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: background .2s;
}
.trd-confirm:hover { background: #92400e; }

/* ====== LANGUAGE SWITCHER ====== */
.lang-switcher-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  color: var(--amber);
  font-size: .75rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .6rem; border-radius: .4rem;
  transition: opacity .2s;
  border: 1px solid rgba(247,161,27,.3);
}
.lang-switcher-btn:hover { opacity: .75; }
/* Hide desktop lang switcher in nav on mobile (the .lang-mobile near burger handles it) */
.desktop-nav .lang-switcher-btn { display: inline-flex; }
.lang-mobile { display: inline-flex; }
@media (min-width: 769px) { .lang-mobile { display: none !important; } }

/* ====== LEGAL PROSE (terms / privacy / agency) ====== */
.legal-prose { line-height: 1.8; }
.legal-prose p { color: #d4d4d8; margin-bottom: 1rem; font-size: .95rem; }
.legal-prose h2 {
  color: #f4f4f5; font-size: 1.15rem; font-weight: 700;
  margin: 2.5rem 0 .75rem; padding-top: .5rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.legal-prose h3 { color: #e4e4e7; font-size: 1rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
.legal-prose ul, .legal-prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-prose li { color: #d4d4d8; font-size: .9rem; margin-bottom: .35rem; line-height: 1.7; }
.legal-prose hr { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 2rem 0; }
.legal-prose strong { color: #f4f4f5; }

/* ====== LANGUAGE DROPDOWN ====== */
.lang-dropdown { position: relative; display: inline-block; }
.lang-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--amber); font-size: .75rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .6rem; border-radius: .4rem;
  border: 1px solid rgba(247,161,27,.35);
  cursor: pointer; white-space: nowrap;
  transition: opacity .2s;
}
.lang-btn:hover { opacity: .75; }
.lang-caret { transition: transform .2s; }
.lang-dropdown.open .lang-caret { transform: rotate(180deg); }
.lang-menu {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: #0f0f0f; border: 1px solid rgba(255,255,255,.12);
  border-radius: .5rem; min-width: 170px; z-index: 200;
  box-shadow: 0 12px 32px rgba(0,0,0,.7); overflow: hidden;
  list-style: none; padding: .3rem 0;
}
.lang-dropdown.open .lang-menu { display: block; }
.lang-menu li a {
  display: block; padding: .55rem 1rem;
  font-size: .83rem; color: #d4d4d8;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.lang-menu li a:hover { background: rgba(247,161,27,.15); color: var(--amber); }
.lang-menu li a.lang-item-active { background: rgba(247,161,27,.1); color: var(--amber); font-weight: 600; }
/* Hide mobile-only lang btn on desktop */
.header-right { display: flex; align-items: center; gap: .5rem; }
#lang-mobile-btn { display: none; }
@media (max-width: 768px) {
  #lang-desktop { display: none; }
  #lang-mobile-btn { display: inline-block; }
}
/* Drawer lang section */
.drawer-lang-section {
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.drawer-lang-item {
  color: #aaa; font-size: .8rem; padding: .4rem .75rem;
  border: 1px solid rgba(255,255,255,.15); border-radius: .4rem;
  transition: all .2s;
}
.drawer-lang-item:hover { color: var(--amber); border-color: var(--amber); }
.drawer-lang-active { color: var(--amber) !important; border-color: var(--amber) !important; background: rgba(247,161,27,.08); }

/* ====== HERO DOWNLOAD BAR — DESKTOP (matches source exactly) ====== */
.hero-bar-desktop {
  display: none;
}
@media (min-width: 1024px) {
  .hero-bar-desktop {
    display: flex; flex-direction: row; align-items: center;
    gap: .6rem; padding: .35rem .6rem;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 3px solid rgba(255,255,255,.1);
    border-radius: .75rem; width: fit-content; margin: 0 auto;
  }
}
.hero-bar-icon {
  width: 160px; height: 160px; border-radius: 1.25rem; object-fit: cover;
  flex-shrink: 0;
}
.hero-bar-dl-col {
  display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
}
.hero-bar-dl-col a { display: block; }
.hero-bar-dl-col img { width: 183px; height: auto; display: block; }
.hero-bar-actions {
  display: flex; flex-direction: row; align-items: center; flex-shrink: 0;
}
.hero-bar-actions img, .hero-bar-actions button img, .hero-bar-actions a img {
  width: 176px; height: 220px; object-fit: contain; display: block;
}
.hero-bar-actions button, .hero-bar-actions a { display: block; }

/* Mobile hero bar */
.hero-bar-mobile {
  display: flex; flex-direction: row; align-items: center; gap: .4rem;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 3px solid rgba(218,16,34,.3);
  border-radius: .75rem; width: fit-content; margin: 0 auto; padding: 4px;
}
@media (min-width: 1024px) { .hero-bar-mobile { display: none; } }
.hero-bar-mobile-icon { width: 70px; height: 70px; border-radius: .75rem; object-fit: cover; margin-left: 4px; }
.hero-mobile-dl {
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
  padding: .75rem 1.25rem 0;
}
@media (min-width: 1024px) { .hero-mobile-dl { display: none; } }
.hero-mobile-dl a { display: flex; align-items: center; }
.hero-mobile-dl a.odd { justify-content: flex-end; }
.hero-mobile-dl a.even { justify-content: flex-start; }
.hero-mobile-dl img { max-width: 160px; width: 100%; height: auto; }

/* ====== FLOAT TOPUP SIDEBAR — mirrors source float-topup.tsx ====== */

.ft-outer {
  display: none;
  position: fixed; top: 50%; right: 1rem;
  transform: translateY(calc(-30% + 40px));
  z-index: 90;
}
@media (min-width: 1024px) { .ft-outer { display: block; } }

/* Inner flex col — RELATIVE so bg absolute inset-0 fills it */
.ft-inner {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: .5rem; width: 130px;
}

/* Background fills full flex height */
.ft-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; transition: opacity .15s;
}
.ft-bg img { width: 100%; height: 100%; object-fit: fill; display: block; }
.ft-bg.hidden { opacity: 0; }

/* Eye toggle — above the container */
.ft-eye {
  position: absolute; top: -5.5rem; left: 50%;
  transform: translateX(-50%); z-index: 10;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.ft-eye-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: .5rem;
}
.ft-eye-icon { position: relative; z-index: 2; color: #7c3a0a; display: flex; align-items: center; }

/* TOP UP button — scale(1.25) translateY(-30%) */
.ft-topup-btn {
  position: relative; z-index: 2; cursor: pointer;
  transform: scale(1.25) translateY(-30%);
  transform-origin: center top; flex-shrink: 0;
}
.ft-topup-btn img { width: 130px; height: auto; display: block; }

/* Downloads col — translateY(-50px) */
.ft-downloads {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: .4rem; transform: translateY(-50px);
  transition: opacity .15s;
}
.ft-downloads.hidden { opacity: 0; pointer-events: none; }
.ft-downloads a { display: block; }
.ft-downloads a img { width: 110px; height: auto; display: block; }

/* QR wrap */
.ft-qr-wrap {
  position: relative; width: 110px; height: 101px;
  display: flex; align-items: center; justify-content: center; margin-top: .1rem;
}
.ft-qr-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.ft-qr-canvas {
  position: relative; z-index: 1;
  width: 62px; height: 62px;
  display: flex; align-items: center; justify-content: center;
}
.ft-qr-canvas img { width: 62px !important; height: 62px !important; image-rendering: pixelated; }


/* ── Thumbnail upload combo ── */
.thumb-upload-wrap {
  display: flex; flex-direction: column; gap: .5rem;
}
.thumb-upload-row {
  display: flex; gap: .5rem; align-items: center;
}
.thumb-upload-row input[type=text] {
  flex: 1;
}
.thumb-upload-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .6rem 1rem; border-radius: .5rem;
  background: #2a2a2a; color: #e5e5e5;
  font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: background .2s; white-space: nowrap;
  border: 1px solid #3f3f46;
}
.thumb-upload-btn:hover { background: #333; border-color: var(--amber); color: var(--amber); }
.thumb-upload-btn input[type=file] { display: none; }
.thumb-upload-progress {
  font-size: .8rem; color: var(--amber); display: none;
}
.thumb-preview-img {
  max-height: 140px; border-radius: .5rem;
  border: 1px solid #333; object-fit: cover; display: block;
}

/* Admin form password inputs — ensure dots are visible */
.admin-form input[type=password] {
  color: #e5e5e5 !important;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: .5rem;
  padding: .65rem .9rem;
  font-family: inherit;
  font-size: .9rem;
  width: 100%;
}
.admin-form input[type=password]:focus {
  outline: none;
  border-color: var(--amber);
}

/* ── Login password show/hide ── */
.pw-wrap {
  position: relative; display: flex; align-items: center;
}
.pw-wrap input[type=password],
.pw-wrap input[type=text] {
  flex: 1;
  padding-right: 2.75rem !important;
  color: #e5e5e5;
  background: #111;
  border: 1px solid #333;
  border-radius: .5rem;
  padding: .65rem .9rem;
  font-family: inherit;
  font-size: .9rem;
  width: 100%;
}
.pw-wrap input:focus { outline: none; border-color: var(--amber); }
.pw-toggle {
  position: absolute; right: .65rem;
  background: none; border: none; padding: 0;
  color: #666; cursor: pointer; display: flex; align-items: center;
  transition: color .2s;
}
.pw-toggle:hover { color: var(--amber); }

/* ── Post type checkboxes ── */
.type-checks {
  display: flex; gap: 1rem; flex-wrap: wrap;
  padding: .65rem .9rem;
  background: #1a1a1a; border: 1px solid #333; border-radius: .5rem;
}
.type-checks label {
  display: flex; align-items: center; gap: .4rem;
  color: #e5e5e5; font-size: .9rem; cursor: pointer;
  user-select: none;
}
.type-checks input[type=checkbox] {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--amber);
}