.tournament-name {
	font-size: 1.5em;
    font-weight: bold;
    padding: 1em;
    color: #333;
	text-align: center;
}



.tournament-card {
	background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 1em;
    transition: box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    position: relative;
    box-sizing: border-box;
}

.tournament-card:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
}

.tournament-card img {
	object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5em;
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
}

.tournament-card h2 {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0.5em 0 0.3em;
    color: #222;
}

.tournament-card .meta {
    font-size: 0.95em;
    color: #555;
    line-height: 1.5;
}

.tournament-card .desc {
    font-size: 0.95em;
    color: #444;
    margin-bottom: 0.5em;
}

/* === 分頁按鈕 === */

.tab-buttons { margin-right: 1em; }
.tab-buttons a {
	margin-right: 5px;
	padding: 5px 10px;
	background: #eee;
	border-radius: 5px;
	text-decoration: none;
	color: #333;
	}
.tab-buttons a.active {
	background: #555;
	color: white;
	font-weight: bold;
	}
.tab-buttons-1 { margin: 1em; }
.tab-buttons-1 a {
    margin-right: 5px;
    padding: 5px 10px;
    background: #555;
    border-radius: 5px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
	}	
#tournament-container {
padding: 1px;
    display: flex
;
    flex-wrap: wrap;
    gap: 0.5em;
    margin: 0 0 0 1em;
	}

/* === 子分頁按鈕 === */
.subtab-btn {
	background: #999;
    cursor: pointer;
    margin-right: 0.1em;
    min-width: 60px;
    /*max-width: 120px;*/
	transform: skewX(-15deg);
    margin: 2px 0px 2px 7px;
}
.subtab-btn.active {
    background: #333;
	transform: skewX(-15deg);
    margin: 2px 0px 2px 7px;
}

/* === 子分頁容器 === */
#subtab-container {
overflow: visible;
    height: auto;
    width: 100%;
}

/* === 飄浮按鈕區 === */
#floating-buttons {
	position: fixed;
    bottom: 0.5em;
    right: 0.5em;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2em;
}

.backtoTop {
	line-height: 1em;
}

.floating-btn {
    background-color: #ee1100;
    padding: 0.3em;
    border-radius: 8px;
    line-height: 1em;
height: 40px;
}

/* === Intro/Info 上方導覽列 === */
.tournament-banner {
    width: 100%;
    background: url(../../images/tournament_default.jpg);
	object-fit: cover;
}
	@media (max-width: 768px) {
		.tournament-banner {
				background-size: cover;
				    height: 220px;

			}
	}
.tournament-banner-cover {
    width: 100%;
    background: url(../../images/tournament_default.jpg);
	object-fit: cover;
    aspect-ratio: 21 / 9;
    height: auto;
}
	@media (max-width: 768px) {
		.tournament-banner-cover {
				height:220px;
				background-size: cover;
				aspect-ratio: 1 / 1;
			}
	}

.tournament-nav {
    display: inline-flex;
    background: #ccc;
    height: 3em;
    align-items: center;
    table-layout: fixed;
    width: 100%;
    gap: 4px;
}
.tournament-nav a {
    padding: 0.6em 0.6em;
    background: #eee;
    color: #333;
    text-decoration: none;
    font-weight: bold;
}
.tournament-nav a.active {
	border-bottom: 3px solid #e10;
}

/* === 階段卡的小徽章 === */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 8px;
}

.status-badge.future {
    background-color: #fff;
    color: #e10;
}
.status-badge.ongoing {
    background-color: #e10;
    color: #fff;
}
.status-badge.ended {
    background-color: #555;
    color: #999;
}
/* === 資訊列 (info-list) === */
.info-list {
	list-style: none;
    margin: 1em 0;
}
.info-list li {
    margin-bottom: 1em;
    font-size: 1em;
    line-height: 1.4;
}
.info-list li strong {
    display: inline-block;
    width: 10em;
    color: #555;
}

/* === 成員頭像 (報名名單用) === */
.member-avatar {
    width: 75% !important;
    height: auto !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
    border: 1px solid #ccc;
}

/* === 報名列表表格 === */
table.tournament-signup {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}

table.tournament-signup th,
table.tournament-signup td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #ccc;
}
table.tournament-signup th {
    background: #f0f0f0;
}

/* === 月曆樣式 (calendar_tournament_list.php 用) === */
.calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    font-size: 15px;
}

.calendar-table th,
.calendar-table td {
    border: 1px solid #ddd;
    width: 14.28%;
    height: 50px;
    text-align: left;
    vertical-align: top;
    padding: 5px;
    position: relative;
}

.calendar-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    text-align: center;
}

.calendar-day {
    cursor: pointer;
    transition: background 0.3s ease;
}

.calendar-day:hover {
    background-color: #fef4f4;
}

.calendar-day.selected {
    background-color: #e10;
    color: #fff;
    font-weight: bold;
}

.event-indicator {
    font-size: 12px;
    color: #fff;
    margin-top: 4px;
    display: block;
}

/* === 月曆導航列 (calendarNav) === */
#calendarNav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

#calendarNav button {
    background: #e10;
    color: #fff;
    border: none;
    padding: 5px 10px;
    font-weight: bold;
    cursor: pointer;
}
#calendarNav button:hover {
    background: #c10;
}

#currentMonth {
    font-size: 16px;
    font-weight: bold;
	margin: 0 1em;
}

/* === 月曆下方的賽事列表 === */
.event-list {
    margin-top: 1em;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    padding: 10px;
}

.event-list h5 {
    margin: 0 0 5px;
    font-size: 16px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}
#my-match-card{
	border: 2px solid #e10;
    border-radius: 8px;
	

	}
	
/*===階段卡推進|裁判鈕===*/	
.button.control-tools {
	font-size: 0.75em;
    margin-left: 0.5em;
    background: #eee;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    line-height: 0em;
    height: 1.5em;
}

.button.control-tools:hover {
  background: #ddd;
}
	
/*===賽事選地區===*/	
		#country{
			width: 50%;
			}
		#city{
			width: 50%;
			}
		#region-modal{
			background: #ccc;
			margin: 1em;
			}
		
		.modal-content{
			text-align: center;
			width: 100%;
			margin: 1em;
			}
	
/*===認証===*/
		.player-badge {
            background: #f5f5f5;
            border: 2px solid #aaa;
            padding: 1em;
            border-radius: 12px;
            max-width: 300px;
            margin: 0 auto 2em;
            text-align: center;
        }
        .player-badge h3 {
            margin-bottom: 0.3em;
        }
        .badge-rank {
            font-size: 2em;
            font-weight: bold;
            color: #fff;
            display: inline-block;
            padding: 0.2em 0.8em;
            border-radius: 8px;
        }
        .badge-r1 { background: #ff9800; }
        .badge-r2 { background: #607d8b; }
        .badge-r3 { background: #795548; }
		
		.badge {
			font-size: 0.75em;
			padding: 2px 6px;
			border-radius: 6px;
			display: inline-block;
		}
		.badge-blue {
			background: #e10;
			color: white;
		}
		.badge-gray {
			background: #ccc;
			color: black;
		}

	.tab-content{
    margin-left: 1em;
    margin-top: 1em;
    max-width: 93%;
    display: inline;
    overflow: auto;
		}
	.push-round{
background: #fc0;
    border-radius: 6px;
    padding: 0.8em 1.2em;
    color: #000;
    margin-right: -16px;
		}		
			

.checkin-box{
	font-weight: bold;
    font-size: 0.9em;
    background: #fc0;
    cursor: pointer;
    border-radius: 6px;
    opacity: 1;
    margin: 0 1px;
	line-height: 3em;
	}
.result{
	margin: 0 1em;
    overflow-x: auto;
	}
			@media (max-width: 768px) {
			.result{
					margin: 0 1em;
					overflow-x: auto;
					width: 385px;
					display: inline-grid;
						}}
	
.result .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
.result table {
    min-width: 720px; /* 或可視情況調整 */
}


/*===战队卡===*/
        .filters { flex-wrap: wrap; gap: 1em; margin-bottom: 1em; }
        .filters select, .filters input { padding: 0.4em;margin: 1em; width: 50%; }
        .tournament-grid { display: flex; flex-wrap: wrap; gap: 5px; }
        .tournament-card { width: calc(25% - 1em); border: 1px solid #ccc; border-radius: 8px; padding: 2px; background: #fff;}
        @media (max-width: 768px) {
			.tournament-card { max-width: 49%; min-width: 48%;}
        }
        .tournament-card-index { width: calc(25% - 1em); border: 1px solid #ccc; border-radius: 8px; padding: 2px; background: #fff;}
		@media (max-width: 768px) {
			.tournament-card-index { width: calc(49% - 1em);}
        }
        .tournament-info h3 { margin: 0.5em 0; font-size: 1.1em; }
        .suggest-box {
            position: absolute;
            background: #fff;
            border: 1px solid #ccc;
            max-height: 200px;
            overflow-y: auto;
            z-index: 99;
            width: 200px;
            display: none;
        }
        .suggest-box div {
            padding: 8px;
            cursor: pointer;
        }
        .suggest-box div:hover {
            background-color: #f0f0f0;
        }

/*===轮次===*/
.sub-tabs{
	}

.sub-tab-buttons {
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x; /* 禁止上下滑动 */
  -ms-overflow-style: none;  /* 隐藏 IE 滚动条 */
  scrollbar-width: none;     /* 隐藏 Firefox 滚动条 */
}

.sub-tab-buttons a {
	display: inline-block;
    padding: 0 1em;
    background-color: #ffcc00;
    text-decoration: none;
    color: #000;
    position: sticky;
}

.sub-tab-buttons a.active {
  background-color: #333;
  color: #fff;
}
.sub-tab-buttons::-webkit-scrollbar {
  display: none;  /* 隐藏 Chrome 滚动条 */
}
.tournament-logo{
	object-fit: cover;
    border-radius: 6px;
	width:36px;
	aspect-ratio: 1 / 1;
	}	
.alarm{color: #e10;
    margin: 0 1em;
    padding: 1em;
    background: #ffcc00;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
	}	

.member-card { text-align: center;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 1em;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 185px;
    box-sizing: border-box;
    width: 19%; 
}
        .member-grid { display: flex; flex-wrap: wrap; gap: 1em; margin: 1em; }
        .member-card img { width:80px;height:80px;border-radius:50%;object-fit:cover }
        .member-disabled { opacity:.5;pointer-events:none }	
		
.check_button{
	width: 100%;
    margin: 0;
    height: 100%;
    line-height: 3em;
    display: inline-grid;
}
.check_button_disable { 
width: 100%; border-radius: 6px;background: #333;}	

.bracket-container {display: flex;    overflow-x: auto; gap: 3px; margin: 1em;}
        		@media (max-width: 768px) {
					.bracket-container {
										display: inline-flex;
										overflow-x: auto;
										width: 385px;
										gap: 3px;
										margin: 1em;}        
								}
				.round-column      {
							background: #333;
							border: 1px solid #555;
							padding: 1em;
							min-width: 220px;
							flex-shrink: 0;
							color: #fff;
							border-radius: 4px;}
        .round-title       {font-weight:bold;text-align:center;margin-bottom:1em}
        .match-box         {
							padding: .5em;
							margin-bottom: 1em;
							background: #fff;
							border-radius: 4px;}
        .winner            {background: #e10;
							color: #fff;
							font-weight: bold;}
        .winner a        { color:#fff;
							}					
							
							
        .bye               {font-style:italic;color:#888}
        .match-id          {font-size:12px;color:#999;text-align:right}
        #scroll-to-top     {position:fixed;bottom:40px;right:30px;z-index:999;background:#ee1100;color:#fff;padding:10px 14px;border:none;border-radius:8px;font-weight:bold;cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,.2);display:none}
        #scroll-to-top:hover{background:#c10d00}
		
        .table-wrapper{overflow-x:auto;}
        table.alt{width:100%;}
        .avatar{width:40px;height:40px;object-fit:cover;border-radius:50%;vertical-align:middle;margin-right:6px;}
        .rank-badge{font-weight:bold;font-size:1.2em;text-align: center;}
        .nav-switch a{margin-right:12px;text-decoration:none;}
        .nav-switch a.active{font-weight:700;text-decoration:underline;}
        .load-hint{color:#6b7280;font-size:13px;margin-top:8px;}
        .sentinel{height:1px;}
		
.my_match{
	color: #fff; border: 1px solid #999; border-radius: 8px; padding: 1em; background: #555; font-size: 1.5em; text-align: center;margin-top: 1em;
	}
.my_position{
	color: #fff !important; background: #e10; border-radius: 25%; padding: 0.3em 0.5em; margin-left: 1em; border: 1px solid #000;
	}
	
.all_checked_in{
	color: #000;
    margin-top: 0.5em;
    text-align: center;
    font-size: 0.9em;
    background: #ffcc00;
    padding: 5px 0;
    border-radius: 6px;
    font-weight: bolder;
	}
.not_all_checked_in{
	margin-top: 0.5em;
    text-align: center;
    font-size: 0.9em;
    background: #eee;
    padding: 5px 0;
    border-radius: 6px;
    font-weight: bolder;
	}		
.member-cell { text-align: center; width: 30%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; margin: auto;}	
.signup-grid { display: flex; flex-wrap: wrap; gap: 1em; margin-top: 1em; }
		
		
.result-wrap{padding:0 1em}
.result-wrap table{width:100%;border-collapse:collapse}
.result-wrap th,.result-wrap td{padding:10px;border:1px solid #ccc;text-align:left;vertical-align:middle}
.result-wrap th{background:#f8f8f8}
.proof-thumb{height:40px;border-radius:4px}
.badge{display:inline-block;padding:2px 8px;border-radius:6px;background:#333;color:#fff;font-size:1em;margin-left:6px}
.badge-fail{background:#fee;color:#c00}
.hint{font-size:0.8em;color:#e10;margin:6px 0}		

.match-name{ overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; text-overflow: ellipsis; max-width: 58px;}