/**
 * Match Page Styles
 */

/* PSG font for team names */
@font-face {
	font-family: 'PSG';
	src: url('/psg-font.woff2') format('woff2');
	font-weight: 400;
	font-display: swap;
}

/* Virge for player names */
@font-face {
	font-family: 'Virge';
	src: url('/con_reg.woff2') format('woff2');
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: 'Virge';
	src: url('/con_bold.woff2') format('woff2');
	font-weight: 600;
	font-display: swap;
}

@font-face {
	font-family: 'Virge';
	src: url('/con_black.woff2') format('woff2');
	font-weight: 700;
	font-display: swap;
}


/* Season Filter */
#season_filter {
	padding: 10px 16px 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
#season_filter::-webkit-scrollbar { display: none; }
#season_filter .season_buttons {
	display: flex;
	gap: 20px;
	white-space: nowrap;
}
#season_filter button {
	font-size: 15px;
	font-weight: 600;
	font-family: "Virge", "Paperlogy";
	color: var(--color-text-muted);
	background: none;
	cursor: pointer;
	flex-shrink: 0;
	letter-spacing: 0;
	border-bottom: 1px solid transparent;
}
#season_filter button.active {
	color: var(--color-text);
	border-color: var(--color-text);
}

/* Filter */
#match_filter {
	padding: 10px 16px;
}

#match_filter .filter_buttons {
	display: flex;
	gap: 5px;
}

#match_filter button {
background: var(--color-bg-card);
font-size: 15px;
font-weight: 700;
color: var(--color-text-muted);
cursor: pointer;
font-family: "Paperlogy";
padding: 6px 14px;
border-radius: 100px;
}

#match_filter button.active {
	color: var(--color-bg);
background: var(--color-text);
}

.current_season #match_filter button:nth-of-type(2) { border-radius: 100px 0 0 100px; }
.current_season #match_filter button:nth-of-type(3) { border-radius: 0 100px 100px 0; }
.current_season #match_filter button:nth-of-type(4) { border-radius: 100px 0 0 100px; }
.current_season #match_filter button:nth-of-type(5) { border-radius: 0 100px 100px 0; }

/* 순위 버튼 */
#match_filter .standings_btn {
	margin-left: -4px;
}
#match_filter .standings_btn i { font-size: 17px; margin: 0 0 -2px -3px; }
#match_filter .standings_btn.active i { color: var(--color-bg); }

/* 순위 뷰 */
.standings_view { padding: 0; }

.standings_section_header {
	display: flex;
	align-items: center;
	gap: 5px;
	margin-bottom: 12px;
}

.standings_section_header picture { width: 20px; height: 20px; }

.standings_section_header img { width: 20px; height: 20px; object-fit: contain; }
.standings_section_header span { font-size: 17px; font-weight: 700; font-family: "Paperlogy"; }

.standings_table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.standings_table th {
	font-size: 11px; font-weight: 600; color: var(--color-text-muted);
	text-align: center; padding: 4px 0;
	border-bottom: 1px solid var(--color-border);
}
.standings_table th:nth-child(2) { text-align: left; }
.standings_table td {
	padding: 10px 0; text-align: center;
	border-bottom: 1px solid var(--color-border);
	vertical-align: middle;
	font-family: "Virge", "Paperlogy";
	letter-spacing: 0;
}
.standings_table td:nth-child(1) { width: 28px; font-weight: 600; color: var(--color-text-muted); }
.standings_table td:nth-child(2) { text-align: left; font-weight: 500; }
.standings_table td:last-child { font-weight: 700; width: 36px; }
.standings_table tr.my_team td { background-color: var(--color-bg-card); color: var(--color-link); }
.standings_table tr.my_team td:nth-child(1) { color: var(--color-link); }
.standings_table tr.separator td { padding: 2px 0; border-bottom: none; text-align: center; color: var(--color-text-muted); font-size: 11px; }
.standings_updated { text-align: right; padding: 10px 0 0; font-size: 11px; color: var(--color-text-muted); }

.standings_team_cell {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 14px;
}
.standings_team_cell { vertical-align: middle; display: flex; align-items: center; line-height: 1; }
.standings_team_cell img { width: 18px; height: 18px; object-fit: contain; }

/* Match List */
#match_list {
	padding: 0 16px 40px;
}

#match_list .loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 80px 20px;
}

#match_list .loading .spinner {
	width: 20px;
	height: 20px;
	border: 2px solid var(--color-border-strong);
	border-top-color: var(--color-text-muted);
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}

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

#match_list .empty {
	text-align: center;
	padding: 80px 20px;
	color: var(--color-text-muted);
	font-size: 15px;
}

/* Match Cards */
.match_cards {
	list-style: none;
	margin: 0;
	padding: 0;
}

.match_card {
	border-bottom: 0.5px solid var(--color-border);
	padding: 15px 0;
	position: relative;
}

.match_card:first-child {
	border-top: 0.5px solid var(--color-border);
}

.match_card a {
	display: block;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
}

.match_card a::before {
	content: 'sports_and_outdoors';
	font-family: 'Material Symbols Rounded';
	font-size: 24px;
	color: var(--color-text-muted);
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	opacity: 1;
	pointer-events: none;
	font-weight: 200;
	z-index: 0;
	line-height: 1;
}
.match_card.laliga a::before,
.match_card.ucl a::before,
.match_card.copa a::before,
.match_card.supercopa a::before {
	content: '';
	font-size: 0;
}

.match_card.laliga a::before {
	background-image: url('../img/laliga_light.png');
}

.match_card.ucl a::before {
	background-image: url('../img/ucl_light.png');
}

.match_card.copa a::before {
	background-image: url('../img/copa_light.png');
}

.match_card.supercopa a::before {
	background-image: url('../img/supercopa_light.png');
}

@media (prefers-color-scheme: dark) {
	.match_card.laliga a::before {
		background-image: url('../img/laliga.png');
	}

	.match_card.ucl a::before {
		background-image: url('../img/ucl.png');
	}

	.match_card.copa a::before {
		background-image: url('../img/copa.png');
	}

	.match_card.supercopa a::before {
		background-image: url('../img/supercopa.png');
	}
}

.match_card a > * {
	position: relative;
	z-index: 1;
}

.match_card a:active {
	opacity: 0.7;
}

/* Header */
.match_card .match_header {
	margin-bottom: 10px;
	position: absolute;
	right: 40px;
	top: 50%;
	transform: translateY(-50%);
}

.match_card .comp_badge {
	display: flex;
	align-items: center;
	gap: 3px;
	font-size: 11px;
	color: var(--color-text-muted);
	font-family: "Virge", "Paperlogy";
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0;
}

.match_card .round {
	color: var(--color-text-muted);
	font-size: 11px;
}

/* Body */
.match_card .match_body {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.match_card .team {
	display: flex;
	align-items: center;
	gap: 4px;
	font-family: "Virge", "Paperlogy";
}

.match_card .team .team_logo {
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	margin: 2px 0 0 2px;
}


.match_card .team .team_logo img {
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.match_card .team.real .team_logo img {
	width: 28px;
	height: 28px;
	margin: -2px 0 0 -2px;
	
}

.match_card .team .team_logo .material-symbols-rounded {
	font-size: 32px;
	color: var(--color-text-muted);
}

.match_card .team .team_name {
	font-size: 17px;
	color: var(--color-text);
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: uppercase;
}

.match_card .team .team_score {
	font-size: 17px;
	font-weight: 700;
	color: var(--color-text-secondary);
	font-variant-numeric: tabular-nums;
}

/* 승/무/패 색상 */
.match_card .team.win .team_name,
.match_card .team.win .team_score { color: var(--color-text); }
.match_card .team.draw .team_name,
.match_card .team.draw .team_score { color: var(--color-text-secondary); }
.match_card .team.loss .team_name,
.match_card .team.loss .team_score { color: var(--color-text-muted); }

/* ===== DETAIL PAGE ===== */

#match_detail_page section {
	width: auto;
}

.error_section {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 100px 20px;
	text-align: center;
}

.error_section p {
	font-size: 15px;
	color: var(--color-text-muted);
	margin-bottom: 24px;
}

.error_section .back_btn {
	padding: 12px 24px;
	background: var(--color-bg-card);
	color: var(--color-text);
	text-decoration: none;
	border-radius: 100px;
	font-size: 15px;
}

/* Match Info */
#match_info {
	padding: 0 16px;
}

#match_info .comp_badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 13px;
	font-weight: 500;
	color: var(--color-text-muted);
	justify-content: center;
	width: 100%;
	flex-direction: column;
	font-family: "Virge", "Paperlogy";
	letter-spacing: 0;
	margin-top: 10px;
}

#match_info .comp_badge picture {
	width: 24px;
	height: 24px;
}

#match_info .comp_badge img {
	width: 24px;
	height: 24px;
	object-fit: contain;
}

#match_info .match_score_box {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	margin-top: 20px;
	gap: 5px;
}

#match_info .match_score_box .team {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

#match_info .match_score_box .team .team_logo {
	width: 44px;
	height: 44px;
}

#match_info .match_score_box .team .team_logo img {
	width: 44px;
	height: 44px;
	object-fit: contain;
}

#match_info .match_score_box .team .name {
	font-size: 17px;
	color: var(--color-text);
	line-height: 1.3;
	font-family: "Paperlogy";
	font-weight: 700;
	text-align: center;
	letter-spacing: 0;
}

#match_info .score_center .score {
	font-size: 32px;
	font-weight: 900;
	color: var(--color-text);
	letter-spacing: 4px;
	font-variant-numeric: tabular-nums;
	font-family: "Virge";
	white-space: nowrap;
	width: 60px;
	flex-shrink: 0;
	text-align: center;
}

#match_info .penalty_score {
	font-size: 17px;
	color: var(--color-text-secondary);
	font-weight: 600;
	text-align: center;
	font-family: "Virge";
	letter-spacing: 1px;
}

#match_info .match_datetime {
	font-size: 11px;
	color: var(--color-text-muted);
	font-family: "Virge";
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0;
	margin-top: 5px;
}

#match_info .match_venue {
	font-size: 9px;
	color: var(--color-text-muted);
	font-family: "Virge";
	line-height: 1.3;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0;
}

#match_info .match_location {
	font-size: 12px;
	color: var(--color-text-muted);
	font-family: "Virge";
	line-height: 1.3;
	text-align: center;
	text-transform: uppercase;
}

/* MOM */
#match_mom {
	margin: 0 20px 16px;
	padding: 16px;
	background: var(--color-bg-card);
	border-radius: 12px;
}

#match_mom .mom_badge {
	font-size: 11px;
	font-weight: 600;
	color: var(--color-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
}

#match_mom .mom_info {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

#match_mom .mom_player .name {
	font-size: 17px;
	font-weight: 600;
	color: var(--color-text);
	display: block;
}

#match_mom .mom_player .team {
	font-size: 13px;
	color: var(--color-text-muted);
	margin-top: 2px;
}

#match_mom .mom_rating {
	font-size: 28px;
	font-weight: 600;
	color: #34c759;
	font-variant-numeric: tabular-nums;
}

/* Events */
#match_events {
	margin: 20px 16px 0 16px;
}

#match_events .empty {
	color: var(--color-text-muted);
	font-size: 14px;
	text-align: center;
	padding: 16px 0;
}

#match_events .events_flow {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	justify-content: center;
}

#match_events .event_chip {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 2px 6px 2px 3px;
	border: 1px solid var(--color-border-strong);
	background-color: var(--color-bg);
	border-radius: 100px;
	font-size: 12px;
	font-family: "Virge";
	text-transform: uppercase;
	font-weight: 800;
	letter-spacing: 0;
}

#match_events .event_chip.penalty_kick {
	padding-right: 8px;
	font-size: 11px;
}

#match_events .event_chip .material-symbols-rounded {
	font-size: 18px;
}

#match_events .event_chip .player {
	color: var(--color-text);
	margin-top: 1.5px;
}

#match_events .event_chip .time {
	font-size: 9px;
	color: var(--color-text-muted);
	font-weight: 400;
}

/* 상대팀 이벤트 - 흐리게 */
#match_events .event_chip:not(.rm) {
	background-color: var(--color-bg-card);
	border-color: transparent;
}

#match_events .event_chip.goal.rm .material-symbols-rounded, #match_events .event_chip.goal.rm .player {
	color: var(--color-text);
}

/* 퇴장 아이콘 */
#match_events .event_chip.red_card .material-symbols-rounded {
	color: #ff3b30;
}

/* Penalty Shootout */
#match_events .penalty_shootout_flow {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 15px;
	border: 0.5px solid var(--color-border-strong);
	padding-top: 11px;
	border-radius: 8px;
	padding: 10px;
}

#match_events .penalty_shootout_label {
	width: 100%;
	font-size: 13px;
	font-weight: 600;
	color: var(--color-text-muted);
	letter-spacing: 0;
	font-family: "Virge", "Paperlogy";
	margin-bottom: 6px;
}

#match_events .penalty_kick.scored .material-symbols-rounded {
	color: var(--color-accent);
}

#match_events .penalty_kick.missed .material-symbols-rounded {
	color: #ff3b30;
}

/* Lineup */
.lineup_section {
	margin: 0 20px 16px;
	padding: 16px;
	background: var(--color-bg-card);
	border-radius: 12px;
}

.lineup_section h3 {
	font-size: 15px;
	font-weight: 600;
	color: var(--color-text);
	margin: 0 0 4px 0;
}

.lineup_section .formation {
	font-size: 13px;
	color: var(--color-text-muted);
	margin-bottom: 12px;
}

.lineup_section .lineup_list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lineup_section .player_item {
	display: flex;
	align-items: center;
	padding: 10px 0;
	font-size: 14px;
}

.lineup_section .player_item:not(:last-child) {
	border-bottom: 1px solid var(--color-border);
}

.lineup_section .player_item .number {
	width: 28px;
	font-size: 13px;
	color: var(--color-text-muted);
	font-variant-numeric: tabular-nums;
}

.lineup_section .player_item .name {
	flex: 1;
	color: var(--color-text);
}

.lineup_section .player_item .rating {
	font-size: 14px;
	font-weight: 600;
	color: var(--color-text-muted);
	min-width: 36px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.lineup_section .player_item .rating.high {
	color: #34c759;
}

/* Legacy Lineup */
#legacy_lineups {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 15px 16px 0 16px;
	border: 0.5px solid var(--color-border-strong);
	padding-top: 11px;
	border-radius: 8px;
	padding: 10px;
}
#legacy_lineups .lineup_block {
	font-family: "Virge";
	letter-spacing: 0;
	text-transform: uppercase;
	font-size: 11px;
}
#legacy_lineups .lineup_header {
	font-weight: 700;
	color: var(--color-text);
}
#legacy_lineups .lineup_players {
	display: flex;
	flex-wrap: wrap;
	gap: 0 6px;
}
#legacy_lineups .lineup_player {
	color: var(--color-text-secondary);
}
#legacy_lineups .lineup_player:not(:last-child)::after {
	content: ',\00a0';
}

/* Highlights */
#match_highlight {
	margin: 20px 16px 0 16px;

}

#match_highlight .highlight_link {
	display: block;
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	margin-top: 12px;
	width: 100%;
}

#match_highlight .highlight_link img {
	width: 100%;
	display: block;
}

#match_highlight .play_icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

#match_highlight .play_icon > i { font-size: 100px; }

/* Match Stats */
#match_stats {
margin: 30px 16px 20px 16px;
}

.section_title {
	font-size: 13px;
	font-weight: 600;
	color: var(--color-text-muted);
	margin-bottom: 5px;
}

#match_stats .possession_bar {
	display: flex;
	align-items: center;
	position: relative;
	height: 44px;
	border-radius: 8px;
	overflow: visible;
	margin-bottom: 16px;
}

#match_stats .possession_bar .bar {
	display: flex;
	align-items: center;
	height: 100%;
	background: var(--color-light);
}

#match_stats .possession_bar .bar.home {
	justify-content: flex-start;
	padding-left: 15px;
	border-radius: 100px 0 0 100px;
}

#match_stats .possession_bar .bar.away {
	justify-content: flex-end;
	padding-right: 15px;
	border-radius: 0 100px 100px 0;
}

#match_stats .possession_bar .bar span {
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	font-family: "Virge";
	letter-spacing: 0;
}

#match_stats .possession_label {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	font-size: 13px;
	color: #fff;
	font-weight: 500;
}

@media (prefers-color-scheme: dark) {
	#match_stats .possession_bar .bar {
		background: var(--color-dark);
	}

	#match_stats .possession_label {
		color: #fff;
	}
}

#match_stats .stat_row {
	margin-bottom: 16px;
	padding: 0 15px;
}

#match_stats .stat_row:last-child {
	margin-bottom: 0;
}

#match_stats .stat_header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
}

#match_stats .stat_value {
	font-size: 15px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	font-family: "Virge";
	letter-spacing: 0;
}

#match_stats .stat_value:not(.highlight) {
	color: var(--color-text-muted);
}

#match_stats .stat_label {
	font-size: 13px;
	font-weight: 500;
	color: var(--color-text-muted);
}

#match_stats .stat_bar_center {
	display: flex;
	height: 4px;
}

#match_stats .stat_bar_center .bar_half {
	flex: 1;
	position: relative;
	background: var(--color-border-strong);
	border-radius: 2px;
}

#match_stats .stat_bar_center .bar_half.home {
	margin-right: 2px;
}

#match_stats .stat_bar_center .bar_half.away {
	margin-left: 2px;
}

#match_stats .stat_bar_center .bar_half.home .bar_fill {
	position: absolute;
	right: 0;
	top: 0;
	height: 100%;
	border-radius: 2px;
	background: var(--color-light);
}

#match_stats .stat_bar_center .bar_half.away .bar_fill {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	border-radius: 2px;
	background: var(--color-light);
}

@media (prefers-color-scheme: dark) {
	#match_stats .stat_bar_center .bar_fill {
		background: var(--color-dark);
	}
}



/* Formation */
#formation_section {
	margin: 20px 16px 0 16px;
	border-radius: 8px;
	background-color: #0E1B36;
}

#formation_section .formation_tabs {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 13px 16px 0 16px;
	border-bottom: 0.5px solid rgba(255,255,255,.2);
	box-sizing: border-box;
}

#formation_section .formation_tabs .tab_btn {
	padding: 0 0 10px 0;
	border: none;
	border-bottom: 2px solid transparent;
	color: rgba(255,255,255,.5);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	background: transparent;
	white-space: nowrap;
	font-family: "Paperlogy";
	letter-spacing: 0;
}

#formation_section .formation_tabs .opp {
	overflow: hidden;
	text-overflow: ellipsis;
}

#formation_section .formation_tabs .tab_btn.active {
	border-color: #fff;
	color: #fff;
}

#formation_section .formation_tabs .rating_toggle {
	margin-left: auto;
	display: flex;
	align-items: center;
}

#formation_section .rating_toggle .toggle_btn:first-child {
	border-radius: 5px 0 0 5px;
}

#formation_section .rating_toggle .toggle_btn:last-child {
	border-radius: 0 5px 5px 0;
}

#formation_section .rating_toggle .toggle_label_text {
	font-size: 12px;
	color: var(--color-text-muted);
}

#formation_section .rating_toggle .toggle_btn {
	padding: 2px 5px;
	background: transparent;
	color: rgba(255,255,255,.5);
	background-color: rgba(255,255,255,.1);
	font-size: 12px;
	cursor: pointer;
	white-space: nowrap;
	border: none;
}

#formation_section .rating_toggle .toggle_btn.active {
	background-color: rgba(255,255,255,.5);
	color: #fff;
}

#formation_section .rating_toggle .toggle_btn.disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

#formation_section .formation_panel {
	display: none;
}

#formation_section .formation_panel.active {
	display: block;
}

/* 평점 입력 펼치기 */
.rating_input_section {
}

.rating_expand_btn {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 4px;
	color: #0a84ff;
	font-size: 14px;
	height: 44px;
	cursor: pointer;
	background-color: #0A1327;
	border-radius: 0 0 8px 8px;
	font-weight: 600;
}

.rating_expand_btn i {
	font-size: 20px;
	margin-left: -8px;
}

.rating_input_form {
	margin-top: 10px;
	background: var(--color-bg-card);
	border-radius: 8px;
	padding-top: 20px;
	overflow: hidden;
}

.rating_form_list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rating_form_list > div:last-child { border: 0; }

.form_player_row {
	display: flex;
	flex-direction: column;
	border-bottom: 1px solid var(--color-border);
	gap: 8px;
	padding: 0 16px 16px 16px;
}

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

.form_player_name {
	font-size: 15px;
	font-weight: 600;
	color: var(--color-text);
	font-family: "Virge";
	letter-spacing: 0;
	text-transform: uppercase;
}

.form_save_check {
	opacity: 0;
	color: var(--color-accent);
	transition: opacity 0.2s;
}

.form_save_check i {
	font-size: 16px;
	font-weight: 900;
}

.form_save_check.show {
	opacity: 1;
}

.form_player_inputs {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.form_player_inputs input { font-size: 14px;
	
 }

.form_rating_buttons {
	display: flex;
	gap: 0;
	flex-wrap: wrap;
}

.form_rating_btn {
	flex: 1;
	height: 36px;
	background: var(--color-bg);
	color: var(--color-text);
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
	transition: all 0.15s;
	font-family: "Virge";
	letter-spacing: 0;
	border-color: var(--color-border-strong);
	border-width: 1px 0;
	border-style: solid;
	border-right: 0.5px solid var(--color-border);
}

.form_rating_buttons button:first-child {
	border-left-width: 1px;
	border-radius: 4px 0 0 4px;
}

.form_rating_buttons button:last-child {
	border-right-width: 1px;
	border-radius: 0 4px 4px 0;
	border-right-color: var(--color-border-strong);
}

.form_rating_btn:hover {
	border-color: var(--color-text-muted);
}

.form_rating_btn.selected {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}

.form_general_comment { display: none; }

.rating_form_actions { display: none; }


.rating_results_section {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 20px 20px 0 20px;
	background: var(--color-bg-card);
	border-radius: 8px;
	padding: 16px;
}

.rating_results_section:empty {
	display: none;
}

.result_player {
	font-size: 13px;
}

.result_player_header { display: flex; align-items: center; gap: 4px; }
.result_player_name, .result_avg_rating {
	font-family: "Virge";
	letter-spacing: 0;
	font-size: 15px;
	font-weight: 600;
	text-transform: uppercase;
}

.result_ratings_list {
	margin-top: 2px;
}

.result_score_group {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin-top: 4px;
	font-size: 13px;
}

.result_score {
	flex-shrink: 0;
	font-family: "Virge";
	font-weight: 600;
	min-width: 16px;
}

.result_score.high { color: #0a84ff; }

.result_members {
	color: var(--color-text-secondary);
	line-height: 1.4;
}

/* 총평 섹션 (평점과 분리) */
#general_comment_section {
	margin: 10px 16px 0 16px;
}

.general_comment_list {
	display: flex;
	flex-direction: column;
	margin-bottom: 10px;
}

.general_comment_list:empty {
	display: none;
	margin: 0;
}

.result_general_item {
	display: flex;
	font-size: 13px;
	line-height: 1.4;
	align-items: flex-start;
	position: relative;
	flex-wrap: wrap;
	border-bottom: 0.5px solid var(--color-border-strong);
	padding: 10px 0;
	font-size: 15px;
}

.result_general_member {
	flex-shrink: 0;
	font-weight: 600;
	color: var(--color-text);
	text-decoration: none;
	flex-basis: 100%;
	font-size: 13px;
}

.result_general_text {
	flex: 1;
	color: var(--color-text);
	word-break: break-word;
}

.btn_delete_comment {
	flex-shrink: 0;
	border: none;
	background: none;
	color: var(--color-text-tertiary);
	cursor: pointer;
	padding: 0;
	line-height: 1;
	opacity: 0.5;
}

.btn_delete_comment .material-symbols-rounded {
	font-size: 16px;
}

.general_comment_input {
	display: flex;
	gap: 8px;
	align-items: flex-end;
}

.general_comment_input textarea {
	flex: 1;
	min-height: 72px;
	max-height: 120px;
	padding: 10px;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	background: var(--color-bg-card);
	color: var(--color-text);
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
	font-family: inherit;
	resize: none;
}

.btn_save_general {
	width: 34px;
	height: 34px;
	flex-shrink: 0;
	border: none;
	background: var(--color-primary);
	color: #fff;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.btn_save_general .material-symbols-rounded {
	font-size: 20px;
	font-weight: 700;
}

/* 평점 결과 카드 횡스크롤 */
.rating_cards {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding: 4px 0 16px 0;
	margin: 0;
	list-style: none;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.rating_cards::-webkit-scrollbar {
	display: none;
}
.rating_card {
	flex: 0 0 200px;
	background: var(--color-bg-card);
	border-radius: 12px;
	padding: 14px;
	display: flex;
	flex-direction: column;
}
.rating_card_header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 4px;
}
.rating_card_name {
	font-size: 15px;
	font-weight: 600;
	color: var(--color-text);
}
.rating_card_avg {
	font-size: 20px;
	font-weight: 700;
	color: #ffb800;
}
.rating_card_avg.high {
	color: #ff6b00;
}
.rating_card_count {
	font-size: 12px;
	color: var(--color-text-muted);
	margin-bottom: 10px;
}
.rating_card_list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--color-border);
	padding-top: 10px;
	flex: 1;
	overflow-y: auto;
	max-height: 150px;
}
.rating_card_list li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: 5px 0;
	border-bottom: 1px solid var(--color-border);
}
.rating_card_list li:last-child {
	border-bottom: none;
}
.rc_member {
	font-size: 12px;
	color: var(--color-text-muted);
}
.rc_score {
	font-size: 13px;
	font-weight: 600;
	color: #ffb800;
}
.rc_score.high {
	color: #ff6b00;
}
.rc_comment {
	width: 100%;
	margin: 4px 0 0 0;
	font-size: 12px;
	color: var(--color-text);
	line-height: 1.4;
}

#formation_section .pitch {
	background-color: #0E1B36;
	min-height: 360px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 10px;
}

#formation_section .formation_line {
	display: flex;
	justify-content: space-around;
	align-items: center;
	padding: 0 10px;
}

#formation_section .player_dot {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	min-width: 0;
	max-width: 65px;
	position: relative;
}

#panel_rm .player_dot {
	cursor: pointer;
}

/* 선수 선택: 나머지 dimmed */
.pitch.rating_selecting .player_dot {
	opacity: 0.25;
	transition: opacity 0.2s;
}

.pitch.rating_selecting .player_dot.rating_active {
	opacity: 1;
	filter: drop-shadow(0 0 12px rgba(10,132,255,.6)) drop-shadow(0 0 25px rgba(10,132,255,.3));
}

/* 하단 평점 바 */
.rating_bar {
	position: sticky;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(10, 19, 39, 0.97);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	padding: 16px;
	z-index: 50;
	border-radius: 0 0 8px 8px;
	display: none;
}

.rating_bar.open {
	display: block;
}

/* 평점 바 - 투표 현황 */
.rating_bar_info:empty { display: none; }

.rating_bar_info {
}

.rbar_info_header {
	display: flex;
	align-items: baseline;
	gap: 3px;
	margin-bottom: 4px;
	font-weight: 700;
}

.rbar_player_name {
	font-size: 14px;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0;
	font-family: "Virge";
}

.rbar_avg {
	font-size: 14px;
	color: rgba(255,255,255,.5);
	letter-spacing: 0;
	font-family: "Virge";
}

.rbar_avg small {
	font-size: 11px;
	display: none;
}

.rbar_scores {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 10px;
	font-size: 13px;
}

.rbar_score_group {
	display: flex;
	gap: 3px;
}

.rbar_score_num {
	color: rgba(255,255,255,.4);
	font-family: "Virge";
	letter-spacing: 0;
	font-weight: 700;
}

.rbar_score_members {
	color: rgba(255,255,255,.7);
	font-weight: 500;
}

.rating_bar_buttons {
	display: flex;
	gap: .5px;
	margin-top: 15px;
}

.rating_bar_buttons:empty { display: none; }

.rbar_btn {
	flex: 1;
	height: 44px;
	border: none;
	background: rgba(255,255,255,.1);
	color: rgba(255,255,255,.7);
	font-size: 15px;
	font-weight: 600;
	font-family: "PSG";
	letter-spacing: 0;
	align-items: center;
	display: flex;
	justify-content: center;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background 0.15s, color 0.15s;
}

.rbar_btn:first-child { border-radius: 8px 0 0 8px; }
.rbar_btn:last-child { border-radius: 0 8px 8px 0; }

.rbar_btn:active {
	background: rgba(255,255,255,.25);
}

.rbar_btn.selected {
	background: var(--color-primary);
	color: #fff;
}

.rbar_btn .material-symbols-rounded {
	font-size: 24px;
	font-weight: 700;
}

/* 내 점수 즉시 표시 */
#formation_section .player_dot .rating.my_score {
	background-color: var(--color-primary);
	color: #fff;
	transition: background-color 0.3s;
}

#formation_section .player_dot .name_row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1px;
}

#formation_section .player_dot .name {
	font-family: 'Virge', sans-serif;
	font-weight: 600;
	font-size: 11px;
	color: #fff;
	text-align: center;
	line-height: 1.3;
	text-transform: uppercase;
	margin-bottom: 2px;
	letter-spacing: 0;
	white-space: nowrap;
}

#formation_section .player_dot .player_icons {
	display: flex;
	gap: 0px;
	margin-top: 20px;
	position: absolute;
}

#formation_section .player_dot .player_icons i:nth-child(1)  { z-index: 10; }
#formation_section .player_dot .player_icons i:nth-child(2)  { z-index: 9; }
#formation_section .player_dot .player_icons i:nth-child(3)  { z-index: 8; }
#formation_section .player_dot .player_icons i:nth-child(4)  { z-index: 7; }
#formation_section .player_dot .player_icons i:nth-child(5)  { z-index: 6; }
#formation_section .player_dot .player_icons i:nth-child(6)  { z-index: 5; }
#formation_section .player_dot .player_icons i:nth-child(7)  { z-index: 4; }
#formation_section .player_dot .player_icons i:nth-child(8)  { z-index: 3; }
#formation_section .player_dot .player_icons i:nth-child(9)  { z-index: 2; }
#formation_section .player_dot .player_icons i:nth-child(10) { z-index: 1; }

#formation_section .player_dot .player_icons i {
	background-color: #fff;
	width: 15px;
	height: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	border-radius: 100%;
	border: 1px solid #0E1B36;
	margin: 0 -2px 0 -2px;
}

#formation_section .player_dot .player_icons .material-symbols-rounded {
	font-size: 10px;
	color: #000;
}

#formation_section .player_dot .player_icons .goal {
	color: #000;
}

#formation_section .player_dot .player_icons .assist {
	color: #000;
}

#formation_section .player_dot .player_icons .yellow {
	color: #ffcc00;
}

#formation_section .player_dot .player_icons .red {
	color: #ff3b30;
}

#formation_section .player_dot .player_icons .subin {
	background-color: #34c759;
	color: #fff;
}

#formation_section .player_dot .player_icons .subout {
	background-color: #ff9500;
	color: #fff;
}

#formation_section .player_dot .player_icons .injury {
	background-color: #ff3b30;
	color: #fff;
}

#formation_section .player_dot .rating {
	font-size: 12px;
	font-weight: 700;
	color: rgba(255,255,255,.8);
	font-family: "Virge";
	background-color: rgba(0,0,0,0.5);
	width: 32px;
	border-radius: 333px;
	text-align: center;
	padding-top: 1px;
	letter-spacing: 0;
}

#panel_rm, #panel_opp { border-radius: 0 8px 8px 0; }

#formation_section .player_dot .rating.high {
	background-color: rgba(10,132,255,.5);
	color: #fff;
}

#formation_section .player_dot .rating.mom {
	background-color: goldenrod;
	box-shadow: 0 0 10px gold;
	color: #fff;
}

/* Rated by */
#formation_section .rated_by {
	padding: 0 20px 15px 20px;
	color: rgba(255,255,255,.5);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0;
	text-align: center;
	font-family: "Virge", "Paperlogy";
}

#formation_section .rated_by:empty {
	display: none;
}

#formation_section .rated_by .rated_by_label {
	font-weight: 300;
}

/* Subs */
#formation_section .subs_section {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--color-border);
}

#formation_section .subs_section h4 {
	font-size: 13px;
	font-weight: 600;
	color: var(--color-text-muted);
	margin: 0 0 12px 0;
}

#formation_section .formation_line .player_dot .name_row .captain {
	color: #fff;
	font-weight: 900;
	font-size: 10px;
	margin-top: -2px;
}



/* Kit number and uniform SVG */
#formation_section .player_dot .kit_number {
	position: relative;
	display: inline-block;
	width: 32px;
	height: 32px;
	margin-bottom: 4px;
}

#formation_section .player_dot .kit_icon {
	width: 32px;
	height: 32px;
	display: block;
}

#formation_section .player_dot .kit_number .number {
	position: absolute;
	top: 42%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-family: 'Virge', sans-serif;
	font-size: 9px;
	font-weight: 400;
	line-height: 1;
	pointer-events: none;
	letter-spacing: 0;
}

/* Formation info (manager and formation) */
#formation_section .formation_info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 16px 10px 16px;
	font-size: 10px;
	background-color: #0E1B36;
	letter-spacing: 0;
}

#formation_section .formation_info .manager {
	color: rgba(255,255,255,.3);
	font-family: "Virge";
	text-transform: uppercase;
	font-weight: 400;
	letter-spacing: 0;
}

#formation_section .formation_info .formation {
	color: rgba(255,255,255,.3);
	font-family: "Virge";
	letter-spacing: 0;
}


/* Subs horizontal scroll (max 5 items visible) */
#formation_section .formation_line.subs {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-top: 1px solid rgba(255,255,255,.05);
	padding: 20px 0;
}

#formation_section .formation_line.subs::-webkit-scrollbar {
	height: 4px;
}

#formation_section .formation_line.subs::-webkit-scrollbar-track {
	background: var(--color-bg-secondary);
	border-radius: 2px;
}

#formation_section .formation_line.subs::-webkit-scrollbar-thumb {
	background: var(--color-border);
	border-radius: 2px;
}

#formation_section .formation_line.subs .player_dot {
	min-width: 0;
	max-width: none;
}

.last_updated {
	text-align: center;
	font-size: 11px;
	color: var(--color-text-muted);
	padding: 16px 0 8px;
}
