:root {
  --bg: #05070b;
  --bg-soft: #0a0f17;
  --panel: rgba(11, 17, 27, 0.96);
  --panel-soft: rgba(15, 23, 36, 0.92);
  --panel-dark: rgba(5, 9, 15, 0.96);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f8fafc;
  --muted: #9ca8b7;
  --muted-2: #718096;
  --red: #ef1b2d;
  --red-dark: #b60d1b;
  --red-soft: rgba(239, 27, 45, 0.15);
  --green: #22d38b;
  --yellow: #f6c344;
  --blue: #4aa8ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.24);
  --radius: 18px;
  --radius-small: 12px;
  --container: 1460px;
  --header-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 10%, rgba(8, 81, 158, 0.14), transparent 35%),
    radial-gradient(circle at 20% 80%, rgba(203, 0, 20, 0.09), transparent 40%),
    linear-gradient(180deg, #05070b 0%, #060a10 50%, #030508 100%);
  font-family:
    "Noto Sans Thai",
    "Leelawadee UI",
    Tahoma,
    Arial,
    sans-serif;
  line-height: 1.55;
}

body.modal-open {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

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

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

.container {
  width: min(calc(100% - 34px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--red);
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 5, 9, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  font-size: 34px;
  filter: drop-shadow(0 7px 15px rgba(0, 0, 0, 0.5));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand-name {
  font-size: 25px;
  font-weight: 1000;
  letter-spacing: -0.8px;
}

.brand-name span {
  color: var(--red);
}

.brand-text small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.main-navigation {
  margin-left: auto;
  display: flex;
  align-items: stretch;
  gap: 26px;
}

.main-navigation a {
  position: relative;
  min-height: var(--header-height);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dde4ed;
  font-size: 14px;
  font-weight: 800;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.main-navigation a:hover,
.main-navigation a.active {
  color: #fff;
}

.main-navigation a.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--red);
}

.live-label {
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  background: var(--red);
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: 0.4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-button,
.install-button,
.menu-button {
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(12, 18, 28, 0.88);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.icon-button:hover,
.install-button:hover,
.menu-button:hover {
  border-color: rgba(239, 27, 45, 0.6);
  background: rgba(239, 27, 45, 0.12);
}

.icon-button:active,
.install-button:active,
.menu-button:active {
  transform: scale(0.97);
}

.icon-button {
  width: 43px;
  height: 43px;
  border-radius: 12px;
  font-size: 23px;
}

.install-button {
  min-height: 43px;
  padding: 0 17px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.menu-button {
  width: 44px;
  height: 44px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 12px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

/* Hero */

.hero-section {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(1,3,7,.88) 0%, rgba(2,6,12,.74) 42%, rgba(3,8,15,.48) 100%),
    linear-gradient(180deg, rgba(0,0,0,.12), rgba(2,5,9,.72)),
    url("/assets/stadium-premium.png") center center / cover no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 62%, rgba(5, 7, 11, 0.98)),
    radial-gradient(circle at 70% 48%, rgba(255, 255, 255, 0.04), transparent 25%),
    radial-gradient(circle at 73% 17%, rgba(255, 255, 255, 0.08), transparent 12%);
}

.hero-layout {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 570px);
  align-items: center;
  gap: 55px;
  padding-block: 42px;
}

.hero-content {
  max-width: 760px;
}

.hero-eyebrow,
.section-kicker {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 1.8px;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(60px, 7vw, 112px);
  font-style: italic;
  font-weight: 1000;
  line-height: 0.88;
  letter-spacing: -6px;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.78);
}

.hero-content h1 span {
  color: var(--red);
}

.hero-content h2 {
  margin: 20px 0 0;
  font-size: clamp(21px, 2.1vw, 34px);
  line-height: 1.25;
  font-weight: 900;
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.75);
}

.hero-description {
  max-width: 670px;
  margin: 10px 0 0;
  color: #e4e9ef;
  font-size: 16px;
  font-weight: 600;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
}

.hero-buttons {
  margin-top: 27px;
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 25px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  border-color: var(--red);
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 13px 35px rgba(239, 27, 45, 0.25);
}

.button-secondary {
  color: #fff;
  background: rgba(4, 8, 14, 0.56);
  backdrop-filter: blur(12px);
}

.button-secondary:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

.button-light {
  border-color: #fff;
  color: #111;
  background: #fff;
}

.system-status {
  margin-top: 19px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: #d3d9e2;
  font-size: 12px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(34, 211, 139, 0.8);
}

.status-dot.error {
  background: var(--red);
  box-shadow: 0 0 12px rgba(239, 27, 45, 0.8);
}

/* Panels */

.glass-panel,
.dashboard-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(14, 21, 32, 0.96), rgba(5, 10, 17, 0.96));
  box-shadow: var(--shadow-soft);
}

.glass-panel {
  background: rgba(5, 10, 17, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(17px);
}

.panel-header,
.card-header {
  min-height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2,
.card-header h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.panel-link,
.auto-update {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.panel-link:hover {
  color: #fff;
}

.hero-live-list {
  max-height: 385px;
  overflow-y: auto;
  padding: 9px 11px 12px;
}

.hero-live-list::-webkit-scrollbar,
.fixtures-list::-webkit-scrollbar,
.analysis-list::-webkit-scrollbar,
.news-list::-webkit-scrollbar,
.modal-dialog::-webkit-scrollbar {
  width: 6px;
}

.hero-live-list::-webkit-scrollbar-thumb,
.fixtures-list::-webkit-scrollbar-thumb,
.analysis-list::-webkit-scrollbar-thumb,
.news-list::-webkit-scrollbar-thumb,
.modal-dialog::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

/* Live match card */

.hero-match-row,
.live-match-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(18, 27, 41, 0.95), rgba(5, 10, 17, 0.95));
}

.hero-match-row {
  min-height: 91px;
  margin-top: 7px;
  padding: 11px 12px;
  border-radius: 12px;
}

.hero-match-row:first-child {
  margin-top: 0;
}

.live-match-card {
  border-radius: var(--radius-small);
  padding: 15px;
}

.hero-match-row::before,
.live-match-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--red);
}

.match-league-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  color: #fff;
  background: var(--red);
  font-size: 9px;
  font-weight: 1000;
}

.match-main-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.match-team {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
}

.match-team.away {
  flex-direction: row-reverse;
  text-align: right;
}

.match-team img,
.team-logo-placeholder {
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  object-fit: contain;
}

.team-logo-placeholder {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 17px;
}

.match-team span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-score {
  min-width: 75px;
  text-align: center;
  font-size: 28px;
  font-weight: 1000;
  letter-spacing: 2px;
}

.match-minute {
  min-width: 42px;
  text-align: right;
  color: var(--red);
  font-size: 13px;
  font-weight: 1000;
}

.match-card-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.match-detail-button,
.analysis-button {
  border: 0;
  padding: 0;
  color: var(--red);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.match-detail-button:hover,
.analysis-button:hover {
  color: #ff6471;
}

/* Main dashboard */

.main-dashboard {
  padding: 18px 0 6px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.95fr 0.95fr 1fr;
  gap: 15px;
  align-items: stretch;
}

.dashboard-card {
  min-width: 0;
  overflow: hidden;
}

.fixtures-card,
.standings-card,
.analysis-card,
.news-card {
  min-height: 510px;
}

/* Fixtures */

.date-tabs {
  display: flex;
  gap: 7px;
  padding: 11px 13px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.date-tabs::-webkit-scrollbar {
  display: none;
}

.date-tab,
.filter-button {
  flex: 0 0 auto;
  min-height: 35px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #d6dde7;
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
  font-weight: 800;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.date-tab:hover,
.filter-button:hover {
  border-color: rgba(239, 27, 45, 0.5);
}

.date-tab.active,
.filter-button.active {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.fixtures-list {
  max-height: 422px;
  overflow-y: auto;
  padding: 10px 13px 13px;
}

.fixture-item {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
}

.fixture-item:last-child {
  border-bottom: 0;
}

.fixture-time {
  color: var(--red);
  font-size: 13px;
  font-weight: 1000;
}

.fixture-team {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
}

.fixture-team.away {
  flex-direction: row-reverse;
  text-align: right;
}

.fixture-team img {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  object-fit: contain;
}

.fixture-team span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixture-vs {
  color: var(--muted);
  font-size: 10px;
  font-weight: 1000;
}

.fixture-league {
  grid-column: 2 / -1;
  margin-top: -5px;
  color: var(--muted-2);
  font-size: 9px;
}

/* Standings */

.league-select {
  max-width: 180px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  color: #fff;
  background: #0c1420;
  font-size: 11px;
  font-weight: 800;
}

.league-select:focus {
  border-color: var(--red);
}

.table-wrapper {
  overflow: auto;
}

.standings-table {
  min-width: 460px;
  font-size: 12px;
}

.standings-table th,
.standings-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
}

.standings-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: left;
}

.standings-table td:first-child,
.standings-table th:first-child {
  width: 54px;
  text-align: center;
}

.standings-table td:nth-last-child(-n + 3),
.standings-table th:nth-last-child(-n + 3) {
  text-align: center;
}

.standings-team {
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.standings-team img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

/* Analysis */

.premium-badge {
  padding: 3px 8px;
  border: 1px solid rgba(239, 27, 45, 0.45);
  border-radius: 7px;
  color: #ffadb4;
  background: var(--red-soft);
  font-size: 9px;
  font-weight: 1000;
}

.analysis-list,
.news-list {
  max-height: 442px;
  overflow-y: auto;
  padding: 9px 13px 13px;
}

.analysis-item,
.news-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.analysis-item:last-child,
.news-item:last-child {
  border-bottom: 0;
}

.analysis-thumb,
.news-image {
  width: 100px;
  height: 72px;
  overflow: hidden;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(239, 27, 45, 0.14), rgba(31, 42, 57, 0.7));
}

.analysis-thumb img,
.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.analysis-content,
.news-content {
  min-width: 0;
}

.analysis-content h3,
.news-content h3 {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.analysis-content p,
.news-content p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.analysis-button {
  margin-top: 7px;
}

.news-category {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--red);
  font-size: 9px;
  font-weight: 1000;
}

.football-image-one {
  background:
    linear-gradient(rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.35)),
    url("/assets/images/stadium-bg.jpg") center / cover no-repeat;
}

.football-image-two {
  background:
    linear-gradient(135deg, rgba(239, 27, 45, 0.22), rgba(3, 8, 14, 0.58)),
    url("/assets/images/stadium-bg.jpg") 60% center / cover no-repeat;
}

.football-image-three {
  background:
    linear-gradient(135deg, rgba(35, 92, 153, 0.25), rgba(4, 8, 14, 0.62)),
    url("/assets/images/stadium-bg.jpg") left center / cover no-repeat;
}

/* Live center */

.live-center-section {
  padding: 18px 0 0;
}

.section-heading {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
}

.live-tools {
  display: flex;
  gap: 8px;
}

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

/* Premium banner */

.premium-banner-section {
  padding: 17px 0 28px;
}

.premium-banner {
  position: relative;
  min-height: 145px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 38px;
  padding: 20px 100px;
  border: 1px solid rgba(239, 27, 45, 0.45);
  border-radius: 22px;
  background:
    radial-gradient(circle at 28% 50%, rgba(255, 255, 255, 0.1), transparent 17%),
    radial-gradient(circle at 75% 40%, rgba(255, 255, 255, 0.09), transparent 18%),
    linear-gradient(110deg, #140005 0%, #8d000b 48%, #180005 100%);
  box-shadow:
    inset 0 0 75px rgba(0, 0, 0, 0.42),
    0 20px 55px rgba(0, 0, 0, 0.28);
}

.premium-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.premium-banner-content span {
  color: #ffafb6;
  font-size: 12px;
  font-weight: 900;
}

.premium-banner-content h2 {
  margin: 3px 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.05;
}

.premium-banner-content p {
  margin: 0;
  color: #e8d7da;
  font-size: 13px;
}

.banner-decoration {
  position: absolute;
  top: 50%;
  z-index: 1;
  font-size: 100px;
  opacity: 0.25;
  transform: translateY(-50%);
}

.banner-decoration-left {
  left: 5%;
}

.banner-decoration-right {
  right: 5%;
}

/* Footer */

.site-footer {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  background: #030508;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.8fr 0.8fr;
  gap: 35px;
  padding: 42px 0;
}

.footer-brand p {
  max-width: 420px;
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-column h3 {
  margin: 0 0 7px;
  font-size: 14px;
}

.footer-column a {
  color: var(--muted);
  font-size: 12px;
}

.footer-column a:hover {
  color: #fff;
}

.footer-signature {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.footer-signature span {
  color: var(--muted);
  font-size: 11px;
}

.footer-signature strong {
  color: #fff;
  font-size: 17px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
}

.footer-bottom .container {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-bottom p {
  margin: 0;
  color: var(--muted-2);
  font-size: 11px;
}

/* Modal */

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  z-index: 5000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    linear-gradient(145deg, #0e1723, #060b12);
  box-shadow: var(--shadow);
}

.modal-dialog-large {
  width: min(1040px, 100%);
}

.modal-header {
  position: sticky;
  z-index: 3;
  top: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 19px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 21, 0.96);
  backdrop-filter: blur(14px);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  width: 41px;
  height: 41px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #fff;
  background: #111a27;
  font-size: 24px;
}

.modal-close:hover {
  border-color: var(--red);
  background: var(--red-soft);
}

.modal-body {
  padding: 20px;
}

.prediction-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.prediction-team img {
  width: 82px;
  height: 82px;
  margin: 0 auto 9px;
  object-fit: contain;
}

.prediction-team strong {
  display: block;
}

.prediction-vs {
  color: var(--red);
  font-size: 21px;
  font-weight: 1000;
}

.prediction-percent-grid {
  margin-top: 21px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.prediction-percent-card {
  padding: 13px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.025);
}

.prediction-percent-card span {
  color: var(--muted);
  font-size: 11px;
}

.prediction-percent-card strong {
  display: block;
  margin-top: 4px;
  color: var(--red);
  font-size: 23px;
}

.prediction-advice {
  margin-top: 15px;
  padding: 15px;
  border-left: 4px solid var(--red);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.prediction-advice p {
  margin: 6px 0 0;
  color: #dce3eb;
  font-size: 13px;
}

/* Match center */

.match-center-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 15px 0 23px;
  text-align: center;
}

.match-center-team img {
  width: 84px;
  height: 84px;
  margin: 0 auto 9px;
  object-fit: contain;
}

.match-center-team strong {
  display: block;
  font-size: 16px;
}

.match-center-score {
  font-size: 44px;
  font-weight: 1000;
  letter-spacing: 2px;
}

.match-center-status {
  margin-top: 3px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

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

.match-center-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.match-center-panel h3 {
  margin: 0;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.match-center-panel-body {
  padding: 13px 15px;
}

.event-list {
  display: grid;
  gap: 8px;
}

.event-item {
  display: grid;
  grid-template-columns: 43px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.event-item:last-child {
  border-bottom: 0;
}

.event-time {
  color: var(--red);
  font-weight: 900;
}

.event-description {
  min-width: 0;
}

.event-description strong {
  display: block;
}

.event-description small {
  color: var(--muted);
}

.event-icon {
  font-size: 18px;
}

.stats-list {
  display: grid;
  gap: 14px;
}

.stat-row {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 11px;
}

.stat-value {
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.stat-center {
  display: grid;
  gap: 5px;
}

.stat-title {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.stat-bar {
  height: 7px;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.stat-bar-home {
  background: var(--red);
}

.stat-bar-away {
  background: var(--blue);
}

.lineup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.lineup-column {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.lineup-column h4 {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 11px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.player-row:last-child {
  border-bottom: 0;
}

.player-number {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  background: rgba(239, 27, 45, 0.14);
  color: #ff8f99;
  font-weight: 900;
}

.player-rating {
  margin-left: auto;
  color: var(--yellow);
  font-weight: 900;
}

/* States */

.loading-state,
.empty-state,
.error-state {
  min-height: 110px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
}

.loading-state.large {
  min-height: 220px;
}

.loading-state.compact {
  min-height: 60px;
}

.loading-state p,
.empty-state p,
.error-state p {
  margin: 0;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  display: block;
  border: 3px solid rgba(255, 255, 255, 0.11);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.error-state {
  color: #ff8d97;
}

.error-box {
  padding: 14px;
  border: 1px solid rgba(239, 27, 45, 0.3);
  border-radius: 11px;
  color: #ff909a;
  background: rgba(239, 27, 45, 0.08);
  font-size: 12px;
  text-align: center;
}

.noscript-message {
  position: fixed;
  z-index: 9999;
  right: 15px;
  bottom: 15px;
  left: 15px;
  padding: 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--red);
  text-align: center;
  font-weight: 800;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */

@media (max-width: 1240px) {
  .main-navigation {
    gap: 18px;
  }

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

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

  .footer-grid {
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
  }

  .footer-signature {
    grid-column: 1 / -1;
    align-items: flex-start;
  }
}

@media (max-width: 1050px) {
  :root {
    --header-height: 68px;
  }

  .header-inner {
    gap: 14px;
  }

  .menu-button {
    margin-left: auto;
    display: flex;
  }

  .main-navigation {
    position: fixed;
    z-index: 990;
    top: var(--header-height);
    right: 0;
    left: 0;
    display: none;
    padding: 10px 18px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(3, 6, 10, 0.98);
    flex-direction: column;
    gap: 0;
  }

  .main-navigation.open {
    display: flex;
  }

  .main-navigation a {
    min-height: 46px;
    padding: 0 4px;
    border-bottom: 1px solid var(--line);
  }

  .main-navigation a.active::after {
    right: auto;
    width: 42px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-content {
    max-width: none;
  }

  .hero-live-panel {
    width: 100%;
  }

  .hero-live-list {
    max-height: none;
  }

  .premium-banner {
    padding-inline: 70px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 22px), var(--container));
  }

  .site-header {
    position: sticky;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 28px;
  }

  .brand-name {
    font-size: 21px;
  }

  .brand-text small {
    display: none;
  }

  .header-actions .install-button {
    display: none;
  }

  .hero-section,
  .hero-layout {
    min-height: auto;
  }

  .hero-layout {
    padding-block: 40px 24px;
  }

  .hero-content h1 {
    font-size: 57px;
    letter-spacing: -3px;
  }

  .hero-content h2 {
    margin-top: 15px;
    font-size: 22px;
  }

  .hero-description {
    font-size: 13px;
  }

  .hero-buttons {
    margin-top: 21px;
  }

  .button {
    flex: 1 1 145px;
    min-height: 47px;
    padding-inline: 17px;
  }

  .panel-header,
  .card-header {
    min-height: 62px;
    padding: 12px 14px;
  }

  .panel-header h2,
  .card-header h2 {
    font-size: 17px;
  }

  .match-main-row {
    grid-template-columns: 1fr auto 1fr;
    gap: 7px;
  }

  .match-team {
    flex-direction: column;
    text-align: center;
    gap: 4px;
    font-size: 10px;
  }

  .match-team.away {
    flex-direction: column;
    text-align: center;
  }

  .match-minute {
    grid-column: 1 / -1;
    justify-self: center;
    min-width: 0;
    text-align: center;
  }

  .match-score {
    min-width: 65px;
    font-size: 24px;
  }

  .dashboard-grid,
  .live-match-grid {
    grid-template-columns: 1fr;
  }

  .fixtures-card,
  .standings-card,
  .analysis-card,
  .news-card {
    min-height: auto;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .premium-banner {
    min-height: 190px;
    padding: 24px 20px;
    flex-direction: column;
    gap: 18px;
  }

  .premium-banner-content p {
    font-size: 11px;
  }

  .banner-decoration {
    font-size: 65px;
    opacity: 0.14;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-signature {
    align-items: flex-start;
  }

  .footer-bottom .container {
    min-height: 75px;
    padding-block: 15px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    text-align: center;
  }

  .modal {
    padding: 10px;
  }

  .modal-dialog,
  .modal-dialog-large {
    max-height: 94vh;
    border-radius: 16px;
  }

  .modal-body {
    padding: 14px;
  }

  .prediction-match,
  .match-center-head {
    grid-template-columns: 1fr auto 1fr;
    gap: 9px;
  }

  .prediction-team img,
  .match-center-team img {
    width: 58px;
    height: 58px;
  }

  .prediction-team strong,
  .match-center-team strong {
    font-size: 11px;
  }

  .match-center-score {
    font-size: 34px;
  }

  .prediction-percent-grid,
  .match-center-grid,
  .lineup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .header-actions .icon-button {
    display: none;
  }

  .hero-content h1 {
    font-size: 49px;
  }

  .hero-content h2 {
    font-size: 19px;
  }

  .analysis-item,
  .news-item {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .analysis-thumb,
  .news-image {
    width: 88px;
    height: 65px;
  }

  .fixture-item {
    grid-template-columns: 47px 1fr auto 1fr;
    gap: 5px;
  }

  .fixture-team {
    font-size: 10px;
  }

  .fixture-team img {
    width: 22px;
    height: 22px;
  }

  .fixture-league {
    font-size: 8px;
  }

  .league-select {
    max-width: 140px;
  }
}

/* =========================================================
   BALLTODAY LIVE SCORE - MOBILE FULL FIT FINAL
========================================================= */
.hero-score-preview {
  min-height: 340px;
}

.hero-score-content {
  min-height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  text-align: center;
}

.hero-score-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(239, 27, 45, 0.35);
  border-radius: 50%;
  background: rgba(239, 27, 45, 0.1);
  box-shadow: 0 0 35px rgba(239, 27, 45, 0.16);
  font-size: 35px;
}

.hero-score-content h3 { margin: 5px 0 0; font-size: 20px; }
.hero-score-content p { max-width: 370px; margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.hero-score-content .button { flex: 0 0 auto; width: auto; min-width: 180px; }

.widget-live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.widget-live-status i {
  width: 9px;
  height: 9px;
  display: block;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 13px rgba(34, 211, 139, 0.9);
  animation: scoreLivePulse 1.6s infinite;
}

.embedded-score-section {
  position: relative;
  z-index: 5;
  display: block;
  padding: 28px 0;
  background: #05070b;
  scroll-margin-top: 84px;
}

.embedded-score-heading { margin-bottom: 15px; }
.embedded-score-description { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.score-widget-shell {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: #0b1018;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
}

.score-widget-toolbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 17px;
  color: #fff;
  background: linear-gradient(135deg, #101824, #070b12);
}

.score-widget-title { display: flex; align-items: center; gap: 11px; }
.score-widget-ball { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(239, 27, 45, 0.13); font-size: 24px; }
.score-widget-title strong { display: block; font-size: 15px; }
.score-widget-title small { display: block; margin-top: 2px; color: #8f9cad; font-size: 10px; }

.score-reload-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(239, 27, 45, 0.5);
  border-radius: 9px;
  color: #fff;
  background: rgba(239, 27, 45, 0.12);
  font-size: 11px;
  font-weight: 900;
}
.score-reload-button:hover { background: var(--red); }
.score-reload-button:disabled { cursor: wait; opacity: 0.65; }

.score-iframe-crop {
  position: relative;
  width: 100%;
  height: 760px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.score-iframe-stage {
  position: relative;
  width: 100%;
  min-height: 1px;
  overflow: hidden;
  background: #fff;
}

.score-iframe {
  position: absolute;
  top: -60px;
  left: 0;
  display: block;
  width: 1200px;
  min-width: 1200px;
  max-width: none;
  height: 5200px;
  border: 0;
  background: #fff;
  transform-origin: top left;
}

@keyframes scoreLivePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.78); }
}

@media (max-width: 760px) {
  .hero-score-preview { min-height: auto; }
  .hero-score-content { min-height: 300px; padding: 28px 18px; }
  .hero-score-content .button { min-width: 190px; }
  .embedded-score-section { padding: 22px 0 28px; }
  .score-widget-shell { border-radius: 14px; }
  .score-widget-toolbar { min-height: 60px; padding: 10px 12px; }
  .score-widget-title strong { font-size: 13px; }
  .score-widget-title small { font-size: 9px; }
  .score-reload-button { flex: 0 0 auto; padding-inline: 11px; }
  .score-iframe-crop { height: 680px; }
}

@media (max-width: 460px) {
  .score-iframe-crop { height: 640px; }
}


/* HN-FOOTBALLCLUB */
.hn-club-card{display:grid;grid-template-columns:minmax(180px,.9fr) minmax(0,1.1fr);min-height:510px;overflow:hidden;border-color:rgba(226,181,86,.28);background:radial-gradient(circle at 30% 20%,rgba(226,181,86,.10),transparent 34%),linear-gradient(145deg,rgba(18,21,28,.98),rgba(5,8,13,.98))}
.hn-club-media{min-height:100%;overflow:hidden;background:#05070b}
.hn-club-media img{width:100%;height:100%;object-fit:cover}
.hn-club-content{display:flex;flex-direction:column;justify-content:center;padding:28px}
.hn-club-content h2{margin:0;font-size:28px;color:#f0c66b}
.hn-club-content p{margin:12px 0 22px;color:var(--muted);font-size:14px}
.hn-club-button{align-self:flex-start}

/* 888Score final responsive */
.score-iframe-crop{position:relative;width:100%;height:min(900px,82vh);overflow-x:hidden;overflow-y:auto;background:#fff;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y}
.score-iframe-stage{position:relative;width:100%;min-height:1px;overflow:hidden;background:#fff}
.score-iframe{position:absolute;top:-60px;left:0;display:block;width:1200px;min-width:1200px;max-width:none;height:5200px;border:0;background:#fff;transform-origin:top left}
@media(max-width:900px){.hn-club-card{grid-template-columns:1fr}.hn-club-media{min-height:360px}}
@media(max-width:760px){.score-iframe-crop{height:76vh}.hn-club-card{min-height:auto}.hn-club-media{min-height:430px}.hn-club-content{padding:22px 18px 24px}.hn-club-content h2{font-size:23px}.hn-club-button{width:100%}}
@media(max-width:460px){.hn-club-media{min-height:360px}.score-iframe-crop{height:74vh}}
/* ปิดเฉพาะข้อความมุมขวาบนของ iframe */
.score-widget-shell {
  position: relative;
  overflow: hidden;
}

.score-widget-shell::after {
  content: "";
  position: absolute;
  z-index: 30;
  top: 66px;
  right: 0;
  width: 210px;
  height: 21px;
  background: #ffffff;
  pointer-events: none;
}

/* มือถือ */
@media (max-width: 760px) {
  .score-widget-shell::after {
    top: 60px;
    right: 0;
    width: 115px;
    height: 14px;
  }
}


/* =========================================================
   BALLTODAY ULTRA PREMIUM V8 OVERRIDES
========================================================= */
.hero-layout {
  grid-template-columns: minmax(0, 1fr);
}

.hero-content {
  max-width: 900px;
}

.button-download-hero,
.download-app-button {
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  background: linear-gradient(135deg, #192536, #0b111b);
}

.button-download-hero:hover,
.download-app-button:hover {
  border-color: var(--red);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
}

.embedded-score-section {
  padding-top: 24px;
}

.main-dashboard {
  padding-top: 24px;
}

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

.hn-club-card {
  grid-column: 1 / -1;
  min-height: 430px;
}

.ballstep-card {
  grid-column: 1 / -1;
  min-height: auto;
}

.ballstep-body {
  padding: 22px;
}

.ballstep-intro {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.ballstep-rows {
  display: grid;
  gap: 10px;
}

.ballstep-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 42px;
  gap: 10px;
}

.ballstep-row input,
.ballstep-row select,
.ballstep-stake-label input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  color: #fff;
  background: rgba(255,255,255,.045);
  padding: 0 13px;
}

.ballstep-row input:focus,
.ballstep-row select:focus,
.ballstep-stake-label input:focus {
  border-color: var(--red);
}

.ballstep-remove {
  border: 1px solid rgba(239,27,45,.42);
  border-radius: 10px;
  color: #fff;
  background: rgba(239,27,45,.12);
  font-size: 22px;
}

.ballstep-controls {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.ballstep-stake-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.ballstep-add {
  min-width: 170px;
}

.ballstep-result-box {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(34,211,139,.34);
  border-radius: 14px;
  background: rgba(34,211,139,.08);
}

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

.ballstep-result-item span {
  color: var(--muted);
  font-size: 11px;
}

.ballstep-result-item strong {
  display: block;
  margin-top: 3px;
  font-size: 22px;
}

.ballstep-note {
  margin: 12px 0 0;
  color: var(--muted-2);
  font-size: 10px;
}

@media (max-width: 1050px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .header-actions {
    gap: 6px;
  }

  .download-app-button {
    min-height: 40px;
    padding: 0 11px;
    font-size: 11px;
  }

  .hero-buttons .button,
  .hero-buttons button {
    flex: 1 1 100%;
  }

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

  .ballstep-row {
    grid-template-columns: minmax(0, 1fr) 118px 40px;
    gap: 7px;
  }

  .ballstep-controls {
    grid-template-columns: 1fr;
  }

  .ballstep-result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .download-app-button {
    max-width: 124px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ballstep-body {
    padding: 16px 12px;
  }

  .ballstep-row {
    grid-template-columns: minmax(0, 1fr) 105px 38px;
  }
}
