@font-face {
  font-family: 'VazirLocal';
  src: url('../fonts/Vazir-Regular.woff2') format('woff2');
  font-weight: 400;
}
@font-face {
  font-family: 'VazirLocal';
  src: url('../fonts/Vazir-Bold.woff2') format('woff2');
  font-weight: 700;
}
@font-face {
  font-family: 'PoppinsLocal';
  src: url('../fonts/Poppins.woff2') format('woff2');
  font-weight: 400;
}
:root {
  --bg1: #070b1f;
  --bg2: #121735;
  --cyan: #00e5ff;
  --pink: #ff2bd6;
  --yellow: #ffe600;
  --text: #f6f8ff;
  --muted: rgba(246,248,255,.72);
  --card: rgba(10,18,40,.74);
  --line: rgba(0,229,255,.32);
  --danger: #ff4d6d;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); }
body[data-lang="fa"] { font-family: 'VazirLocal', Tahoma, sans-serif; }
body[data-lang="en"] { font-family: 'PoppinsLocal', 'Segoe UI', sans-serif; }
body:not([data-lang]) { font-family: 'VazirLocal', Tahoma, sans-serif; }
a { color: inherit; text-decoration: none; }
.page-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(0,229,255,.28), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(255,43,214,.24), transparent 32%),
    radial-gradient(circle at 45% 92%, rgba(255,230,0,.16), transparent 34%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
}
.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
}
.landing-wrap, .records-wrap, .admin-wrap, .login-wrap { position: relative; width: min(1120px, calc(100% - 28px)); margin: 0 auto; padding: 34px 0 64px; }
.hero-card, .feature-card, .table-card, .admin-panel, .login-card, .stat-card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(18px);
  border-radius: 30px;
  box-shadow: 0 0 36px rgba(0,229,255,.16), inset 0 1px 0 rgba(255,255,255,.08);
}
.hero-card { text-align: center; padding: clamp(28px, 6vw, 58px); overflow: hidden; }
.hero-glow { position: absolute; inset: auto 18% -120px; height: 220px; background: radial-gradient(circle, rgba(0,229,255,.32), transparent 68%); filter: blur(12px); }
.app-logo { position: relative; border-radius: 32px; border: 2px solid rgba(255,255,255,.18); box-shadow: 0 18px 40px rgba(0,0,0,.35), 0 0 24px rgba(255,43,214,.28); }
.eyebrow { margin: 14px 0 6px; color: var(--cyan); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { font-size: clamp(44px, 8vw, 84px); margin: 0; font-weight: 900; text-shadow: 0 0 12px var(--cyan), 0 0 28px var(--pink); }
h2 { margin: 0 0 18px; font-weight: 900; }
.hero-subtitle, .section-heading p { color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); }
.description-card { width: min(680px, 100%); margin: 28px auto; padding: 22px; text-align: right; line-height: 2.15; border-radius: 24px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.11); }
.hero-actions, .panel-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.tw-btn, .link-row, .nav-links a, .mini-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.tw-btn { min-width: 160px; border: 1px solid rgba(255,255,255,.18); padding: 14px 20px; color: #fff; }
.tw-btn.primary { background: linear-gradient(135deg, var(--cyan), #1976ff 45%, var(--pink)); box-shadow: 0 12px 26px rgba(0,0,0,.34); }
.tw-btn.ghost { background: rgba(255,255,255,.08); }
.tw-btn:hover, .link-row:hover, .nav-links a:hover { transform: translateY(-3px); filter: saturate(1.08); box-shadow: 0 0 18px rgba(0,229,255,.24); }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.feature-card { padding: 24px; min-height: 250px; }
.feature-card.accent { border-color: rgba(255,230,0,.38); }
.card-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: 18px; border-radius: 18px; background: linear-gradient(135deg, rgba(0,229,255,.24), rgba(255,43,214,.22)); color: var(--yellow); font-weight: 900; }
.link-row { width: 100%; margin-top: 10px; padding: 14px 16px; justify-content: space-between; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
.top-nav { position: relative; width: min(1120px, calc(100% - 28px)); margin: 18px auto 0; padding: 12px; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 24px; background: rgba(10,18,40,.7); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.brand img { border-radius: 12px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-links a { padding: 10px 14px; background: rgba(255,255,255,.07); }
.nav-links .disabled { opacity: .55; cursor: not-allowed; }
.nav-links .danger { color: #fff; background: rgba(255,77,109,.22); }
.section-heading { text-align: center; margin-bottom: 22px; }
.table-card { padding: 18px; overflow-x: auto; }
.table-card.compact { padding: 8px; }
.tw-table { width: 100%; border-collapse: separate; border-spacing: 0 10px; color: var(--text); }
.tw-table th, .tw-table td { padding: 16px; background: rgba(255,255,255,.07); border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: middle; }
.tw-table th:first-child, .tw-table td:first-child { border-radius: 0 16px 16px 0; }
.tw-table th:last-child, .tw-table td:last-child { border-radius: 16px 0 0 16px; }
.tw-table span { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.tw-table em { display: inline-flex; margin-right: 10px; color: var(--yellow); font-style: normal; font-weight: 900; }
.tw-table .is-mine td, .tw-table .is-mine th { background: rgba(0,229,255,.18); }
.admin-wrap { display: grid; gap: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { padding: 22px; }
.stat-card span, .stat-card small { color: var(--muted); display: block; }
.stat-card strong { display: block; margin-top: 8px; font-size: clamp(28px, 4vw, 46px); color: var(--yellow); }
.admin-panel { padding: 24px; }
.panel-title { margin-bottom: 18px; }
.settings-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
label { display: grid; gap: 8px; color: var(--muted); font-weight: 800; }
input, textarea { width: 100%; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 14px; color: var(--text); background: rgba(255,255,255,.08); outline: 0; }
textarea { resize: vertical; min-height: 170px; }
.mini-danger { color: #fff; background: rgba(255,77,109,.22); border: 1px solid rgba(255,77,109,.35); padding: 9px 14px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 0; }
.login-card { width: min(430px, 100%); padding: 30px; display: grid; gap: 16px; }
.login-card h1 { font-size: clamp(34px, 7vw, 58px); }
.alert-chip { border-radius: 16px; padding: 12px 14px; background: rgba(255,77,109,.18); border: 1px solid rgba(255,77,109,.38); color: #ffdce3; }
.reveal { animation: rise .65s ease both; }
.delay-1 { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .cards-grid, .stats-grid, .settings-grid { grid-template-columns: 1fr; } .top-nav { align-items: stretch; flex-direction: column; gap: 12px; } .nav-links a { flex: 1; } }
@media (max-width: 560px) { .landing-wrap, .records-wrap, .admin-wrap { width: min(100% - 18px, 1120px); padding-top: 18px; } .hero-card, .feature-card, .admin-panel, .login-card { border-radius: 24px; padding: 20px; } .tw-table th, .tw-table td { padding: 12px 10px; font-size: .9rem; } }

/* --- Modern public pages --- */
:root {
  --surface: rgba(255,255,255,.06);
  --surface-strong: rgba(255,255,255,.11);
  --txt-main: #f7fbff;
  --txt-subtle: rgba(247,251,255,.76);
  --brand-a: #00d1ff;
  --brand-b: #33ffa8;
}

.modern-page {
  background:
    radial-gradient(circle at 10% 10%, rgba(0,209,255,.2), transparent 35%),
    radial-gradient(circle at 85% 12%, rgba(51,255,168,.18), transparent 30%),
    linear-gradient(140deg, #040717, #0a1331 55%, #0f1e45);
}

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

.site-header,
.site-footer {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(3, 8, 24, .58);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.site-footer {
  position: static;
  margin-top: 38px;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 0;
}

.header-inner,
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand-link img {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.2);
}

.main-nav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.main-nav a,
.footer-links a {
  padding: 9px 13px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.09);
}

.landing-hero,
.info-card,
.contact-card,
.podium-wrap,
.table-card {
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  box-shadow: 0 20px 45px rgba(0,0,0,.28);
}

.landing-hero {
  margin-top: 22px;
  padding: clamp(24px, 4vw, 42px);
  text-align: center;
}

.kicker {
  color: var(--brand-a);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
}

.lead,
.section-title p,
.intro-text,
.info-card p {
  color: var(--txt-subtle);
}

.intro-text {
  margin: 24px auto 0;
  max-width: 760px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(0,0,0,.2);
  text-align: right;
  line-height: 2;
}

.tw-btn.filled {
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  color: #031120;
  border: 0;
}

.tw-btn.soft {
  background: rgba(255,255,255,.09);
}

.landing-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.info-card {
  padding: 22px;
}

.info-card.full {
  grid-column: 1 / -1;
}

.info-card a {
  display: block;
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
}

.section-title {
  text-align: center;
  margin: 26px 0 18px;
}

.podium-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 12px;
  padding: 20px;
}

.podium-item {
  padding: 12px;
  border-radius: 16px;
  text-align: center;
  background: rgba(255,255,255,.07);
}

.podium-item.first { min-height: 180px; border: 1px solid rgba(255,230,110,.5); }
.podium-item.second { min-height: 140px; }
.podium-item.third { min-height: 120px; }
.podium-item span { display: block; font-size: 2rem; font-weight: 900; }
.podium-item strong { font-size: 1.2rem; }

.contact-card {
  padding: 22px;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form label {
  color: var(--txt-main);
}

.full-btn {
  width: 100%;
}

.alert-chip.success {
  background: rgba(0,255,140,.16);
  border-color: rgba(0,255,140,.35);
  color: #d6ffef;
}

@media (max-width: 900px) {
  .main-nav a,
  .footer-links a { flex: 1; text-align: center; }
  .landing-grid,
  .podium-wrap { grid-template-columns: 1fr; }
  .podium-item.first,
  .podium-item.second,
  .podium-item.third { min-height: auto; }
}

/* --- Web-like neon style overrides for public pages --- */
body.modern-page {
  --bg1: #070b1f;
  --bg2: #121735;
  --primary: #00e5ff;
  --secondary: #ff2bd6;
  --accent: #ffe600;
  --home-text: #f5f7ff;
  --home-card: rgba(10, 18, 40, 0.72);
  color: var(--home-text);
  font-family: 'VazirLocal', Tahoma, sans-serif;
  background:
    radial-gradient(circle at 20% 20%, rgba(0,229,255,.28), transparent 28%),
    radial-gradient(circle at 80% 30%, rgba(255,43,214,.25), transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(255,230,0,.18), transparent 35%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
}

body.modern-page[data-lang="en"] {
  font-family: 'PoppinsLocal', sans-serif;
}

body.modern-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,229,255,.07) 50%, transparent 100%);
  animation: siteScan 5s linear infinite;
}

@keyframes siteScan {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}

body.modern-page .site-header,
body.modern-page .site-footer {
  background: rgba(10, 18, 40, .7);
  border-color: rgba(0,229,255,.35);
  box-shadow: 0 0 18px rgba(0,229,255,.14);
}

body.modern-page .main-nav a,
body.modern-page .footer-links a {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

body.modern-page .main-nav a:hover,
body.modern-page .footer-links a:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 0 14px rgba(0,229,255,.3);
}

body.modern-page .landing-hero,
body.modern-page .info-card,
body.modern-page .contact-card,
body.modern-page .podium-wrap,
body.modern-page .table-card {
  position: relative;
  background: var(--home-card);
  border: 1px solid rgba(0,229,255,.35);
  border-radius: 28px;
  backdrop-filter: blur(18px);
  box-shadow: 0 0 35px rgba(0,229,255,.18), inset 0 0 25px rgba(255,255,255,.045);
}

body.modern-page h1 {
  color: var(--home-text);
  text-shadow: 0 0 12px var(--primary), 0 0 28px var(--secondary);
}

body.modern-page .kicker {
  color: var(--primary);
  font-weight: 900;
}

body.modern-page .lead,
body.modern-page .section-title p,
body.modern-page .intro-text,
body.modern-page .info-card p {
  color: rgba(245, 247, 255, .84);
}

body.modern-page .tw-btn {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  padding: 14px 20px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,.5);
  box-shadow: 0 10px 24px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.16);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

body.modern-page .tw-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg);
  transition: .45s;
}

body.modern-page .tw-btn:hover {
  transform: translateY(-3px);
  filter: saturate(1.08);
  box-shadow: 0 0 14px rgba(0,229,255,.34), 0 12px 26px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.18);
}

body.modern-page .tw-btn:hover::before {
  left: 140%;
}

body.modern-page .tw-btn.filled {
  color: #111827;
  text-shadow: none;
  background: linear-gradient(135deg, #ffe600, #ff7b00);
  box-shadow: 0 0 26px rgba(255,183,0,.55);
}

body.modern-page .tw-btn.soft {
  background: linear-gradient(135deg, var(--primary), #1976ff 45%, var(--secondary));
}

body.modern-page .info-card a {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

body.modern-page .info-card a:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(0,229,255,.28);
}

body.modern-page .podium-item {
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 0 20px rgba(0,229,255,.08);
}

body.modern-page .podium-item.first {
  background: linear-gradient(135deg, rgba(255, 212, 59, .22), rgba(255, 138, 0, .22));
  border-color: rgba(255,230,110,.55);
}

body.modern-page .podium-item.second {
  background: linear-gradient(135deg, rgba(0,229,255,.2), rgba(25,118,255,.2));
}

body.modern-page .podium-item.third {
  background: linear-gradient(135deg, rgba(255,43,214,.2), rgba(142,45,226,.2));
}


/* --- Admin UX and gallery additions --- */
.panel-title p:not(.eyebrow) { color: var(--muted); margin: 6px 0 0; line-height: 1.8; }
.panel-title.with-actions { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.stacked-fields { display: grid; gap: 12px; }
.inline-check { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 900; }
.inline-check input { width: auto; }
.action-stack { display: grid; gap: 8px; }
.action-stack .tw-btn, .compact-actions .tw-btn { min-width: 0; padding: 9px 12px; }
select { width: 100%; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 12px; color: var(--text); background: rgba(255,255,255,.08); outline: 0; }
.status-pill { display: inline-flex !important; align-items: center; justify-content: center; border-radius: 999px; padding: 7px 10px; background: rgba(255,255,255,.09); color: rgba(255,255,255,.8) !important; font-weight: 900; }
.status-pill.good { background: rgba(51,255,168,.16); color: #caffea !important; border: 1px solid rgba(51,255,168,.28); }
.charts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.chart-card { min-width: 0; border-radius: 22px; padding: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.chart-card h3 { margin: 0 0 10px; font-size: 1rem; color: #fff; }
.latest-visits { margin-top: 12px; }
.message-editor textarea { min-height: 92px; }
.gallery-create-card { display: grid; grid-template-columns: 1.5fr .55fr 1.2fr auto auto; gap: 12px; align-items: end; padding: 14px; border: 1px solid rgba(255,255,255,.11); border-radius: 22px; background: rgba(255,255,255,.055); }
.gallery-create-card .tw-btn { min-width: 132px; }
.gallery-admin-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery-admin-item { display: grid; gap: 12px; border-radius: 24px; padding: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.11); }
.gallery-admin-item img { width: 100%; aspect-ratio: 9 / 16; max-height: 280px; object-fit: cover; border-radius: 18px; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 12px 24px rgba(0,0,0,.28); }
.gallery-admin-fields { display: grid; gap: 8px; }
.compact-actions { justify-content: stretch; }
.compact-actions > * { flex: 1; }
.empty-state { grid-column: 1 / -1; padding: 24px; text-align: center; border-radius: 20px; color: var(--muted); background: rgba(255,255,255,.06); }
.records-controls { min-width: min(260px, 100%); display: flex; gap: 10px; align-items: end; }
.records-controls label { min-width: 120px; }
.records-controls .tw-btn { min-width: 120px; }
.ajax-pager { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-weight: 900; }
.ajax-pager .tw-btn { min-width: 110px; padding: 10px 14px; }
.ajax-pager .tw-btn:disabled { opacity: .45; cursor: not-allowed; }
.records-table td, .records-table th { vertical-align: top; }
.admin-page .tw-table td span, .admin-page .tw-table th span { overflow-wrap: anywhere; }

/* --- Public gallery --- */
.game-gallery-section { margin-top: 18px; padding: clamp(18px, 3vw, 28px); border-radius: 28px; border: 1px solid rgba(0,229,255,.35); background: rgba(10,18,40,.72); box-shadow: 0 0 35px rgba(0,229,255,.18), inset 0 0 25px rgba(255,255,255,.045); overflow: hidden; }
.gallery-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 18px; }
.gallery-heading h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.5rem); text-shadow: 0 0 16px var(--primary, #00e5ff); }
.gallery-heading p { margin: 6px 0 0; color: var(--muted); }
.gallery-swiper { padding: 4px 6px 22px; }
.gallery-slide-card { position: relative; width: min(360px, 100%); margin: 0 auto; border-radius: 30px; padding: 12px; background: linear-gradient(150deg, rgba(0,229,255,.24), rgba(255,43,214,.18)); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 22px 40px rgba(0,0,0,.35); }
.gallery-slide-card::before { content: ""; position: absolute; inset: 22px -18px -18px; z-index: -1; border-radius: 34px; background: radial-gradient(circle, rgba(255,230,0,.3), transparent 65%); filter: blur(18px); }
.gallery-slide-card img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 22px; border: 1px solid rgba(255,255,255,.18); display: block; }
.gallery-slide-card strong { display: block; margin-top: 12px; color: #fff; text-align: center; font-size: 1rem; }
.gallery-empty { padding: 24px; text-align: center; color: var(--muted); }

@media (max-width: 980px) { .charts-grid, .gallery-admin-grid { grid-template-columns: 1fr; } .gallery-create-card { grid-template-columns: 1fr; } .panel-title.with-actions, .records-controls { flex-direction: column; align-items: stretch; } }

/* --- Dynamic neon motion and richer icon UI --- */
:root { --mouse-x: 50%; --mouse-y: 50%; }
.site-motion-page { position: relative; isolation: isolate; }
.site-motion-page.page-shell,
body.modern-page.site-motion-page,
body.admin-page.site-motion-page,
body.admin-login-page.site-motion-page {
  background:
    radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(255,230,0,.16), transparent 18rem),
    radial-gradient(circle at calc(100% - var(--mouse-x)) 16%, rgba(255,43,214,.2), transparent 24rem),
    radial-gradient(circle at 18% calc(100% - var(--mouse-y)), rgba(0,229,255,.22), transparent 22rem),
    linear-gradient(135deg, #070b1f, #121735);
}
.motion-orb { position: fixed; z-index: -1; width: 36vmin; height: 36vmin; border-radius: 50%; filter: blur(42px); opacity: .28; pointer-events: none; mix-blend-mode: screen; animation: floatOrb 9s ease-in-out infinite alternate; }
.motion-orb.orb-a { right: 8%; top: 16%; background: #00e5ff; }
.motion-orb.orb-b { left: 10%; top: 24%; background: #ff2bd6; animation-delay: -3s; }
.motion-orb.orb-c { left: 38%; bottom: 6%; background: #ffe600; width: 28vmin; height: 28vmin; animation-delay: -5s; }
@keyframes floatOrb { from { transform: translate3d(-14px, 10px, 0) scale(.96); } to { transform: translate3d(18px, -18px, 0) scale(1.08); } }
.lang-switch { border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: 9px 13px; color: #111827; background: linear-gradient(135deg, #ffe600, #ff7b00); font-weight: 1000; box-shadow: 0 0 18px rgba(255,183,0,.35); transition: transform .18s ease, box-shadow .18s ease; }
.lang-switch:hover { transform: translateY(-2px) rotate(-2deg); box-shadow: 0 0 24px rgba(255,230,0,.55); }
.login-lang { position: fixed; top: 20px; left: 20px; z-index: 30; }
.hero-icon,
.section-badge,
.card-orb,
.form-glow-icon { display: inline-grid; place-items: center; border-radius: 22px; background: linear-gradient(135deg, #ffe600, #ff7b00); color: #111827; box-shadow: 0 0 26px rgba(255,230,0,.44), inset 0 -8px 16px rgba(0,0,0,.14); }
.hero-icon { width: 72px; height: 72px; margin-bottom: 12px; font-size: 34px; animation: iconPulse 2.6s ease-in-out infinite; }
.section-badge { width: 58px; height: 58px; font-size: 26px; }
.card-orb { width: 50px; height: 50px; margin-bottom: 14px; font-size: 22px; }
.form-glow-icon { width: 64px; height: 64px; margin-bottom: 14px; font-size: 28px; }
@keyframes iconPulse { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-5px) rotate(5deg); } }
.icon-btn i { position: relative; z-index: 2; font-size: 1.15rem; }
body.modern-page .tw-btn,
body.modern-page .main-nav a,
body.modern-page .info-card a,
body.modern-page .market-card,
body.modern-page .brand-row,
.admin-page .tw-btn,
.admin-page .nav-links a,
.admin-login-page .tw-btn { will-change: transform; }
body.modern-page .tw-btn:hover,
body.modern-page .main-nav a:hover,
body.modern-page .info-card a:hover,
body.modern-page .market-card:hover,
body.modern-page .brand-row:hover,
.admin-page .tw-btn:hover,
.admin-page .nav-links a:hover,
.admin-login-page .tw-btn:hover {
  border-color: rgba(255,230,0,.7);
  color: #fff;
  background-image: linear-gradient(135deg, rgba(255,230,0,.24), rgba(0,229,255,.22), rgba(255,43,214,.22));
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 0 0 1px rgba(255,230,0,.24), 0 0 24px rgba(0,229,255,.36), 0 16px 34px rgba(0,0,0,.34);
}
body.modern-page .tw-btn.filled:hover { color: #111827; background-image: linear-gradient(135deg, #fff16a, #ff9a22); }
.download-section { margin-top: 18px; padding: clamp(20px, 3vw, 30px); border-radius: 28px; border: 1px solid rgba(0,229,255,.35); background: rgba(10,18,40,.72); box-shadow: 0 0 35px rgba(0,229,255,.18), inset 0 0 25px rgba(255,255,255,.045); }
.compact-title { margin: 0 0 16px; }
.market-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.market-card { position: relative; overflow: hidden; min-height: 112px; display: grid; grid-template-columns: 58px 1fr; grid-template-areas: 'icon label' 'icon sub'; align-items: center; gap: 4px 14px; padding: 18px; border-radius: 24px; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(135deg, rgba(255,255,255,.11), rgba(255,255,255,.05)); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.market-card::after { content: ""; position: absolute; inset: -80% auto -80% -30%; width: 36%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: rotate(18deg); transition: .55s; }
.market-card:hover::after { left: 120%; }
.market-card img { grid-area: icon; width: 58px; height: 58px; object-fit: contain; border-radius: 16px; box-shadow: 0 10px 20px rgba(0,0,0,.25); }
.market-card strong { grid-area: label; font-size: 1.2rem; font-weight: 1000; }
.market-card span { grid-area: sub; color: var(--muted); font-weight: 800; }
.brand-row { display: flex !important; align-items: center; gap: 10px; }
.brand-row img { width: 24px; height: 24px; object-fit: contain; }
.brand-row i { color: #ffe600; }
.lang-en-only { display: none; }
body[data-lang="en"] .lang-fa-only { display: none !important; }
body[data-lang="en"] .lang-en-only { display: block !important; }
body[data-lang="en"] { direction: ltr; }
body[data-lang="en"] .tw-table th:first-child,
body[data-lang="en"] .tw-table td:first-child { border-radius: 16px 0 0 16px; }
body[data-lang="en"] .tw-table th:last-child,
body[data-lang="en"] .tw-table td:last-child { border-radius: 0 16px 16px 0; }
.enhanced-card { overflow: hidden; }
.enhanced-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,.12), transparent 22rem); opacity: .75; }
.podium-item i { display: block; color: #ffe600; font-size: 1.6rem; margin-bottom: 4px; text-shadow: 0 0 16px rgba(255,230,0,.55); }
.rank-pill { display: inline-grid !important; place-items: center; min-width: 38px; height: 38px; border-radius: 14px; color: #111827 !important; background: linear-gradient(135deg, #ffe600, #ff7b00); font-weight: 1000; }
.link-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .market-grid, .link-settings { grid-template-columns: 1fr; } .footer-inner { align-items: stretch; flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { .motion-orb, .hero-icon { animation: none; } }

/* --- Fixed admin header and separated settings cards --- */
.admin-page { scroll-padding-top: 132px; }
.admin-fixed-nav {
  position: fixed;
  top: 12px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  z-index: 120;
  width: min(1280px, calc(100% - 22px));
  margin: 0;
  align-items: center;
  gap: 10px;
}
.admin-page .admin-wrap {
  width: min(1280px, calc(100% - 28px));
  padding-top: 124px;
}
.admin-nav .brand { flex: 0 0 auto; }
.admin-nav-links {
  flex: 1;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.admin-nav-btn,
.admin-nav .nav-links .admin-nav-btn {
  position: relative;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 15px;
  padding: 9px 12px;
  color: #fff;
  background: rgba(255,255,255,.075);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.admin-nav-btn i { color: #ffe600; font-size: 1rem; }
.admin-nav-btn:hover,
.admin-nav-group:hover > .admin-nav-btn,
.admin-nav-group:focus-within > .admin-nav-btn {
  transform: translateY(-2px);
  border-color: rgba(255,230,0,.65);
  background: linear-gradient(135deg, rgba(255,230,0,.18), rgba(0,229,255,.16));
  box-shadow: 0 0 18px rgba(0,229,255,.24);
}
.admin-nav-btn.danger { background: rgba(255,77,109,.2); border-color: rgba(255,77,109,.32); }
.admin-nav-btn.soft { background: rgba(0,229,255,.11); }
.admin-nav-group { position: relative; }
.admin-nav-group > button { cursor: pointer; }
.admin-nav-group .chevron { color: rgba(255,255,255,.65); font-size: .8rem; }
.admin-submenu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-start: 0;
  min-width: 250px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(0,229,255,.32);
  border-radius: 20px;
  background: rgba(7,17,31,.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 36px rgba(0,0,0,.36), 0 0 24px rgba(0,229,255,.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.admin-submenu::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.admin-nav-group:hover .admin-submenu,
.admin-nav-group:focus-within .admin-submenu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.admin-submenu a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  color: #fff;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-weight: 900;
}
.admin-submenu a:hover { border-color: rgba(255,230,0,.55); background: rgba(255,230,0,.12); }
.admin-anchor { scroll-margin-top: 132px; }
.settings-panel { display: grid; gap: 16px; }
.settings-subpanel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
  box-shadow: inset 0 0 22px rgba(255,255,255,.035);
}
.settings-subpanel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(0,229,255,.09), transparent 22rem);
}
.subpanel-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.subpanel-heading > span,
.favicon-upload-box img {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #111827;
  font-size: 24px;
  background: linear-gradient(135deg, #ffe600, #ff7b00);
  box-shadow: 0 0 20px rgba(255,230,0,.32), inset 0 -8px 15px rgba(0,0,0,.14);
}
.subpanel-heading h3 { margin: 0; color: #fff; font-weight: 1000; }
.subpanel-heading small { color: var(--muted); font-weight: 800; }
.settings-subpanel label,
.settings-subpanel .panel-actions { position: relative; z-index: 1; }
.settings-subpanel textarea { white-space: pre-wrap; }
.settings-subpanel .settings-grid { margin-top: 0 !important; }
.compact-actions-left { justify-content: flex-start; }
.favicon-upload-box {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.favicon-upload-box img { object-fit: cover; padding: 6px; background: rgba(255,255,255,.1); }
.admin-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 220;
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  min-width: min(420px, calc(100% - 32px));
  padding: 14px 18px;
  border-radius: 18px;
  color: #111827;
  text-align: center;
  font-weight: 1000;
  background: linear-gradient(135deg, #33ffa8, #00e5ff);
  box-shadow: 0 18px 34px rgba(0,0,0,.34), 0 0 24px rgba(0,229,255,.34);
  transition: opacity .2s ease, transform .2s ease;
}
.admin-toast.show { opacity: 1; transform: translate(-50%, 0); }
.intro-text,
.section-title p { white-space: pre-line; }
@media (max-width: 1180px) {
  .admin-fixed-nav { align-items: stretch; }
  .admin-nav-links { justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .admin-nav-btn span { white-space: nowrap; }
}
@media (max-width: 760px) {
  .admin-page { scroll-padding-top: 178px; }
  .admin-page .admin-wrap { padding-top: 178px; width: min(100% - 18px, 1280px); }
  .admin-fixed-nav { top: 8px; width: min(100% - 12px, 1280px); }
  .admin-nav .brand { justify-content: center; }
  .admin-nav-links { gap: 6px; }
  .admin-nav-btn { padding: 9px 10px; }
  .admin-anchor { scroll-margin-top: 184px; }
  .settings-subpanel { padding: 14px; border-radius: 20px; }
  .favicon-upload-box { grid-template-columns: 1fr; }
}

/* --- Overflow and RTL responsive hardening --- */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
.container-shell,
.landing-wrap,
.records-wrap,
.admin-wrap,
.login-wrap,
.top-nav,
.site-header,
.site-footer {
  max-width: 100%;
}
.landing-hero,
.info-card,
.contact-card,
.podium-wrap,
.download-section,
.game-gallery-section,
.table-card,
.admin-panel,
.stat-card,
.settings-subpanel,
.chart-card {
  min-width: 0;
}
.table-card {
  width: 100%;
  max-width: 100%;
}
.tw-table {
  max-width: 100%;
}
.tw-table th,
.tw-table td {
  overflow-wrap: anywhere;
}
.admin-nav,
.admin-nav-links,
.header-inner,
.footer-inner,
.landing-grid,
.settings-grid,
.charts-grid,
.stats-grid,
.market-grid,
.gallery-admin-grid {
  min-width: 0;
}
@media (max-width: 760px) {
  .container-shell,
  .landing-wrap,
  .records-wrap,
  .login-wrap {
    width: min(100% - 16px, 1120px);
  }
  .admin-page .admin-wrap {
    width: min(100% - 12px, 1280px);
  }
  .admin-fixed-nav {
    left: 6px;
    right: 6px;
    width: auto;
    transform: none;
  }
  .header-inner,
  .footer-inner,
  .gallery-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .main-nav,
  .footer-links,
  .nav-links {
    width: 100%;
  }
  .admin-panel,
  .table-card,
  .download-section,
  .game-gallery-section {
    padding-inline: 14px;
  }
  .tw-table th,
  .tw-table td {
    padding: 10px 8px;
  }
}
