:root {
  color-scheme: dark;
  --bg: #07110d;
  --panel: #0d1915;
  --panel-2: #12231d;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f7f1;
  --muted: #aab8ad;
  --soft: #dce6dc;
  --green: #0fa66a;
  --green-2: #34d08a;
  --red: #e74444;
  --gold: #f2c766;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 20% 0%, rgba(15, 166, 106, 0.22), transparent 32rem),
    radial-gradient(circle at 92% 12%, rgba(231, 68, 68, 0.16), transparent 28rem),
    var(--bg);
  background-size: 64px 64px, 64px 64px, auto, auto, auto;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Bengali", sans-serif;
}

body::before {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 0;
  border-right: 0;
  content: "";
  height: 44vh;
  left: 0;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 22vh;
  z-index: -1;
}

button,
input,
a {
  font: inherit;
}

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

.topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(7, 17, 13, 0.78);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 14px clamp(18px, 4vw, 54px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
}

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

.brand-mark {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  object-fit: cover;
  width: 38px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

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

.icon-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 34px clamp(16px, 4vw, 36px) 44px;
}

.tool-hero {
  align-items: stretch;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
  min-height: min(860px, calc(100vh - 72px));
  position: relative;
}

.tool-hero::after {
  border: 1px solid rgba(52, 208, 138, 0.22);
  border-radius: 999px 999px 0 0;
  content: "";
  height: 220px;
  left: 8%;
  opacity: 0.55;
  pointer-events: none;
  position: absolute;
  top: 24px;
  width: min(460px, 72vw);
  z-index: -1;
}

.hero-copy {
  align-self: center;
  padding: 28px 0;
}

.hero-logo {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(15, 166, 106, 0.18);
  display: block;
  height: clamp(88px, 12vw, 128px);
  margin-bottom: 16px;
  object-fit: cover;
  width: clamp(88px, 12vw, 128px);
}

.eyebrow,
.label {
  color: var(--green-2);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 9px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.96;
  margin-bottom: 14px;
  max-width: 720px;
}

.hero-text {
  color: var(--soft);
  font-size: 17px;
  line-height: 1.55;
  max-width: 640px;
}

.hero-text.secondary {
  color: var(--muted);
  font-size: 15px;
  margin-top: -4px;
}

.hero-kicker {
  color: var(--gold);
  font-size: 16px;
  font-weight: 800;
  margin: 14px 0 6px;
}

.bangla-callout {
  color: var(--text);
  font-size: 23px;
  font-weight: 900;
  margin-bottom: 14px;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.signal-row span {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 11px;
}

.hero-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  max-width: 560px;
}

.hero-stats span,
.selected-strip,
.source-note,
.info-grid article,
.builder,
.match-card {
  background: rgba(13, 25, 21, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-stats span {
  color: var(--muted);
  padding: 14px;
}

.hero-stats strong {
  color: var(--text);
  display: block;
  font-size: 28px;
}

.builder {
  align-self: center;
  box-shadow: var(--shadow);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.builder::before {
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.08) 50%, transparent 51%),
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 100% 100%, 100% 46px;
  content: "";
  inset: 0;
  opacity: 0.28;
  pointer-events: none;
  position: absolute;
}

.builder > * {
  position: relative;
}

.builder-topline {
  align-items: center;
  background: rgba(7, 17, 13, 0.58);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 11px 12px;
}

.builder-topline span {
  color: var(--green-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.builder-topline strong {
  color: var(--text);
}

.builder-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
}

.segmented {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
}

.segment,
.pill {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  min-height: 38px;
}

.segment.active,
.pill.active {
  background: var(--green);
  color: white;
}

.search-wrap {
  display: block;
}

input[type="search"] {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  padding: 13px 14px;
  width: 100%;
}

input[type="search"]:focus {
  border-color: rgba(52, 208, 138, 0.75);
}

.team-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
  max-height: 310px;
  overflow: auto;
  padding-right: 4px;
}

.team-chip {
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 9px;
  min-height: 58px;
  padding: 9px;
  text-align: left;
}

.team-chip.active {
  background: rgba(15, 166, 106, 0.23);
  border-color: rgba(52, 208, 138, 0.75);
}

.flag {
  font-size: 24px;
  width: 30px;
}

.team-chip strong,
.team-chip small {
  display: block;
}

.team-chip small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.toggle-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
}

.toggle-row input {
  accent-color: var(--green);
  height: 18px;
  width: 18px;
}

.toggle-row small {
  color: var(--muted);
  display: block;
}

.selected-strip {
  color: var(--soft);
  min-height: 46px;
  padding: 13px;
}

.calendar-actions {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.primary-action,
.secondary-action {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 46px;
  padding: 0 12px;
}

.primary-action {
  background: var(--green);
  border: 1px solid transparent;
  color: white;
  font-weight: 800;
}

.secondary-action {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  color: var(--text);
}

.primary-action:disabled,
.secondary-action:disabled,
.secondary-action.disabled {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}

.microcopy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}

.match-band,
.info-grid,
.source-note {
  margin-top: 34px;
}

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

.section-head h2,
.source-note h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  margin-bottom: 0;
}

.filter-pills {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  padding: 4px;
}

.pill {
  min-width: 92px;
  padding: 0 12px;
}

.match-list {
  display: grid;
  gap: 10px;
}

.match-card {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 116px minmax(0, 1fr) 230px;
  padding: 14px;
}

.match-time strong,
.match-time span {
  display: block;
}

.match-time strong {
  color: var(--gold);
  font-size: 24px;
}

.match-time span,
.match-main p,
.match-meta {
  color: var(--muted);
}

.match-main h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.match-main h3 span {
  color: var(--red);
  font-size: 13px;
  text-transform: uppercase;
}

.match-meta {
  display: grid;
  font-size: 13px;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

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

.info-grid article,
.source-note {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.source-note::after {
  color: rgba(255, 255, 255, 0.04);
  content: "KHELA";
  font-size: 96px;
  font-weight: 900;
  position: absolute;
  right: 16px;
  top: -8px;
}

.info-grid span {
  display: block;
  font-size: 26px;
  margin-bottom: 12px;
}

.info-grid h3 {
  margin-bottom: 8px;
}

.info-grid p,
.source-note p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin: 20px auto 0;
  max-width: 1180px;
  padding: 22px clamp(16px, 4vw, 36px);
}

.footer-brand {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
}

.footer-brand img {
  border-radius: 6px;
  height: 28px;
  object-fit: cover;
  width: 28px;
}

.social-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.social-links span {
  color: var(--muted);
  margin-right: 4px;
}

.social-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px;
  transition: 160ms ease;
}

.social-link:hover {
  border-color: rgba(52, 208, 138, 0.65);
  transform: translateY(-1px);
}

.social-link.facebook {
  background: rgba(24, 119, 242, 0.16);
}

.social-link.instagram {
  background: linear-gradient(135deg, rgba(245, 133, 41, 0.16), rgba(221, 42, 123, 0.16), rgba(81, 91, 212, 0.16));
}

.social-icon {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 18px;
}

.facebook .social-icon {
  fill: currentColor;
  stroke: none;
}

.toast {
  background: var(--text);
  border-radius: 8px;
  bottom: 18px;
  color: #07110d;
  left: 50%;
  opacity: 0;
  padding: 11px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 16px);
  transition: 180ms ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty {
  color: var(--muted);
  padding: 20px 0;
}

@media (max-width: 900px) {
  .tool-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .match-card {
    grid-template-columns: 1fr;
  }

  .match-meta {
    justify-items: start;
    text-align: left;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding-inline: 14px;
  }

  .brand small {
    display: none;
  }

  main {
    padding-inline: 14px;
  }

  h1 {
    font-size: 36px;
  }

  .hero-logo {
    height: 78px;
    width: 78px;
  }

  .hero-text {
    font-size: 15px;
    line-height: 1.48;
  }

  .hero-text.secondary {
    font-size: 14px;
  }

  .bangla-callout {
    font-size: 21px;
  }

  .signal-row {
    flex-wrap: nowrap;
    margin-right: -14px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .signal-row span {
    flex: 0 0 auto;
  }

  .team-grid {
    max-height: 238px;
  }

  .builder-row,
  .team-grid,
  .calendar-actions,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .section-head,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-links {
    justify-content: flex-start;
  }

  .filter-pills {
    overflow-x: auto;
  }
}
