body {
	background: url("./assets/bg.jpg") no-repeat center center fixed, rgb(0, 0, 0);
	background-attachment: fixed;
	position: relative;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
	font-family: Kanit, sans-serif;
	opacity: 1;
	width: 100%;
	height: 100%;
	color: #212121;
	filter: gray saturate(0%) brightness(70%) contrast(1000%);
	background-color: #2a2a2a;
	font-family: 'Kanit';
	font-weight: 300;
	color: #000000;
}

body:after {
	content: "";
	position: fixed;
	top: 0;
	height: 100vh;
	left: 0;
	right: 0;
	z-index: -1;
	background: url("./assets/bg.jpg") center center;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
	color: #212121;
	background-color: #2a2a2a;
}

.navbar {
	background: rgba(0, 0, 0, 0.684);
	padding: 3px 0px;
}

h1 {
	font-size: 3.2em;
	line-height: 1.1;
}

button {
	border-radius: 8px;
	border: 1px solid transparent;
	padding: 0.6em 1.2em;
	font-size: 1em;
	font-weight: 500;
	font-family: inherit;
	background-color: #1a1a1a;
	cursor: pointer;
	transition: border-color 0.25s;
}

button:hover {
	border-color: #646cff;
}

button:focus,
button:focus-visible {
	outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
	:root {
		color: #213547;
		background-color: #ffffff;
	}

	a:hover {
		color: #747bff;
	}

	button {
		background-color: #f9f9f9;
	}
}

.card {
	border-radius: 0.5rem;
	border: 1px solid #ccc;
	transition: box-shadow 0.2s ease;
}

.card:hover {
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.match-row {
	min-height: 120px;
}

.team-col {
	width: 120px;
	display: flex;
	flex-direction: column;
	align-items: center;
	font-size: 12px
}

.vs-col {
	width: 160px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.team-logo {
	width: 100px;
	height: 100px;
	object-fit: contain;
}

.team-logo-detail {
	width: 30px;
	height: 30px;
	object-fit: contain;
}

.vs-icon {
	font-size: 26px;
	font-weight: bold;
	color: #000;
}

.channel-logo {
	height: 40px;
	border-radius: 6px;
	padding: 2px 4px;
}

.league-card {
	background: rgba(0, 0, 0, 0.406);
	border: 1px solid #555;
	border-radius: 12px 12px 12px 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
	padding: 10px;
	font-size: 13px;
}

.league-box {
	background-color: rgba(57, 0, 0, 0.852);
	border-radius: 12px 12px 0 0;
	padding: 6px 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	color: #fff;
}

.label-box {
	background: rgba(0, 0, 0, 1);
	border-radius: 5px;
	padding: 6px 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	color: #fff;
}

.b_match {
	background: rgba(255, 255, 255, 1);
	margin-bottom: 20px;
	border-radius: 10px;
}

.nav-item {
	font-family: 'kanit';
}

.match-banner {
	display: flex;
	justify-content: center;
	align-items: center;
	border-radius: 12px;
	max-width: 600px;
	margin: auto;
}

.team,
.middle {
	padding: 10px 10px;
	color: white;
	font-weight: bold;
	text-align: center;
	font-family: 'Arial', sans-serif;
	font-size: 14px;
}

.team {
	background: linear-gradient(to bottom, #d0d0d0, #999);
	flex: 1;
}

.team.left {
	background: linear-gradient(to bottom, #d0d0d0, #999);
	clip-path: polygon(0 0, 93% 0, 100% 100%, 0 100%);
	border-bottom-left-radius: 20px;
	flex: 1;
	margin-right: -18px;
	font-size: 12px;
	color: #000;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding-right: 20px;
}

.middle {
	background: linear-gradient(to bottom, #333, #111);
	clip-path: polygon(0% 0%, 100% 0%, 88% 100%, 10% 100%);
	flex: 0.5;
	z-index: 1;
	font-size: 12px;
}

.team.right {
	background: linear-gradient(to bottom, #d0d0d0, #999);
	clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%);
	border-bottom-right-radius: 20px;
	flex: 1;
	margin-left: -18px;
	font-size: 12px;
	color: #000;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding-left: 20px;
}

#betaMenu {
	background: rgba(0, 0, 0, 0.406);
	border: 1px solid #333;
	border-radius: 12px 12px 12px 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
	padding: 10px;
	font-size: 13px;
}

#betaMenu button {
	background-color: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 5px;
	margin-bottom: 5px;
}

html {
	scroll-behavior: smooth;
}


.standings_menu_wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding: 10px 0;
}

.standings_menu_box {
	display: inline-flex;
	flex-wrap: nowrap;
	gap: 5px;
	justify-content: center;
	padding: 0 10px;
	min-width: 100%;
}

.standings_menu_wrapper::-webkit-scrollbar {
	display: none;
}

.standings_menu {
	white-space: nowrap;
	background: #f1f1f1;
	color: #333;
	border-radius: 20px;
	padding: 1px 16px;
	text-decoration: none;
	font-weight: 500;
	border: 1px solid #ddd;
	transition: all 0.1s ease;
	flex: 0 0 auto;
}

.standings_menu:hover,
.standings_menu.active {
	background: #000;
	color: #fff;
	border-color: #000;
	text-decoration: none;
}


.standings_menu.active {
	background: #000;
	color: #fff;
	border-color: #000;
}


#backToTopBtn {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 999;
	background-color: #000;
	color: #fff;
	border: none;
	padding: 3px 16px;
	border-radius: 20px;
	font-weight: 200;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	display: none;
}

#backToTopBtn:hover {
	background-color: #333;
}

.custom-thead-dark th {
	background-color: #212529 !important;
	color: #fff !important;
	text-align: center;
	vertical-align: middle;
	font-weight: 500;
}

.bg_logo {
	width: 40px;
	height: 40px;
	background-color: #fff;
	border-radius: 50%;
	padding: 2px;
}

/* jw player */
.jw-flag-fullscreen .jw-logo{
	background-image: url('https://www.youdooball2.com/assets/logo_youdooball_100.png') !important;
	background-size: 100px;
	width: 100px !important;
	height: 100px !important;
	margin-top: -5px !important;
	margin-right: -5px !important;
}


@media (max-width:1000px) {
	.jw-flag-fullscreen .jw-logo {
		background-image: url('https://www.youdooball2.com/assets/logo_youdooball_100.png') !important;
		background-size: 100px;
		width: 100px !important;
		height: 100px !important;
		margin-top: -15px !important;
		margin-right: -15px !important;
	}
}

.ydb-confirm-btn {
  display:inline-flex;align-items:center;gap:.5rem;
  padding:.55rem 1rem;border-radius:8px;
  background:linear-gradient(180deg,#d72626,#a71414);
  border:1px solid #8f1010;
  color:#fff!important;font-weight:600;
}
.ydb-confirm-btn:hover { filter:brightness(1.06); }
.ydb-cancel-btn {
  display:inline-flex;align-items:center;gap:.5rem;
  padding:.55rem 1rem;border-radius:8px;
  background:#2a2a2a;border:1px solid #444;
  color:#ddd!important;
}
.ydb-cancel-btn:hover { filter:brightness(1.15); }


/* app.js */
.label-live{
  background: linear-gradient(180deg,#d72626,#a71414);
  border-color:#8f1010; color:#fff;
}
.label-finished{
  background:#2a2a2a; border-color:#3a3a3a; color:#ddd;
}

.badge-live{
  display:inline-flex; align-items:center; gap:.45rem;
  padding:.2rem .6rem; border-radius:999px;
  font-weight:700; letter-spacing:.3px;
  background:#b71c1c; color:#fff;
  box-shadow: 0 0 12px rgba(215,38,38,.35), inset 0 0 0 1px rgba(255,255,255,.08);
}
.dot-live{ width:.5rem; height:.5rem; border-radius:50%; background:#ffeb3b; animation:pulse 1.2s infinite ease-in-out; }
@keyframes pulse{ 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.35);opacity:.75} }

.badge-finished{
  display:inline-block; padding:.2rem .5rem; border-radius:6px;
  background:#444; color:#eee; font-weight:700; letter-spacing:.3px;
}

.past-list.collapse { display:none; }
.past-list.collapse.show { display:block; }

/* ป้าย LIVE โทนแดง กระพริบ */
.badge-live{
  display:inline-flex; align-items:center; gap:.45rem;
  padding:.2rem .6rem; border-radius:999px;
  font-weight:800; letter-spacing:.3px;
  background:#b71c1c; color:#fff;
  box-shadow: 0 0 12px rgba(215,38,38,.35), inset 0 0 0 1px rgba(255,255,255,.08);
}
.dot-live{
  width:.55rem; height:.55rem; border-radius:50%;
  background:#ff4d4d;
  animation: blink 1s infinite;
}
@keyframes blink{
  0%,100%{ opacity:1; transform:scale(1); }
  50%    { opacity:.45; transform:scale(1.25); }
}

/* จัด layout ตรงกลางตอน LIVE เป็นสองบรรทัด */
.middle-live{
  display:flex; flex-direction:column; align-items:center; line-height:1.15;
}
.live-time{
  margin-top:.25rem;
  font-size:.85rem;
  color:#e6e6e6;
  opacity:.9;
}

/* เพิ่มไฮไลต์การ์ดที่กำลังแข่ง */
.b_match.match-live{
  position:relative;
  outline: 1px solid rgba(215,38,38,.35);
  box-shadow: 0 0 0 2px rgba(215,38,38,.15) inset;
}
.b_match.match-live::after{
  content:'';
  position:absolute; inset:-2px;
  border-radius:8px;
  box-shadow: 0 0 18px rgba(215,38,38,.35);
  pointer-events:none;
}

/* ให้การ์ดวาง corner badge ได้ */
.b_match { position: relative; !important }

/* มุมซ้ายบน: ไอคอน LIVE + จุดกระพริบ */
.live-corner{
  position:absolute !important;
  top:6px; left:6px;
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 8px;
  border-radius:999px;
  background: rgba(183, 28, 28, .95);
  color:#fff;
  font-size:.8rem;
  box-shadow: 0 4px 14px rgba(215, 38, 38, .35), inset 0 0 0 1px rgba(255,255,255,.08);
  z-index: 5;               /* ✅ ดันขึ้นบน */
  pointer-events: none;     /* ✅ ไม่บังการคลิกการ์ด */
}

.live-dot{
  width:.5rem; height:.5rem; border-radius:50%;
  background:#ffeb3b;
  animation: live-blink 1.1s infinite ease-in-out;
}
@keyframes live-blink{
  0%,100% { transform:scale(1);   opacity:1; }
  50%     { transform:scale(1.35); opacity:.7; }
}

/* เวลา (ตอน live) สีแดงชัด */
.time-live{
  color:#ff4d4d !important;
  font-weight:800;
  letter-spacing:.3px;
}

/* เน้นการ์ด live เบา ๆ */
.b_match.match-live{
  outline: 1px solid rgba(215,38,38,.3);
  box-shadow: 0 0 0 2px rgba(215,38,38,.15) inset;
}

/* เวลาแข่งท้ายชื่อลีก */
.ko{
  margin-left: 6px;
  font-weight: 600;
  color: #cfcfcf;
  white-space: nowrap;
}
.ko-live{ color:#ff4d4d; }   /* สด = แดง */
.ko-past{ color:#2d2d2d; }   /* จบแล้ว = เทาอ่อน */