:root {
  --primary: #1a1a2e;
  --secondary: #c8102e;
  --accent: #f5a623;
  --gold: #d4a017;
  --silver: #8a8a8a;
  --bronze: #cd7f32;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--gray-100);
}

.top-bar {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 3px solid var(--secondary);
}

header {
  background: linear-gradient(135deg, var(--primary) 0%, #16213e 100%);
  color: var(--white);
  padding: 0;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}

header h1 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

header h1 span {
  color: var(--accent);
}

header .emblem {
  display: flex;
  align-items: center;
  gap: 8px;
}

header .emblem-icon {
  width: 2.0rem;
  height: 2.0rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

header .emblem-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.3s, background 0.3s;
}

nav a:hover, nav a.active {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #16213e 50%, #0f3460 100%);
  color: var(--white);
  text-align: center;
  padding: 70px 20px 60px;
  position: relative;
  overflow: hidden;
}

.hero.has-banner {
  background: var(--primary);
  padding: 50px 20px 40px;
}

.hero.has-banner .hero-bg-img {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero.has-banner .hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(26,26,46,0.7) 0%, rgba(22,33,62,0.5) 100%);
}

.hero.has-banner .container {
  position: relative;
  z-index: 2;
}

.hero.has-banner .badge {
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}

.hero.has-banner .organizers {
  border-top-color: rgba(255,255,255,0.25);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero .badge {
  display: inline-block;
  background: var(--secondary);
  padding: clamp(10px, 3vw, 16px) clamp(16px, 4vw, 40px);
  border-radius: 16px;
  font-weight: 900;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  text-transform: uppercase;
  letter-spacing: clamp(1px, 0.5vw, 3px);
  margin-bottom: 16px;
  box-shadow: 0 6px 24px rgba(200,16,46,0.4);
  line-height: 1.3;
}

.hero h2 {
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 2px;
  opacity: 0.85;
}

.hero .subtitle {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-bottom: 20px;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero .details {
  font-size: 0.9rem;
  opacity: 0.8;
}

.hero .details span {
  display: inline-block;
  margin: 0 8px;
}
.hero .details .sep { opacity: 0.4; }

.hero .details .clickable {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.3s, opacity 0.3s;
}
.hero .details .clickable:hover {
  background: rgba(255,255,255,0.15);
  opacity: 1;
}

.hero .organizers {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Info Cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  padding: 20px 0;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  border: 1px solid var(--gray-200);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card .icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
}

.card h3 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.card p, .card li {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.card ul { list-style: none; padding: 0; }
.card ul li { padding: 4px 0; border-bottom: 1px solid var(--gray-200); }
.card ul li:last-child { border-bottom: none; }

/* Section */
/* ── Page Header ── */
.page-header { position:relative; background:linear-gradient(135deg,#0f172a 0%,#1e293b 50%,#0f172a 100%); padding:40px 24px; text-align:center; color:#fff; margin-bottom:28px; overflow:hidden; }
.page-header::before { content:''; position:absolute; inset:0; background:radial-gradient(ellipse at 30% 50%,rgba(59,130,246,0.12) 0%,transparent 60%),radial-gradient(ellipse at 70% 50%,rgba(139,92,246,0.08) 0%,transparent 60%); pointer-events:none; }
.page-header h2 { font-size:1.5rem; font-weight:800; margin:0 0 6px; position:relative; }
.page-header p { font-size:0.82rem; opacity:0.7; margin:0; position:relative; max-width:500px; margin-left:auto; margin-right:auto; }
.page-header .hm-badge-inner { font-size:0.7rem; padding:8px 20px; margin-bottom:12px; }

.section {
  padding: 28px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 20px;
}

.section-header h2 {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 800;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--secondary);
  margin: 10px auto 0;
  border-radius: 2px;
}

.section-header p {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* Tables */
.table-container {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 0.85rem;
}

thead {
  background: linear-gradient(135deg, #1e1b4b, #4f46e5);
  color: var(--white);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tbody tr {
  transition: background 0.15s;
}
tbody tr:hover { background: #f8faff; }
tbody tr:nth-child(even) { background: #fafbfc; }
tbody tr:nth-child(even):hover { background: #f0f4ff; }

td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-badge.completed { background: #d4edda; color: #155724; }
.status-badge.ongoing { background: #fff3cd; color: #856404; animation: pulse 1.5s infinite; }
.status-badge.upcoming { background: #cce5ff; color: #004085; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Score display */
.score-display {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
  letter-spacing: 1px;
}
.score-display .vs { color: var(--gray-300); font-weight: 400; font-size: 0.85rem; margin: 0 6px; }

/* Standings medal */
.rank-medal { font-size: 1.1rem; }
.rank-1 { color: var(--gold); }
.rank-2 { color: var(--silver); }
.rank-3 { color: var(--bronze); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
  text-align: center;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: #2d2d4e; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-accent { background: var(--secondary); color: var(--white); }
.btn-accent:hover { background: #a00d24; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-white { background: var(--white); color: var(--primary); }
.btn-white:hover { background: var(--gray-100); }

/* Result cards */
.result-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border-left: 4px solid var(--secondary);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.result-card:hover { transform: translateX(3px); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.result-card .teams { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; }
.result-card .team { font-weight: 600; font-size: 0.9rem; }
.result-card .score { font-size: 1.4rem; font-weight: 900; color: var(--primary); }
.result-card .meta { font-size: 0.75rem; color: var(--gray-600); }
.result-card .divider { color: var(--gray-300); font-weight: 300; }

/* Standings podium */
.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  padding: 30px 0;
  margin-bottom: 24px;
}
.podium-item {
  text-align: center;
  width: 120px;
}
.podium-item .place {
  font-size: 2rem;
  margin-bottom: 4px;
}
.podium-item .team-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 4px;
}
.podium-item .points {
  font-size: 0.8rem;
  color: var(--gray-600);
}
.podium-item .bar {
  width: 100%;
  border-radius: 8px 8px 0 0;
  margin-top: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px 0;
  font-weight: 900;
  font-size: 1.2rem;
  color: white;
}
.podium-item.first .bar { height: 100px; background: linear-gradient(180deg, var(--gold), #f0c040); }
.podium-item.second .bar { height: 75px; background: linear-gradient(180deg, var(--silver), #b0b0b0); }
.podium-item.third .bar { height: 50px; background: linear-gradient(180deg, var(--bronze), #e0a070); }
.podium-item.fourth .bar { height: 30px; background: linear-gradient(180deg, #94a3b8, #cbd5e1); }
.podium-item.first { order: 2; }
.podium-item.second { order: 1; }
.podium-item.third { order: 3; }
.podium-item.fourth { order: 4; }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  justify-content: center;
}
.filter-bar select, .filter-bar input {
  padding: 9px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.82rem;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-bar select:focus, .filter-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,26,46,0.1);
}

/* Accordion */
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  will-change: max-height;
}
.accordion-body.open {
  max-height: 3000px;
}
.accordion-header {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.accordion-header:hover h2 {
  opacity: 0.8;
}
.accordion-arrow {
  display: inline-block;
  font-size: 0.7rem;
  margin-left: 8px;
  transition: transform 0.3s;
  vertical-align: middle;
}
.accordion-header.open .accordion-arrow {
  transform: rotate(180deg);
}

/* Alert */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-info { background: #e8f4fd; color: #0c5460; border-left: 4px solid #17a2b8; }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }

/* Loading */
.loading { text-align: center; padding: 60px 20px; color: var(--gray-600); }
.spinner { width: 40px; height: 40px; border: 4px solid var(--gray-200); border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* QR */
.qr-section {
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  margin: 20px 0;
  border: 1px solid var(--gray-200);
}
.qr-section h3 {
  color: var(--primary);
  margin-bottom: 8px;
}
.qr-section img {
  width: 140px;
  height: 140px;
  margin: 16px 0;
  border-radius: var(--radius-sm);
}
.qr-section .url {
  font-size: 0.8rem;
  color: var(--gray-600);
  word-break: break-all;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-grid .gallery-item {
  min-height: 180px;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.gallery-grid .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery-grid .gallery-item:hover img { transform: scale(1.05); }
.gallery-grid .gallery-item .caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  padding: 24px 10px 8px;
  font-size: 0.8rem;
}
.gallery-grid .placeholder {
  min-height: 180px;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.85rem;
  gap: 4px;
  border: 2px dashed rgba(99,102,241,0.2);
}

/* Bulletin */
.bulletin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 30px 0;
}
.bulletin-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px 20px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--gray-200);
}
.bulletin-item:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.08); }
.bulletin-item .day { font-size: 1.1rem; font-weight: 800; color: var(--primary); margin-bottom: 2px; }
.bulletin-item .date { font-size: 0.8rem; color: var(--gray-600); margin-bottom: 16px; }
.bulletin-item .icon { font-size: 2.2rem; margin-bottom: 12px; }

/* ── QR Section ── */
.qr-section { background:var(--white); border-radius:var(--radius); padding:24px; margin-top:16px; border:1px solid var(--gray-200); box-shadow:var(--shadow-sm); text-align:center; }
.qr-section h3 { font-size:1rem; font-weight:700; color:var(--gray-900); margin:0 0 4px; }
.qr-section img { border-radius:12px; margin:16px auto; box-shadow:0 2px 12px rgba(0,0,0,0.06); }

/* Floating Widgets */
.floating-btt {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(200,16,46,0.35);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
  opacity: 0;
  transform: translateY(20px);
  will-change: transform, opacity;
}
.floating-btt.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.floating-btt:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(200,16,46,0.5);
}

.floating-announce {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245,166,35,0.35);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s, transform 0.3s;
  animation: float-pulse 2s infinite;
  will-change: transform;
}
.floating-announce:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}
.floating-announce.blink-warning {
  animation: blink-warning 0.5s ease 3 !important;
  background: #dc2626 !important;
  color: white !important;
}
@keyframes blink-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; transform: scale(0.9); }
}
.floating-announce .badge-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--secondary);
  border: 2px solid white;
  font-size: 0.55rem;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-scoreboard-wrap {
  position: fixed;
  bottom: 80px;
  left: 0;
  right: 0;
  z-index: 998;
  display: none;
  justify-content: center;
  pointer-events: none;
  will-change: transform;
}
.floating-scoreboard-wrap.show {
  display: flex;
}
.floating-scoreboard {
  max-width: 450px;
  width: 90%;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  border-radius: 16px;
  padding: 16px 18px 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,215,0,0.15);
  will-change: transform;
  transform: translateZ(0);
  animation: float 3s ease-in-out infinite;
  transition: opacity 0.3s, transform 0.3s;
  position: relative;
  pointer-events: all;
}
.floating-scoreboard .fs-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-right: 30px;
}
.floating-scoreboard .fs-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 10px;
  border-radius: 99px;
  background: rgba(255,255,255,0.15);
  color: #ffd700;
}
.floating-scoreboard .fs-badge.live {
  background: rgba(74,222,128,0.2);
  color: #4ade80;
}
.floating-scoreboard .fs-badge .pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse 1s infinite;
  margin-right: 3px;
}
.floating-scoreboard .fs-teams {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  padding-right: 30px;
  background: linear-gradient(135deg, #fff 0%, #ffd700 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}
.floating-scoreboard .fs-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
  padding-right: 30px;
}
.floating-scoreboard .fs-meta {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.floating-scoreboard .fs-score {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255,215,0,0.3);
}
.floating-scoreboard .fs-close {
  position: absolute;
  right: 10px;
  top: 10px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 1.3rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
  z-index: 1;
}
.floating-scoreboard .fs-close:hover { background: rgba(255,255,255,0.3); color: white; }
.floating-scoreboard .fs-close:active { background: rgba(255,255,255,0.4); }
@media (max-width:600px) {
  .floating-scoreboard-wrap { bottom: 66px; }
  .floating-scoreboard { padding: 14px 14px 12px; }
  .floating-scoreboard .fs-teams { font-size: 0.82rem; }
  .floating-scoreboard .fs-score { font-size: 0.95rem; }
  .floating-scoreboard .fs-bottom { gap: 8px; }
  .floating-scoreboard .fs-close { width: 34px; height: 34px; right: 8px; top: 8px; font-size: 1.4rem; }
}

/* Announcement Modal */
.announce-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.announce-overlay.open { display: flex; }
.announce-modal {
  background: white;
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 28px;
  position: relative;
}
.announce-modal h3 {
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 16px;
  padding-right: 30px;
}
.announce-modal .close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-600);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.announce-modal .close-btn:hover {
  background: var(--gray-100);
  color: var(--primary);
}
.announce-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
}
.announce-item:last-child { border-bottom: none; }
.announce-item .date {
  font-size: 0.72rem;
  color: var(--gray-600);
  margin-bottom: 4px;
}
.announce-item .msg {
  font-size: 0.88rem;
  color: var(--primary);
  line-height: 1.5;
}
.announce-empty {
  text-align: center;
  padding: 30px;
  color: var(--gray-600);
  font-size: 0.85rem;
}

@keyframes float-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@media (max-width: 768px) {
  .floating-btt { bottom: 16px; right: 16px; width: 42px; height: 42px; font-size: 1.1rem; }
  .floating-announce { bottom: 16px; left: 16px; width: 42px; height: 42px; font-size: 1rem; }
  .floating-scoreboard { bottom: 66px; padding: 8px 14px; font-size: 0.8rem; }
  .floating-scoreboard .fs-score { font-size: 0.9rem; }
}

/* Footer */
footer {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 28px 0;
  margin-top: 28px;
}
footer .logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
footer .logos span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}
footer p { font-size: 0.8rem; opacity: 0.6; }
footer .credit { font-size: 0.7rem; opacity: 0.4; margin-top: 4px; }

/* Responsive */
@media (max-width: 768px) {
  header .container { padding: 10px 16px; flex-wrap: wrap; }
  header h1 { font-size: 0.9rem; }
  .header-logos { display:none; }
  .hero { padding: 50px 16px 40px; }
  .hero.has-banner { padding: 40px 16px 30px; }
  .hero .badge { font-size: 1.1rem; padding: 12px 20px; letter-spacing: 1px; border-radius: 12px; word-break: break-word; }
  .hero h2 { font-size: 1rem; letter-spacing: 1px; }
  .hero .details { font-size: 0.8rem; }
  .hero .details span { display: inline-block; margin: 2px 4px; }
  nav { display: none; width: 100%; flex-direction: column; margin-top: 10px; }
  nav.show { display: flex; }
  .menu-toggle { display: block; }
  .section { padding: 20px 0; }
  .section-header h2 { font-size: 1.2rem; }
  .info-cards { grid-template-columns: 1fr; padding: 24px 0; }
  .card { padding: 20px; }
  .podium { flex-wrap: wrap; }
  .podium-item { width: 100px; }
  .podium-item.first .bar { height: 80px; }
  .podium-item.second .bar { height: 60px; }
  .podium-item.third .bar { height: 40px; }
  .podium-item.fourth .bar { height: 25px; }
  .result-card { flex-direction: column; text-align: center; }
  .result-card .teams { justify-content: center; }
  .qr-section { padding: 24px 16px; }
  table { font-size: 0.75rem; }
  th, td { padding: 8px 10px; }
  .agenda-item { flex-direction: column; gap: 4px; padding-left: 20px; }
  .agenda-item::before { left: 8px; }
  .agenda-items::before { left: 13px; }
  .agenda-time { min-width: auto; }
  .jk-grid { grid-template-columns: 1fr; }
  .info-infographic { grid-template-columns: 1fr 1fr; }
  .standings-grid { grid-template-columns: 1fr; }
  .agenda-infographic-item { flex-wrap: wrap; gap: 4px; }
  .agenda-infographic-item .ai-time { min-width: auto; }
}

/* Header Logos */
.header-logos {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-logos .logo-item {
  height: 36px;
  display: flex;
  align-items: center;
}
.header-logos .logo-item img {
  height: 100%;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

/* Agenda - Timeline Premium */
.agenda-day {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 24px;
  overflow: hidden;
}
.agenda-day-title {
  background: linear-gradient(135deg, var(--primary), #16213e);
  color: var(--white);
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
}
.agenda-day-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 24px; right: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.agenda-items {
  padding: 12px 0;
  position: relative;
}
.agenda-items::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}
.agenda-item {
  display: flex;
  gap: 16px;
  padding: 14px 20px 14px 54px;
  border-bottom: 1px solid var(--gray-100);
  align-items: flex-start;
  position: relative;
  transition: background 0.3s;
}
.agenda-item:last-child { border-bottom: none; }
.agenda-item:hover {
  background: var(--gray-100);
}
.agenda-item::before {
  content: '';
  position: absolute;
  left: 35px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--secondary);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--secondary);
  z-index: 1;
}
.agenda-item:first-child::before {
  background: var(--accent);
  border-color: var(--white);
  box-shadow: 0 0 0 2px var(--accent);
}
.agenda-time {
  min-width: 100px;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--secondary);
  white-space: nowrap;
  padding-top: 2px;
}
.agenda-desc {
  flex: 1;
  font-size: 0.88rem;
}
.agenda-desc strong {
  color: var(--primary);
}
.agenda-place {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--gray-600);
  margin-top: 4px;
  background: var(--gray-100);
  padding: 2px 10px;
  border-radius: 10px;
}

/* Jawatankuasa - Premium Cards */
.jk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.jk-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.jk-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
}
.jk-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.jk-card-inner {
  padding: 20px;
}
.jk-card-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--secondary), #a00d24);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 12px;
}
.jk-jawatan {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.jk-nama {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.jk-nama-badge {
  display: inline-block;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #1565c0;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(21,101,192,0.15);
}
.jk-peranan {
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.5;
  border-top: 1px dashed var(--gray-200);
  padding-top: 8px;
  margin-top: 4px;
}

.stat-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.stat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}
.stat-filters label {
  font-size: 0.82rem;
  font-weight: bold;
  color: #555;
}
.stat-filters select {
  -webkit-appearance: none;
  appearance: none;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.stat-table-wrap {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  margin-bottom: 24px;
}
.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.stat-table th {
  background: var(--primary);
  color: var(--white);
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
}
.stat-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #eee;
}
.stat-table tr:hover td {
  background: #f8faff;
}
.stat-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat-bar-bg {
  flex: 1;
  height: 18px;
  background: #eef2f7;
  border-radius: 9px;
  overflow: hidden;
  min-width: 60px;
}
.stat-bar-fill {
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(90deg, #1a3a5c, #2e7d32, #f9a825);
  transition: width 0.4s ease;
}
.stat-bar-label {
  font-weight: bold;
  font-size: 0.8rem;
  min-width: 28px;
  text-align: right;
  color: var(--primary);
}
.stat-kategori-badge {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.7rem;
  margin-right: 3px;
  vertical-align: middle;
}
.stat-kategori-badge.active {
  background: #e8f5e9;
  color: #2e7d32;
}
.stat-kategori-badge.inactive {
  background: #f5f5f5;
  color: #bbb;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat-section {
  animation: fadeInUp 0.3s ease;
}
.stat-section h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media print {
  header, .top-bar, footer, .menu-toggle, nav, .filter-bar { display: none; }
  .hero { padding: 20px; }
  .card, .result-card { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
}

/* ── JK Index-based Hierarchy ── */
.jk-org {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.jk-tier {
  position: relative;
  animation: jkTierIn 0.4s ease both;
  animation-delay: var(--tier-delay, 0s);
  padding: 4px 0;
}
@keyframes jkTierIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.jk-org-lead {
  max-width: 380px;
  margin: 0 auto;
  padding: 32px 24px 28px;
  background: linear-gradient(135deg, #1a2a4a 0%, #2a5a7c 50%, #1a3a5c 100%);
  border-radius: 16px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(26,42,74,0.3);
}
.jk-org-lead::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -20%, rgba(255,215,0,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.jk-rank-badge {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.jk-lead-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.jk-lead-name .jk-nama-badge {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
  font-size: 0.88rem;
  padding: 5px 16px;
}
.jk-lead-role {
  font-size: 0.78rem;
  opacity: 0.7;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.jk-tier-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #cbd5e1;
  text-align: center;
  margin-bottom: 8px;
}
.jk-deputy-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 22px 20px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #eef2f7;
  border-left: 4px solid var(--card-color, #7c3aed);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.jk-deputy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.jk-deputy-rank {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--card-color, #7c3aed);
  margin-bottom: 4px;
}
.jk-deputy-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}
.jk-deputy-role {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #f1f5f9;
}
.jk-mid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.jk-mid-card {
  padding: 16px 14px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eef2f7;
  border-top: 3px solid var(--card-color, #2563eb);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  text-align: center;
  transition: transform 0.2s;
}
.jk-mid-card:hover { transform: translateY(-2px); }
.jk-mid-rank {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--card-color, #2563eb);
  margin-bottom: 4px;
}
.jk-mid-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}
.jk-mid-role {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed #f1f5f9;
}
.jk-compact-section {
  width: 100%;
}
.jk-compact-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #94a3b8;
  padding: 8px 0 4px;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.jk-compact-count {
  display: inline-block;
  background: #eef2f7;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 20px;
}
.jk-compact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 900px) {
  .jk-compact-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .jk-compact-grid { grid-template-columns: 1fr; }
}
.jk-compact-item {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fafbfc;
  border: 1px solid #f1f5f9;
  transition: background 0.15s;
  align-items: flex-start;
}
.jk-compact-item:hover { background: #f1f5f9; }
.jk-compact-rank {
  font-size: 0.6rem;
  font-weight: 700;
  color: #cbd5e1;
  min-width: 20px;
  flex-shrink: 0;
  line-height: 1.5;
}
.jk-compact-body {
  flex: 1;
  min-width: 0;
}
.jk-compact-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.4;
}
.jk-compact-names {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.jk-compact-names .jk-nama-badge {
  font-size: 0.68rem;
  padding: 1px 7px;
}
.jk-compact-role {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.3;
}

/* ── JK Category Accordion ── */
.jk-category {
  margin-bottom: 8px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.jk-category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  background: #f8fafc;
  transition: background 0.15s;
}
.jk-category-header:hover { background: #f1f5f9; }
.jk-category-icon { font-size: 1.1rem; line-height: 1; }
.jk-category-label { flex: 1; font-size: 0.82rem; font-weight: 700; color: #1e293b; }
.jk-category-count {
  background: #e2e8f0;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 9px;
  border-radius: 20px;
}
.jk-category-arrow {
  font-size: 0.55rem;
  color: #94a3b8;
  transition: transform 0.25s;
}
.jk-cat-flip { transform: rotate(180deg); }
.jk-category-body {
  max-height: none;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 10px;
  will-change: max-height;
}
.jk-category-body.jk-cat-hide {
  max-height: 0;
  padding: 0 10px;
}
.jk-org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.jk-card-item {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eef2f7;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.jk-card-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.jk-card-item-inner { padding: 10px 12px; }
.jk-card-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.jk-card-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  flex: 1;
}
.jk-card-item-arrow {
  font-size: 0.55rem;
  color: #94a3b8;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.jk-card-item.jk-ci-open .jk-card-item-arrow,
.jk-ci-open .jk-card-item-arrow { transform: rotate(180deg); }
.jk-card-item-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
  opacity: 0;
  padding: 0;
  will-change: max-height, opacity;
}
.jk-ci-open .jk-card-item-body {
  max-height: 200px;
  opacity: 1;
  padding-top: 8px;
}
.jk-ci-nama {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.jk-ci-peranan {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 4px;
  line-height: 1.4;
}

/* ── Org Strip ── */
.org-strip { background: #fff; color: #334155; padding: 20px 0; border-bottom: 1px solid #eef2f7; }
.org-strip-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.org-strip-logos { display: flex; align-items: center; gap: 16px; order: -1; }
.org-strip-logos .logo-item { height: 40px; display: flex; align-items: center; }
.org-strip-logos .logo-item img { height: 100%; width: auto; object-fit: contain; filter: none; opacity: 1; }
.org-strip-info { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.org-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; font-weight: 700; }
.org-value { font-size: 0.8rem; font-weight: 600; color: #475569; }
.org-divider { display: none; }

/* ── Home Stat Cards ── */
.home-stat-card { background:var(--white); border-radius:var(--radius); padding:20px 16px; text-align:center; border:1px solid var(--gray-200); box-shadow:var(--shadow-sm); }
.home-stat-value { font-size:1.8rem; font-weight:800; color:var(--primary); line-height:1.2; }
.home-stat-label { font-size:0.72rem; color:var(--gray-500); margin-top:4px; text-transform:uppercase; letter-spacing:0.5px; font-weight:600; }

/* ── Banner / Slideshow ── */
.banner-wrap { background: #f8fafc; padding: 12px 0; }
.banner-slides { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.banner-slide { flex: 0 0 auto; scroll-snap-align: start; border-radius: 10px; overflow: hidden; max-width: 100%; }
.banner-slide img { display: block; width: 100%; height: auto; border-radius: 10px; }

/* ── Stats Page Header ── */
.stats-header { position: relative; background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%); padding: 40px 24px; text-align: center; color: #fff; border-radius: 16px; margin-bottom: 24px; overflow: hidden; }
.stats-header::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 50%, rgba(59,130,246,0.12) 0%, transparent 60%), radial-gradient(ellipse at 70% 50%, rgba(139,92,246,0.08) 0%, transparent 60%); pointer-events: none; }
.stats-header h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; position: relative; }
.stats-header p { font-size: 0.8rem; opacity: 0.7; position: relative; }

/* ── Teams Grid / Futuristic Cards ── */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.team-card {
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.04);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08), 0 0 20px color-mix(in srgb, var(--team-color) 20%, transparent);
}
.team-card-glow {
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: 0.06;
  pointer-events: none;
  transition: opacity 0.3s;
}
.team-card:hover .team-card-glow { opacity: 0.12; }
.team-card-body {
  position: relative;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.team-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--team-color), color-mix(in srgb, var(--team-color) 70%, #000));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--team-color) 30%, transparent);
}
.team-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}
.team-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.team-card-tag {
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.team-card-tag.district { background: #eef2ff; color: #4338ca; }
.team-card-tag.kategori { background: #f0fdf4; color: #16a34a; }

.stats-toolbar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.stats-toolbar-left { flex: 1; min-width: 200px; }
.stats-search { width: 100%; padding: 9px 14px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 0.82rem; background: #fff; outline: none; transition: border-color 0.2s; }
.stats-search:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.stats-toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stats-select { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 0.78rem; background: #fff; outline: none; cursor: pointer; transition: border-color 0.2s; }
.stats-select:focus { border-color: #3b82f6; }

/* ── Infographic Styles ── */
.info-infographic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.info-infographic-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  border: 1px solid #eef2f7;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.info-infographic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.info-infographic-card .ii-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}
.info-infographic-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
}
.info-infographic-card p {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}
.info-infographic-card .ii-bar {
  height: 4px;
  border-radius: 2px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 60%;
  margin-left: auto;
  margin-right: auto;
}

/* ── Agenda Infographic ── */
.agenda-infographic {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.agenda-infographic-day {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eef2f7;
  overflow: hidden;
}
.agenda-infographic-day-header {
  background: linear-gradient(135deg, var(--primary), #1e3a5f);
  color: #fff;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.agenda-infographic-items {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agenda-infographic-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  transition: background 0.2s;
}
.agenda-infographic-item:hover { background: #f1f5f9; }
.agenda-infographic-item .ai-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  min-width: 55px;
  padding-top: 2px;
}
.agenda-infographic-item .ai-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 0 3px rgba(234,88,12,0.15);
}
.agenda-infographic-item .ai-text {
  flex: 1;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.4;
}
.agenda-infographic-item .ai-text strong {
  color: #0f172a;
  display: block;
  font-size: 0.85rem;
}
.agenda-infographic-item .ai-place {
  font-size: 0.7rem;
  color: #94a3b8;
  display: block;
  margin-top: 2px;
}
.agenda-infographic-item .ai-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 30px;
  text-align: center;
}

/* ── Standings Infographic ── */
.standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.standings-group-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eef2f7;
  overflow: hidden;
}
.standings-group-header {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.standings-group-body {
  padding: 8px;
}
.standings-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  transition: background 0.15s;
}
.standings-row:hover { background: #f8fafc; }
.standings-row .sr-pos {
  width: 24px;
  text-align: center;
  font-weight: 800;
  font-size: 0.72rem;
  color: #94a3b8;
}
.standings-row.sr-top .sr-pos { color: var(--primary); }
.standings-row .sr-name {
  flex: 1;
  font-weight: 600;
  color: #1e293b;
}
.standings-row .sr-p {
  width: 20px;
  text-align: center;
  color: #64748b;
  font-weight: 500;
}
.standings-row .sr-m {
  width: 20px;
  text-align: center;
  color: #16a34a;
  font-weight: 600;
}
.standings-row .sr-s {
  width: 20px;
  text-align: center;
  color: #ca8a04;
  font-weight: 600;
}
.standings-row .sr-k {
  width: 20px;
  text-align: center;
  color: #dc2626;
  font-weight: 600;
}
.standings-row .sr-j {
  width: 20px;
  text-align: center;
  color: #64748b;
  font-weight: 500;
}
.standings-row .sr-b {
  width: 20px;
  text-align: center;
  color: #64748b;
  font-weight: 500;
}
.standings-row .sr-pg {
  width: 28px;
  text-align: center;
  color: #64748b;
  font-weight: 600;
}
/* ── HM Hero Section ── */
.hm-hero {
  position: relative;
  padding: 60px 20px 50px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(160deg, #dc2626 0%, #b91c1c 30%, #1a1a2e 50%, #ffd700 70%, #b91c1c 100%);
  background-size: 200% 200%;
  animation: hero-bg-shift 8s ease infinite;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@keyframes hero-bg-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hm-hero-bg { position:absolute; inset:0; background-size:cover; background-position:center; z-index:0; }
.hm-hero-overlay { position:absolute; inset:0; background:linear-gradient(135deg,rgba(220,38,38,0.6),rgba(26,26,46,0.5)); z-index:1; display:none; }
.hm-hero .container { position:relative; z-index:2; max-width:700px; }
.hm-badge { display:inline-block; position:relative; margin-bottom:20px; }
.hm-badge-inner { display:inline-block; padding:12px 28px; border-radius:50px; font-size:0.85rem; font-weight:800; letter-spacing:1.5px; text-transform:uppercase; background:linear-gradient(135deg,#dc2626 0%,#ffd700 50%,#1a1a2e 100%); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; position:relative; z-index:2; border:2px solid rgba(255,215,0,0.3); }
.hm-ring-wrap { position:absolute; inset:-8px; pointer-events:none; z-index:1; }
.hm-ring-1, .hm-ring-2, .hm-ring-3 { position:absolute; inset:0; border-radius:50px; border:2px solid transparent; }
.hm-ring-1 { border-color:rgba(220,38,38,0.4); animation:hm-spin 3s linear infinite; }
.hm-ring-2 { border-color:rgba(255,215,0,0.3); animation:hm-spin 4s linear infinite reverse; inset:-4px; }
.hm-ring-3 { border-color:rgba(255,255,255,0.15); animation:hm-spin 2s linear infinite; inset:-8px; }
@keyframes hm-spin { 0%{transform:rotate(0deg)} 100%{transform:rotate(360deg)} }
.hm-hero-title { font-size:clamp(1.4rem, 5vw, 2.4rem); font-weight:900; margin:0 0 6px; line-height:1.15; background:linear-gradient(135deg,#dc2626 0%,#ffd700 50%,#1a1a2e 100%); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; letter-spacing:2px; }
.hm-hero-sub { font-size:0.85rem; color:rgba(255,255,255,0.7); margin:0 0 16px; font-weight:400; }
.hm-hero-meta { display:flex; align-items:center; justify-content:center; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.hm-hero-item { display:inline-flex; align-items:center; gap:6px; font-size:0.8rem; color:rgba(255,255,255,0.85); cursor:pointer; transition:color 0.2s; }
.hm-hero-item:hover { color:#ffd700; }
.hm-hero-sep { color:rgba(255,255,255,0.25); font-size:0.8rem; }
.hm-hero-org { display:inline-flex; flex-direction:column; gap:4px; padding:12px 20px; background:rgba(255,255,255,0.06); border-radius:12px; border:1px solid rgba(255,255,255,0.08); backdrop-filter:blur(4px); }
.hm-org-line { font-size:0.72rem; color:rgba(255,255,255,0.6); }
.hm-org-label { font-weight:600; color:rgba(255,255,255,0.5); text-transform:uppercase; letter-spacing:1px; font-size:0.6rem; }
.hm-org-value { color:rgba(255,255,255,0.85); }
.hm-sparkles { position:absolute; inset:0; z-index:1; pointer-events:none; overflow:hidden; }
.hm-sparkles span { position:absolute; width:4px; height:4px; border-radius:50%; background:#ffd700; animation:hm-sparkle 3s ease-in-out infinite; opacity:0; }
.hm-sparkles span:nth-child(1) { top:10%; left:20%; animation-delay:0s; }
.hm-sparkles span:nth-child(2) { top:30%; left:80%; animation-delay:0.4s; width:3px; height:3px; }
.hm-sparkles span:nth-child(3) { top:60%; left:15%; animation-delay:0.8s; width:5px; height:5px; }
.hm-sparkles span:nth-child(4) { top:80%; left:70%; animation-delay:1.2s; }
.hm-sparkles span:nth-child(5) { top:20%; left:50%; animation-delay:0.2s; width:3px; height:3px; }
.hm-sparkles span:nth-child(6) { top:70%; left:40%; animation-delay:0.6s; width:5px; height:5px; background:rgba(220,38,38,0.6); }
.hm-sparkles span:nth-child(7) { top:40%; left:90%; animation-delay:1s; }
.hm-sparkles span:nth-child(8) { top:90%; left:30%; animation-delay:1.4s; width:3px; height:3px; background:rgba(220,38,38,0.6); }
.hm-sparkles span:nth-child(9) { top:15%; left:35%; animation-delay:0.5s; width:6px; height:6px; background:rgba(255,215,0,0.9); }
.hm-sparkles span:nth-child(10) { top:45%; left:10%; animation-delay:1.1s; width:4px; height:4px; background:rgba(220,38,38,0.7); }
.hm-sparkles span:nth-child(11) { top:75%; left:75%; animation-delay:1.8s; width:5px; height:5px; background:rgba(255,255,255,0.6); }
.hm-sparkles span:nth-child(12) { top:25%; left:60%; animation-delay:0.9s; width:3px; height:3px; background:rgba(220,38,38,0.8); }
@keyframes hm-sparkle { 0%{opacity:0;transform:scale(0) translateY(0)} 50%{opacity:1;transform:scale(1) translateY(-10px)} 100%{opacity:0;transform:scale(0) translateY(-20px)} }

.hm-hero-shapes { position:absolute; inset:0; z-index:1; pointer-events:none; overflow:hidden; }
.hm-hero-shapes .shape { position:absolute; border-radius:50%; opacity:0.06; background:#fff; }
.hm-hero-shapes .shape:nth-child(1) { width:200px; height:200px; top:-40px; left:-60px; animation:hm-float1 6s ease-in-out infinite; }
.hm-hero-shapes .shape:nth-child(2) { width:120px; height:120px; bottom:20px; right:-30px; animation:hm-float2 8s ease-in-out infinite; background:#ffd700; }
.hm-hero-shapes .shape:nth-child(3) { width:80px; height:80px; top:40%; right:15%; animation:hm-float1 5s ease-in-out infinite reverse; }
.hm-hero-shapes .shape:nth-child(4) { width:40px; height:40px; bottom:30%; left:10%; animation:hm-float2 7s ease-in-out infinite; background:#dc2626; }
.hm-hero-shapes .shape:nth-child(5) { width:160px; height:160px; top:60%; left:50%; transform:translate(-50%,-50%); animation:hm-pulse-glow 4s ease-in-out infinite; background:rgba(255,215,0,0.15); filter:blur(40px); }
@keyframes hm-float1 { 0%,100%{transform:translateY(0) rotate(0deg)} 50%{transform:translateY(-20px) rotate(10deg)} }
@keyframes hm-float2 { 0%,100%{transform:translateY(0) rotate(0deg)} 50%{transform:translateY(15px) rotate(-8deg)} }
@keyframes hm-pulse-glow { 0%,100%{opacity:0.3;transform:translate(-50%,-50%) scale(1)} 50%{opacity:0.6;transform:translate(-50%,-50%) scale(1.15)} }

/* ── HM Org Strip ── */
.hm-org-strip { background:rgba(255,255,255,0.95); border-bottom:1px solid #e2e8f0; padding:12px 0; overflow-x:auto; }
.hm-org-logos { display:flex; align-items:center; justify-content:center; gap:24px; flex-wrap:wrap; }

/* ── HM Quick Grid ── */
.hm-quick-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; margin-top:16px; }
.hm-quick-card { background:var(--white); border-radius:var(--radius); padding:18px 16px; border:1px solid var(--gray-200); box-shadow:var(--shadow-sm); transition:transform 0.2s,box-shadow 0.2s; text-align:center; }
.hm-quick-card:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.hm-q-icon { margin-bottom:8px; }
.hm-q-icon svg { width:22px; height:22px; }
.hm-quick-card h3 { font-size:0.85rem; font-weight:700; margin:0 0 4px; color:var(--gray-900); }
.hm-quick-card p { font-size:0.72rem; color:var(--gray-500); margin:0 0 10px; line-height:1.4; display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.hm-btn { display:inline-flex; align-items:center; gap:4px; background:var(--primary); color:#fff; padding:6px 14px; border-radius:var(--radius); font-size:0.75rem; font-weight:600; text-decoration:none; transition:background 0.2s,transform 0.2s; }
.hm-btn:hover { background:#4f46e5; transform:translateY(-1px); }
.hm-btn-outline { background:transparent; color:var(--primary); border:2px solid var(--primary); }
.hm-btn-outline:hover { background:var(--primary); color:#fff; }

/* ── HM Section ── */
.hm-section { background:var(--white); border-radius:var(--radius); overflow:hidden; border:1px solid var(--gray-200); box-shadow:var(--shadow-sm); margin-top:12px; }
.hm-section-header { padding:14px 16px; cursor:pointer; user-select:none; border-bottom:1px solid var(--gray-100); display:flex; align-items:center; justify-content:space-between; }
.hm-section-header h3 { font-size:0.85rem; font-weight:700; margin:0; color:var(--gray-900); }
.hm-section-header p { font-size:0.7rem; color:var(--gray-500); margin:2px 0 0; }
.hm-arrow { font-size:0.7rem; color:var(--gray-400); transition:transform 0.2s; }
.hm-section-header.collapsed .hm-arrow { transform:rotate(-90deg); }
.hm-section-body { padding:14px 16px; }

/* ── HM Results ── */
.hm-results-list { display:flex; flex-direction:column; gap:10px; }
.hm-result-card { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; background:var(--gray-50); border-radius:10px; border:1px solid var(--gray-100); gap:12px; flex-wrap:wrap; }
.hm-result-meta { font-size:0.68rem; color:var(--gray-500); width:100%; }
.hm-result-vs { display:flex; align-items:center; gap:8px; flex:1; justify-content:center; }
.hm-result-team { font-size:0.8rem; font-weight:600; color:var(--gray-800); }
.hm-result-skor { font-size:1.1rem; font-weight:800; color:var(--primary); }
.hm-result-divider { font-size:1.1rem; font-weight:300; color:var(--gray-400); }
.hm-result-status { font-size:0.62rem; font-weight:700; color:#16a34a; text-transform:uppercase; letter-spacing:1px; }

/* ── HM JK Grid ── */
.hm-jk-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; padding:16px 20px; }
.hm-jk-card { border-radius:14px; padding:24px 20px; text-decoration:none; transition:transform 0.2s; text-align:center; color:#fff; }
.hm-jk-card:hover { transform:translateY(-3px); }
.hm-jk-icon { margin-bottom:12px; }
.hm-jk-card h4 { font-size:1rem; font-weight:800; margin:0 0 4px; }
.hm-jk-card p { font-size:0.75rem; opacity:0.8; margin:0; }

/* ── Footer Links ── */
.footer-links { margin-top:10px; display:flex; justify-content:center; align-items:center; gap:8px; flex-wrap:wrap; font-size:0.78rem; }
.footer-links a { color:#6366f1; text-decoration:none; font-weight:600; transition:color 0.2s; }
.footer-links a:hover { color:#4f46e5; text-decoration:underline; }
.footer-link-divider { color:#94a3b8; font-size:0.7rem; }

/* ── HM QR Card ── */
.hm-qr-card { display:flex; align-items:center; justify-content:space-between; gap:20px; background:linear-gradient(135deg,#eef2ff,#f5f3ff); border-radius:16px; padding:20px 24px; margin-top:16px; border:1px solid rgba(99,102,241,0.1); flex-wrap:wrap; }
.hm-qr-left h3 { margin:0 0 4px; font-size:0.95rem; font-weight:700; color:#0f172a; }
.hm-qr-left p { margin:0 0 12px; font-size:0.78rem; color:#94a3b8; }
.hm-qr-right .hm-qr-url { font-size:0.72rem; color:var(--gray-500); }
.hm-qr-url code { font-size:0.72rem; color:var(--primary); }

/* ── HM Section Home Stats ── */
#home-stats-section { margin-top:20px; }

.standings-row .sr-pts {
  width: 28px;
  text-align: center;
  font-weight: 800;
  color: var(--primary);
  font-size: 0.85rem;
}
.standings-row.sr-top { background: #f0fdf4; border-left: 3px solid #16a34a; }
.standings-row-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.standings-row-header .sr-pos { color: #94a3b8; }
.standings-row-header .sr-name { flex: 1; }
.standings-row-header .sr-p, .standings-row-header .sr-m, .standings-row-header .sr-s, .standings-row-header .sr-k, .standings-row-header .sr-j, .standings-row-header .sr-b, .standings-row-header .sr-pg, .standings-row-header .sr-pts { width: 20px; text-align: center; }
.standings-row-header .sr-pg, .standings-row-header .sr-pts { width: 28px; }

/* ── Animations ── */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(255,215,0,0.3); }
  50% { box-shadow: 0 0 20px rgba(255,215,0,0.6), 0 0 40px rgba(255,215,0,0.3); }
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.shimmer-text {
  background: linear-gradient(90deg, #ffd700 0%, #ff6b6b 25%, #ffd700 50%, #ff6b6b 75%, #ffd700 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  will-change: background-position;
}
.glow-text {
  animation: glow-pulse 2s ease-in-out infinite;
}
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-on-scroll-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.animate-on-scroll-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll-right.visible {
  opacity: 1;
  transform: translateX(0);
}
.animate-on-scroll-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-on-scroll-scale.visible {
  opacity: 1;
  transform: scale(1);
}
.counter-value {
  display: inline-block;
}

.hm-section {
  transition: box-shadow 0.3s, border-color 0.3s;
  content-visibility: auto;
  contain-intrinsic-size: 300px;
}
.hm-section:hover {
  border-color: rgba(99,102,241,0.3);
  box-shadow: 0 4px 20px rgba(99,102,241,0.08);
}

.hm-hero-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #dc2626, #ffd700, #dc2626);
  background-size: 200% auto;
  animation: shimmer 2s linear infinite;
  border-radius: 2px;
}

.hm-quick-card {
  position: relative;
  overflow: hidden;
}
.hm-quick-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
  pointer-events: none;
}
.hm-quick-card:hover::before {
  transform: translateX(100%);
}

.hm-badge-inner {
  animation: glow-pulse 3s ease-in-out infinite;
  will-change: box-shadow;
}

.hm-qr-card {
  position: relative;
  overflow: hidden;
}
.hm-qr-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(99,102,241,0.1), transparent, rgba(99,102,241,0.1), transparent);
  animation: spin 6s linear infinite;
  pointer-events: none;
  will-change: transform;
}

.hm-result-card {
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.hm-result-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border-color: var(--primary);
}

.standings-row {
  transition: transform 0.2s;
}
.standings-row:hover {
  transform: translateX(3px);
}

.hm-org-logos .logo-item {
  height: 50px;
  transition: transform 0.3s, filter 0.3s;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.hm-org-logos .logo-item:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}
.hm-org-logos .logo-item {
  background: transparent;
}
.hm-org-logos .logo-item img {
  height: 100%;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.hm-section-header h3,
.hm-section-header h2,
.hm-hero-title,
.hm-section h3,
.page-header h2,
.ach-val,
.home-stat-value,
.fs-score,
.hm-quick-card h3,
.hm-jk-card h4 {
  background: linear-gradient(135deg, #0f172a 0%, #4f46e5 50%, #f59e0b 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
}
.hm-section-header p,
.hm-section > p,
.home-stat-label,
.ach-lbl,
.ach-sub {
  background: linear-gradient(135deg, #475569 0%, #6366f1 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.ach-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
  border-radius: 14px;
  animation: fadeInUp 0.5s ease;
  content-visibility: auto;
  contain-intrinsic-size: 140px;
}
.ach-card .ach-icon {
  font-size: 2rem;
  margin-bottom: 6px;
}
.ach-card .ach-val {
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.3;
}
.ach-card .ach-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 4px;
}
.ach-card .ach-sub {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .container { padding: 0 16px; }
  header .container { padding: 10px 16px; }
  header h1 { font-size: clamp(0.9rem, 3vw, 1.2rem); }
  .hero { padding: clamp(36px, 6vw, 70px) 16px clamp(32px, 5vw, 60px); }
  .hero .details { font-size: clamp(0.75rem, 2vw, 0.9rem); }
  .hero .details span { margin: 0 4px; }
  .info-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
  .card { padding: 20px; }
  .filter-bar { flex-wrap: wrap; }
  .filter-bar select, .filter-bar input { flex: 1 1 140px; min-width: 0; }
  .jk-grid { grid-template-columns: 1fr; }
  .jk-category-body { padding: 6px; }
  .jk-category-body.jk-cat-hide { padding: 0 6px; }
  .jk-compact-grid { grid-template-columns: 1fr; }
  .podium { gap: 8px; }
  .podium-item { width: 80px; }
  .qr-section img { width: 120px; }
  .floating-btt { width: 40px; height: 40px; font-size: 1rem; bottom: 16px; right: 16px; }
  .floating-announce { width: 40px; height: 40px; font-size: 1rem; bottom: 16px; left: 16px; }
  .floating-scoreboard-wrap { bottom: 64px; }
  .floating-scoreboard { max-width: 92%; padding: 12px 14px 10px; }
  .hm-section { padding: 16px; }
}

@media (max-width: 600px) {
  .info-cards { grid-template-columns: 1fr; }
  .result-card { flex-direction: column; text-align: center; }
  .result-card .teams { justify-content: center; }
  .result-card .meta { text-align: center; }
  nav { gap: 1px; }
  nav a { font-size: 0.72rem; padding: 5px 8px; }
  .hm-org-logos { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .hm-org-logos .logo-item { height: 32px; }
  .agenda-item { padding: 10px 16px 10px 40px; }
  .agenda-item::before { left: 22px; width: 10px; height: 10px; }
  .agenda-timeline::before { left: 26px; }
  .bulletin-item { padding: 20px 16px; }
  .ach-card { padding: 12px 10px; }
  .ach-card .ach-val { font-size: 0.82rem; }
  .ach-card .ach-sub { font-size: 0.65rem; }
}

@media (max-width: 375px) {
  header .container { padding: 8px 12px; }
  header h1 { font-size: 0.8rem; letter-spacing: 0.5px; }
  nav a { font-size: 0.65rem; padding: 4px 6px; }
  .hero .badge { font-size: 1rem; padding: 10px 12px; letter-spacing: 1px; }
  .hero h2 { font-size: 0.9rem; }
  .hero .subtitle { font-size: 0.65rem; }
  .hero { padding: 28px 12px 24px; }
  .floating-scoreboard { max-width: 96%; padding: 10px 10px 8px; }
  .floating-scoreboard .fs-score { font-size: 1.2rem; }
  .floating-btt { width: 36px; height: 36px; font-size: 0.85rem; }
  .floating-announce { width: 36px; height: 36px; font-size: 0.9rem; }
  .floating-scoreboard .fs-close { width: 30px !important; height: 30px !important; font-size: 0.7rem !important; }
  .container { padding: 0 10px; }
  .filter-bar { gap: 6px; }
  .filter-bar select, .filter-bar input { flex: 1 1 100%; font-size: 0.75rem; padding: 6px 8px; }
  .hm-section-header h3 { font-size: 0.8rem; }
  .hm-section-header { padding: 10px 12px; }
  .hm-section-body { padding: 10px 12px; }
  .hm-section { margin-top: 8px; }
  .hm-quick-grid { gap: 8px; margin-top: 12px; }
  .hm-quick-card { padding: 14px 12px; }
  .hm-quick-card p { font-size: 0.68rem; margin-bottom: 8px; }
  .hm-btn { padding: 5px 10px; font-size: 0.7rem; }
  .ach-card .ach-lbl { font-size: 0.62rem; }
  .podium { gap: 6px; padding: 16px 0; }
  .podium-item { width: 72px; }
  .podium-item .place { font-size: 1.4rem; }
  .podium-item .team-name { font-size: 0.7rem; }
  .podium-item.first .bar { height: 60px; }
  .podium-item.second .bar { height: 45px; }
  .podium-item.third .bar { height: 30px; }
  .podium-item.fourth .bar { height: 20px; }
  .hm-section-body #home-category-standings { padding-top: 10px !important; margin-bottom: 10px !important; }
}

@media (min-width: 1024px) and (max-width: 1366px) {
  .container { padding: 0 32px; }
  .info-cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
  .ach-card { padding: 14px 12px; }
  .ach-card .ach-icon { font-size: 1.6rem; }
  .ach-card .ach-val { font-size: 0.88rem; }
  .hm-org-logos { gap: 16px; }
  .hm-org-logos .logo-item { height: 38px; }
  .hm-hero-title { font-size: 1.6rem; }
  .hm-hero-title::after { width: 40px; }
}
