/* =========================================
   GLOBAL RESET
========================================= */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family:
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		Roboto,
		sans-serif;

	background: #f4f6f8;
	color: #1d2935;

	min-height: 100vh;
	padding: 32px 20px;
}


/* =========================================
   PAGE WRAPPER
========================================= */
#event-page {
	max-width: 1400px;
	margin: 0 auto;
}


/* =========================================
   EVENT HEADER
========================================= */
#event-header {
	position: relative;

	background:
		linear-gradient(
			135deg,
			#1d3557 0%,
			#274c77 100%
		);

	border-radius: 28px;

	padding: 42px;

	margin-bottom: 28px;

	color: white;

	box-shadow:
		0 18px 40px rgba(17, 24, 39, 0.18);

	overflow: hidden;
}


/* subtle lighting effect */
#event-header::before {
	content: "";

	position: absolute;
	top: -120px;
	right: -120px;

	width: 280px;
	height: 280px;

	background:
		radial-gradient(
			circle,
			rgba(255,255,255,0.16),
			transparent 70%
		);

	pointer-events: none;
}


/* title */
#event-name {
	font-size: clamp(2.2rem, 4vw, 4rem);
	font-weight: 800;
	letter-spacing: -1px;
	line-height: 1.05;

	margin-bottom: 14px;
}


/* metadata */
#event-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;

	font-size: 0.95rem;
	color: rgba(255,255,255,0.88);
}


/* =========================================
   TAB NAVIGATION
========================================= */
#event-tabs {
	display: flex;
	gap: 14px;

	margin-bottom: 28px;

	flex-wrap: wrap;
}


/* buttons */
#event-tabs button {
	border: none;
	outline: none;

	padding: 14px 24px;

	border-radius: 999px;

	background: white;

	color: #3d4b59;

	font-size: 0.95rem;
	font-weight: 700;

	cursor: pointer;

	border: 1px solid #d7dde4;

	box-shadow:
		0 4px 12px rgba(0,0,0,0.04);

	transition:
		transform 0.18s ease,
		background 0.18s ease,
		color 0.18s ease,
		box-shadow 0.18s ease;
}


/* hover */
#event-tabs button:hover {
	transform: translateY(-2px);

	background: #edf2f7;

	box-shadow:
		0 8px 20px rgba(0,0,0,0.08);
}


/* active */
#event-tabs button.active {
	background: #1d3557;
	color: white;

	border-color: #1d3557;

	box-shadow:
		0 10px 22px rgba(29, 53, 87, 0.22);
}


/* =========================================
   CONTENT AREA
========================================= */
#event-content {
	display: flex;
	flex-direction: column;
	gap: 24px;
}


/* =========================================
   TAB PANELS
========================================= */
.tab {
	display: none;

	background: white;

	border-radius: 24px;

	padding: 28px;

	border: 1px solid #e3e8ee;

	box-shadow:
		0 10px 28px rgba(15, 23, 42, 0.06);

	animation: fadeIn 0.22s ease;
}

.tab.active {
	display: block;
}


/* =========================================
   LEADERBOARD TABLE
========================================= */

/* wrapper */
#tab-leaderboard {
	overflow-x: auto;
}


/* table */
#tab-leaderboard table {
	width: 100%;
	border-collapse: collapse;

	table-layout: fixed;

	background: white;

	border-radius: 18px;
	overflow: hidden;
}


/* header */
#tab-leaderboard thead {
	background:
		linear-gradient(
			180deg,
			#2d4059,
			#233142
		);

	color: white;
}


/* header cells */
#tab-leaderboard th {
	padding: 18px 16px;

	font-size: 0.82rem;
	font-weight: 800;

	text-transform: uppercase;
	letter-spacing: 0.9px;

	border-right: 1px solid rgba(255,255,255,0.08);

	white-space: nowrap;
}


/* remove last border */
#tab-leaderboard th:last-child {
	border-right: none;
}


/* body cells */
#tab-leaderboard td {
	padding: 18px 16px;

	border-bottom: 1px solid #edf1f5;

	font-size: 0.95rem;

	vertical-align: middle;
}


/* alternating rows */
#tab-leaderboard tbody tr:nth-child(even) {
	background: #f9fbfc;
}


/* hover */
#tab-leaderboard tbody tr:hover {
	background: #eef4fa;
}


/* position column */
#tab-leaderboard td:first-child {
	font-weight: 800;
	font-size: 1rem;

	color: #1d3557;

	width: 80px;
}


/* player name */
#tab-leaderboard td:nth-child(2) {
	font-weight: 700;
	color: #111827;
}


/* score emphasis */
#tab-leaderboard td.score-cell {
	font-weight: 800;
	font-size: 1rem;
	color: #0f766e;
}


/* under par */
.score-under {
	color: #15803d;
	font-weight: 800;
}


/* over par */
.score-over {
	color: #b91c1c;
	font-weight: 800;
}


/* even par */
.score-even {
	color: #334155;
	font-weight: 800;
}


/* =========================================
   LEADERBOARD GRID (OPTIMIZED COLUMN BALANCE)
========================================= */

/* shared column layout */
.leaderboard-header.row,
.leaderboard-row {
	display: grid;

	grid-template-columns:
		60px   /* Rank (small fixed) */
		1fr    /* Player (dominant flexible column) */
		90px   /* Gross (compact) */
		90px;  /* Net (compact) */

	align-items: center;
}


/* HEADER */
.leaderboard-header.row {
	padding: 14px 16px;

	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 1px;

	background: #2d4059;
	color: white;

	border-radius: 12px;

	margin-bottom: 10px;

	box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* ROWS */
.leaderboard-row {
	padding: 14px 16px;

	border-bottom: 1px solid #edf1f5;

	background: white;

	transition: background 0.15s ease;
}

/* zebra striping */
.leaderboard-row:nth-child(even) {
	background: #f8fafc;
}

/* hover */
.leaderboard-row:hover {
	background: #eef4fa;
}

/* typography alignment */
.leaderboard-row span,
.leaderboard-header.row span {
	display: flex;
	align-items: center;
}


/* =========================================
   PLAYERS GRID
========================================= */
#tab-players {
	display: grid;

	grid-template-columns:
		repeat(auto-fill, minmax(260px, 1fr));

	gap: 22px;
}


/* player cards */
.player-card {
	background: white;

	border-radius: 22px;

	padding: 22px;

	border: 1px solid #e5e9ef;

	box-shadow:
		0 8px 24px rgba(15, 23, 42, 0.05);

	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease;
}


/* hover */
.player-card:hover {
	transform: translateY(-4px);

	box-shadow:
		0 14px 32px rgba(15, 23, 42, 0.10);
}


/* =========================================
   STATS GRID
========================================= */
#tab-stats {
	display: grid;

	grid-template-columns:
		repeat(auto-fit, minmax(240px, 1fr));

	gap: 22px;
}


/* stat cards */
.stat-card {
	background: white;

	border-radius: 20px;

	padding: 24px;

	border: 1px solid #e5e9ef;

	box-shadow:
		0 8px 24px rgba(15, 23, 42, 0.05);
}


/* label */
.stat-label {
	font-size: 0.8rem;

	text-transform: uppercase;
	letter-spacing: 1px;

	color: #64748b;

	margin-bottom: 10px;
}


/* value */
.stat-value {
	font-size: 2.4rem;
	font-weight: 800;

	color: #1d3557;
}


/* =========================================
   SCROLLBARS
========================================= */
::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

::-webkit-scrollbar-track {
	background: #edf2f7;
}

::-webkit-scrollbar-thumb {
	background: #c3ccd6;
	border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
	background: #9aa8b6;
}


/* =========================================
   ANIMATION
========================================= */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}


/* =========================================
   MOBILE
========================================= */
@media (max-width: 768px) {

	body {
		padding: 18px 14px;
	}

	#event-header {
		padding: 28px;
		border-radius: 22px;
	}

	#event-tabs {
		gap: 10px;
	}

	#event-tabs button {
		width: 100%;
	}

	.tab {
		padding: 18px;
		border-radius: 20px;
	}

	#tab-leaderboard th,
	#tab-leaderboard td {
		padding: 14px 10px;
		font-size: 0.88rem;
	}
}
