:root {
  --blue: #1f4fa0;
  --blue-deep: #14346b;
  --blue-soft: #e8effb;
  --red: #d62828;
  --white: #ffffff;
  --ink: #14346b;
  --muted: #4a5f86;
  --line: #d6e0f2;
  --brand: var(--blue);
  --brand-ink: var(--white);
  --accent: var(--red);
  --bg: #f5f8fd;
  --card: var(--white);
  --danger: var(--red);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef3fc;
    --muted: #b7c6e3;
    --line: #22386a;
    --bg: #0c1c3f;
    --card: #132b57;
    --blue-soft: #1a3766;
    --brand: #6f9be3;
    --brand-ink: #0c1c3f;
  }
}

:root[data-theme="dark"] {
  --ink: #eef3fc;
  --muted: #b7c6e3;
  --line: #22386a;
  --bg: #0c1c3f;
  --card: #132b57;
  --blue-soft: #1a3766;
  --brand: #6f9be3;
  --brand-ink: #0c1c3f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--blue); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--card); border-bottom: 3px solid var(--red); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 8px; }
.brand { display: inline-block; line-height: 0; }
.brand img { height: 90px; width: auto; display: block; background: var(--white); border-radius: 10px; padding: 6px 10px; box-sizing: content-box; }
nav a { margin-left: 14px; text-decoration: none; color: var(--ink); }
nav a:hover { color: var(--red); }
nav .change { color: var(--red); font-weight: bold; }

h1 { font-size: 26px; margin: 24px 0 8px; color: var(--ink); }
h2 { font-size: 20px; margin: 24px 0 8px; color: var(--ink); }
.muted { color: var(--muted); }
.intro { font-size: 18px; color: var(--ink); margin: 0 0 8px; }

.hero {
  background: var(--blue); color: var(--white);
  border-radius: 12px; padding: 24px; margin: 20px 0;
  border-left: 6px solid var(--red);
}
.hero a { color: var(--white); }
.hero small { opacity: .9; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px; margin: 10px 0;
}
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.ad-slot { margin: 16px 0; }
.ad-slot img { width: 100%; height: auto; border-radius: 10px; display: block; }
.ad-label { font-size: 12px; color: var(--muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tabs a {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; background: var(--card); color: var(--ink);
}
.tabs a.on { background: var(--blue); color: var(--white); border-color: var(--blue); }

form.stack label { display: block; margin: 12px 0 4px; font-weight: 600; color: var(--blue-deep); }
form.stack input, form.stack select, form.stack textarea {
  width: 100%; padding: 10px; font: inherit; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card); color: var(--ink);
}
form.stack textarea { min-height: 120px; }
button, .btn {
  display: inline-block; padding: 10px 16px; border: 0; border-radius: 8px;
  background: var(--blue); color: var(--white); font: inherit; cursor: pointer; text-decoration: none;
}
button:hover, .btn:hover { background: var(--blue-deep); }
button.secondary { background: var(--white); color: var(--blue); border: 1px solid var(--blue); }
button.secondary:hover { background: var(--blue-soft); }
button.danger { background: var(--red); }
button.danger:hover { background: #a81e1e; }
.hp { position: absolute; left: -9999px; }

.alert { padding: 10px 12px; border-radius: 8px; background: #fde7e7; color: var(--red); margin: 12px 0; border-left: 4px solid var(--red); }
.ok { padding: 10px 12px; border-radius: 8px; background: var(--blue-soft); color: var(--blue-deep); margin: 12px 0; border-left: 4px solid var(--blue); }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 20px; background: var(--blue-soft); color: var(--blue-deep); padding: 8px 12px; border-radius: 8px; display: inline-block; }

.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); margin-left: 6px; color: var(--muted); }
.badge.verified { background: var(--red); color: var(--white); border-color: var(--red); }

.site-footer { margin-top: 40px; padding: 20px 0; border-top: 3px solid var(--red); color: var(--muted); font-size: 14px; }
.site-footer .footer-logo { display: block; height: 60px; width: auto; margin-bottom: 8px; background: var(--white); border-radius: 10px; padding: 6px 10px; box-sizing: content-box; }

table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { color: var(--blue-deep); }
td form { display: inline; }
td button { padding: 4px 8px; font-size: 13px; margin: 2px 0; }

.events-banner {
  background: var(--blue-deep); color: var(--white);
  border-top: 4px solid var(--red); border-radius: 12px;
  padding: 16px 22px; margin: 16px 0; min-height: 170px;
  display: flex; flex-direction: column;
}
.events-banner a { color: var(--white); }
.events-banner .eb-head { display: flex; justify-content: space-between; font-size: 14px; opacity: .95; }
.eb-slide { display: none; flex: 1; flex-direction: column; justify-content: center; gap: 4px; }
.eb-slide.active { display: flex; }
.eb-date { font-size: 15px; opacity: .9; }
.eb-title { font-size: 24px; font-weight: bold; text-decoration: none; }
.eb-title:hover { text-decoration: underline; }
.eb-venue { opacity: .9; }
.eb-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.eb-controls button { padding: 2px 12px; font-size: 18px; }
.events-banner.events-empty { min-height: 0; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; background: var(--blue-soft); color: var(--ink); }
.events-banner.events-empty a { color: var(--blue); font-weight: bold; }

@media (max-width: 600px) {
  .eb-title { font-size: 19px; }
  nav a { margin-left: 10px; font-size: 15px; }
  h1 { font-size: 22px; }
}
