@font-face {
font-family: thaisanslite;
src: url(thaisanslite.ttf);
}


body
{
font-size:13px;
margin:0px; padding:0px; 
/*background-image:url('images/wall.jpg');*/
background-color:rgb(142,200,238);
background-color: #071740;
 background-attachment: fixed;
 background-size: cover;
 /*font-family:tahoma;*/
 font-family: Source Sans Pro,sans-serif;
}
.body_box { text-align:left; margin: 0px; min-height:600px; display:inline-block;
/*background-color:rgb(126,152,204);*/
 padding:30px; vertical-align:top; color:white;
}
a:link{ color:#819cd1;text-decoration: none;}
a:visited {color:#819cd1;text-decoration: none;}
/*a:hover{color:#ffc600;}*/
.link
{	color:#819cd1;	text-decoration: none; cursor:pointer;}

.linkred
{	color: #0579B7;	text-decoration: none; cursor:pointer;}

.linkred:hover {color:red;}

.link12
{
	color: #0579B7; font-size:12px;
	text-decoration: none;
	cursor:pointer;
}
a img {border:none; text-decoration: none;}


.desc {color:rgb(160,160,160);}
.desc12 { font-size:12px;}

button {cursor:pointer;}
.de_input{ border: 2px solid #a9b6d9; background-color:white; padding:3px; border-radius:3px; }
.cursor{ cursor:pointer;}

.warn {color:red;}
.hide {display:none;}

.pg_frame { display:inline-block; width:22px; height:1px; position:relative;}
.p_img { position:absolute; left:1px; bottom:-5px;}
.r_frame { display:inline-block; width:22px; height:1px; position:relative;}
.r_small { position:absolute; left:1px; bottom:-1px;}
.icon_frame { display:inline-block; width:16px; height:1px; position:relative;}
.icon_small { position:absolute; left:1px; bottom:-3px;}

.advan_team{ color:red;font-weight:bold;font-size:12px;}
.red_t { color:red;}

.tb_mask_progress
{
	position:fixed; background-color:rgba(80,80,80,0.3); z-index:10;left:0px;top:0px;display:none;
}
#sp_mask_progress { background-color:white; padding:5px 12px 5px 8px; border-radius:3px;}

/*---------------top head-------------------------*/
.top_head
{
	background: linear-gradient(180deg, #1b2838 0%, #15202e 100%);
	border-bottom: 1px solid rgba(59, 130, 246, 0.2);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
	margin: 0px; 
	width: 100%; 
	padding: 4px 0px; 
}
.top_below
{
	background: rgba(8, 16, 32, 0.85); 
	margin: 0px; 
	width: 100%; 
	padding: 0px; 
	display: inline-block; 
	height: 38px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.web_logo_f { height: 64px; vertical-align: middle;}
img.web_logo{ height: 52px; vertical-align: middle; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); transition: transform 0.2s ease;}
img.web_logo:hover { transform: scale(1.02); }

.top_head_f { width: 900px; max-width: 98%; text-align: left; padding: 2px 0px;}
.tb_top_head{ width: 100%; border-collapse: separate;}
.tb_top_head tr td { color: white; font-size: 14px; vertical-align: middle;}
.end_td { width: 130px; text-align: right; vertical-align: middle;}
.td_in_log{ width: 160px; vertical-align: middle;}
.td_top_avt{ width: 110px; text-align: center; vertical-align: middle;}
.avt_frame { display: inline-block; width: 68px; height: 68px; border-radius: 8px; border: 1px solid rgba(59, 130, 246, 0.3); overflow: hidden; vertical-align: middle;}
.avt_frame img { height: 68px;}
/*-------------------------------------*/
.low_footer
{
	background: #0f172a; margin: 0px; width: 100%; min-height: 90px; border-top: 1px solid rgba(255,255,255,0.06);
}

.yellow_button {
	border: 1px solid rgba(255, 215, 0, 0.4); 
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); 
	font-size: 16px; 
	font-weight: 700; 
	color: #0b1329;
	padding: 4px 12px; 
	border-radius: 6px; 
	position: relative; 
	margin-top: 5px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
	transition: all 0.2s ease;
}
.yellow_button:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45); }
.yellow_button:active { top: 1px; transform: translateY(0); }

.reg_link_but {
	height: 34px; 
	border: 1px solid rgba(245, 158, 11, 0.5); 
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); 
	color: #0b1329;
	font-size: 13px;  
	font-weight: 700;
	padding: 0 12px; 
	border-radius: 6px; 
	position: relative;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	transition: all 0.2s ease;
}
.reg_link_but:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45); }
.reg_link_but:active{ top: 1px; transform: translateY(0); }

.pink_button44{
	color: #ffffff;
	height: 34px; 
	width: auto; 
	min-width: 95px;
	border: 1px solid rgba(59, 130, 246, 0.4); 
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); 
	font-size: 13px; 
	font-weight: 600;
	padding: 0 12px; 
	border-radius: 6px; 
	position: relative; 
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	transition: all 0.2s ease;
}
.pink_button44:hover { filter: brightness(1.15); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(37, 99, 235, 0.6); }
.pink_button44:active { top: 1px; transform: translateY(0); }

.pink_button{
	color: white; 
	width: 98px; 
	border: 1px solid rgba(239, 68, 68, 0.4); 
	background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); 
	font-size: 13px; 
	font-weight: 600;
	padding: 4px 0;
	border-radius: 6px; 
	position: relative; 
	margin-top: 4px;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
	transition: all 0.2s ease;
}
.pink_button:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(239, 68, 68, 0.5); }
.pink_button:active { top: 1px; transform: translateY(0); }

.in_log
{  
	background: rgba(15, 23, 42, 0.7);    
	border: 1px solid rgba(148, 163, 184, 0.35); 
	margin: 2px 0px;  
	padding: 3px 8px;  
	width: 105px;  
	height: 24px; 
	color: #ffffff; 
	border-radius: 5px; 
	font-size: 12px; 
	display: inline-block;
	box-sizing: border-box;
	outline: none;
	transition: all 0.2s ease;
}
.in_log::placeholder {
	color: rgba(203, 213, 225, 0.6);
	font-size: 11px;
}
.in_log:focus {
	background: rgba(15, 23, 42, 0.95);
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.check_r{  
	background: rgba(15, 23, 42, 0.7); 
	border: 1px solid rgba(148, 163, 184, 0.4); 
	display: inline-flex; 
	align-items: center;
	justify-content: center;
	width: 15px; 
	height: 15px; 
	border-radius: 3px; 
	cursor: pointer; 
	vertical-align: middle;
	transition: all 0.2s ease;
}
.check_r:hover { border-color: #3b82f6; }
.check_r.checked { background: #2563eb; border-color: #3b82f6; }

.header_sec_tag {
	display: block;
	font-size: 10px;
	color: #60a5fa;
	background: rgba(37, 99, 235, 0.12);
	border: 1px solid rgba(59, 130, 246, 0.25);
	padding: 2px 6px;
	border-radius: 10px;
	margin-top: 4px;
	letter-spacing: 0.3px;
	text-align: center;
}
.header_sec_tag svg { vertical-align: -1px; margin-right: 2px; }

.input_log_f { display:inline-block; height:48px;}

.gray_button { 
	background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); 
	font-size: 14px; 
	font-weight: 600;
	padding: 8px 16px; 
	border: 1px solid #cbd5e1; 
	border-radius: 6px; 
	color: #1e293b; 
	min-width: 80px;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
	transition: all 0.2s ease;
} 
.gray_button:hover { background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.gray_button:active { transform: translateY(1px); }

.name_frame{ display:inline-block; font-size:14px; width:140px; text-align:center;}

.league_bg0{background-color: #d1dcec;}
.league_bg1{background-color: #dfe7fc;}
.bill_count { background-color:red; color:white; padding:0px 3px; border-radius:7px; display:inline-block; font-size:12px; margin:0px 2px;}

	.delay{ background:rgb(200,200,200); color:white;  padding:0px 4px 1px 4px; border-radius:2px; margin-left:1px;}
	.l_lost{ background:rgb(243,47,46); color:white; display:inline-block; width:20px; height:20px; text-align:center; border-radius:3px; margin-left:1px;}
	.w_win{ background:rgb(3,158,30); color:white; display:inline-block; width:20px; height:20px; text-align:center; border-radius:3px; margin-left:1px;}
	.d_draw{ background:rgb(200,200,200); color:white; display:inline-block; width:20px; height:20px; text-align:center; border-radius:3px; margin-left:1px;}
	.r_wait{ background:rgb(180,200,180); color:white; display:inline-block; padding:0px 3px; text-align:center; border-radius:3px; margin-left:3px;}


.inner_below{width:840px;}
.tb_below{width:100%; padding-top:2px;}
.tb_below tr td { text-align:center;}
.tb_below tr td a{color:white; font-size:20px;padding-left:3px; font-family:thaisanslite;}
.tb_below tr td a:hover{color:#ffc600; }
.h2_frame {display:inline-block; background-color:#d6d8dc; width:100%; margin-bottom:4px;}
.h2 { font-family:thaisanslite; font-size:24px; color:#000;
 margin:0px 0px 0px 10px; 
text-shadow: 1px 1px 3px #000; 

}
#credit_bath{font-weight:bold;}

/* ============================================================
   Popup Modal สำหรับแสดง stats.php (Custom Browser-like Frame)
   คล้ายหน้าต่างเบราว์เซอร์ พร้อมซ่อน URL ตามมาตรฐาน UX/UI
   ============================================================ */
.stats-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 4, 6, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.22s ease-in-out;
}

.stats-modal-overlay.active {
    opacity: 1;
}

.stats-modal-container {
    background: #0b1120;
    width: 95%;
    max-width: 1320px;
    height: 92vh;
    max-height: 94vh;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.97);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.stats-modal-overlay.active .stats-modal-container {
    transform: scale(1);
}

/* กรอบด้านบนจำลองแถบเบราว์เซอร์ (Browser Header Frame) */
.stats-modal-header {
    background: #161b22;
    height: 46px;
    min-height: 46px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

.stats-modal-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

/* ไอคอน 3 แท่งสีสัน (เขียว, ชมพู, ฟ้า) ตามภาพต้นฉบับ */
.stats-modal-icon-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 18px;
    flex-shrink: 0;
}
.stats-modal-icon-bars .bar-1 {
    width: 3.5px;
    height: 12px;
    background: #22c55e;
    border-radius: 1.5px;
}
.stats-modal-icon-bars .bar-2 {
    width: 3.5px;
    height: 18px;
    background: #ec4899;
    border-radius: 1.5px;
}
.stats-modal-icon-bars .bar-3 {
    width: 3.5px;
    height: 14px;
    background: #38bdf8;
    border-radius: 1.5px;
}

.stats-modal-title {
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

.stats-modal-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.stats-modal-close {
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    transition: all 0.15s ease;
    outline: none;
}
.stats-modal-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

/* ส่วนแสดงผลตัวเนื้อหา stats.php ภายใน iframe */
.stats-modal-body {
    flex: 1;
    position: relative;
    width: 100%;
    height: calc(100% - 46px);
    background: #0b1120;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

.stats-modal-body iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
    background: transparent !important;
    position: relative !important;
    z-index: 1 !important;
    pointer-events: auto !important;
}

.stats-modal-loader {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #0b1120 !important;
    display: none !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    color: #94a3b8 !important;
    font-family: 'Kanit', sans-serif !important;
    font-size: 14px !important;
    z-index: -9999 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.stats-modal-loader.loading {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 10 !important;
}

.stats-modal-loader.hidden {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    opacity: 0 !important;
}

.stats-modal-spinner {
    width: 38px;
    height: 38px;
    border: 3.5px solid rgba(56, 189, 248, 0.2);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: statsModalSpin 0.8s linear infinite;
}

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

@media (max-width: 768px) {
    .stats-modal-overlay {
        padding: 6px;
    }
    .stats-modal-container {
        width: 100%;
        height: 98vh;
        max-height: 100vh;
        border-radius: 8px;
    }
    .stats-modal-header {
        height: 42px;
        min-height: 42px;
        padding: 0 10px;
    }
    .stats-modal-title {
        font-size: 13px;
        max-width: 55vw;
    }
    .stats-modal-close {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
    .stats-modal-body {
        height: calc(100% - 42px);
    }
}

/* ป้องกันการคลุมดำและคัดลอกข้อมูลในตาราง */
.tb_body, .tb_match, .table_match, .stat_btn, table.tb_main, .edit_home, .edit_away {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}



