/*
* {
		outline: 1px solid red; 
}
*/

html, body {
	margin: 0; padding: 0;
	height: 100vh; overflow: hidden;
	font-family: system-ui, sans-serif;
}
html {
	font-size: 16px;
	background-color: #181a1b !important;
}
body {
	color: #e8e6e3;
	/* Blue Gradient */
	background: linear-gradient(160deg, #0d3b66 0%, #021526 100%);
}
header, footer {
	flex-shrink: 0;
}
footer {
	font-size: small;
}
main {
	display: flex;
	flex: 1 1 auto;
	overflow: hidden;
	justify-content: center;
}
body::before {
	content: "";
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4); /* adjust to taste */
	pointer-events: none;
}
#app {
	display: flex;
	flex-direction: column;
	height: 100vh;
}
#table-container {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}
#table {
	width: 100%;
	height: 100%;
	overflow: hidden;
}
#items {
	gap: 1rem;
}
#updated {
	padding: 0.25rem 0;
}
#content, main, header, #header, footer, .profile-container {
	position: relative;
	z-index: 1; /* ensure your content is above overlay */
	color: #fff;
}
.oauth-btn {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		padding: 10px 16px;
		border: none;
		border-radius: 6px;
		font-size: 1rem;
		font-weight: 600;
		cursor: pointer;
		transition: background 0.2s ease;
	}

	.discord-btn {
		background-color: #5865F2; /* Discord blurple */
		color: #fff;
	}

	.discord-btn:hover {
		background-color: #4752C4;
	}

	.oauth-icon {
		width: 20px;
		height: 20px;
	}
	.discord-login {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		height: 32px;
		background-color: #5865F2;
		color: #fff;
		font-weight: 600;
		border: none;
		border-radius: 6px;
		padding: 8px 10px;
		font-size: 14px;
		cursor: pointer;
		transition: background 0.2s ease;
	}
	.discord-login:hover {
		background-color: #4752C4;
	}
	.discord-login img {
		height: 16px;
		width: auto;
	}
	.gsi-material-button {
		-moz-user-select: none;
		-webkit-user-select: none;
		-ms-user-select: none;
		-webkit-appearance: none;
		background-color: WHITE;
		background-image: none;
		border: 1px solid #747775;
		-webkit-border-radius: 4px;
		border-radius: 4px;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		color: #1f1f1f;
		cursor: pointer;
		font-family: 'Roboto', arial, sans-serif;
		font-size: 14px;
		height: 32px;
		letter-spacing: 0.25px;
		outline: none;
		overflow: hidden;
		padding: 0;
		position: relative;
		text-align: center;
		-webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
		transition: background-color .218s, border-color .218s, box-shadow .218s;
		vertical-align: middle;
		white-space: nowrap;
		width: 32px;
		max-width: 400px;
		min-width: min-content;
	}

	.gsi-material-button .gsi-material-button-icon {
		height: 20px;
		margin-right: 12px;
		min-width: 20px;
		width: 20px;
		margin: 0;
		padding: 9px;
	}

	.gsi-material-button .gsi-material-button-content-wrapper {
		-webkit-align-items: center;
		align-items: center;
		display: flex;
		-webkit-flex-direction: row;
		flex-direction: row;
		-webkit-flex-wrap: nowrap;
		flex-wrap: nowrap;
		height: 100%;
		justify-content: space-between;
		position: relative;
		width: 100%;
	}

	.gsi-material-button .gsi-material-button-contents {
		-webkit-flex-grow: 1;
		flex-grow: 1;
		font-family: 'Roboto', arial, sans-serif;
		font-weight: 500;
		overflow: hidden;
		text-overflow: ellipsis;
		vertical-align: top;
	}

	.gsi-material-button .gsi-material-button-state {
		-webkit-transition: opacity .218s;
		transition: opacity .218s;
		bottom: 0;
		left: 0;
		opacity: 0;
		position: absolute;
		right: 0;
		top: 0;
	}

	.gsi-material-button:disabled {
		cursor: default;
		background-color: #ffffff61;
		border-color: #1f1f1f1f;
	}

	.gsi-material-button:disabled .gsi-material-button-contents {
		opacity: 38%;
	}

	.gsi-material-button:disabled .gsi-material-button-icon {
		opacity: 38%;
	}

	.gsi-material-button:not(:disabled):active .gsi-material-button-state, 
	.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
		background-color: #303030;
		opacity: 12%;
	}

	.gsi-material-button:not(:disabled):hover {
		-webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
		box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
	}

	.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
		background-color: #303030;
		opacity: 8%;
	}

#header-container {
	position: absolute;
	width: 100%;
}
.disclaimer {
	position: absolute;
	width: 100%;
	text-align: center;
}
.positive {
	color: rgb(56, 142, 60);
	color: #33cc66;
	font-weight: bold;
}
.negative {
	color: rgb(211, 47, 47);
	font-weight: bold;
}
a {
	color: #3391ff;
}
table {
	border-color: #545b5e;
}
input, textarea, select {
	box-sizing: border-box;
	background-color: rgb(43,42,51);
	caret-color: transparent;
	border-width: 1px;
	color: #e8e6e3;
}
.blurred {
	filter: blur(4px);
	opacity: 0.6;
}
.locked::after {
	content: "🔒";
	position: absolute;
	right: 4px;
	top: 2px;
	font-size: 0.8em;
	opacity: 0.8;
}
#tooltip {
	position: absolute;
	background-color: black;
	padding: 5px 10px;
	border-radius: 5px;
	display: none;
	font-size: 14px;
	pointer-events: none;
}
.opp-cell:hover {

}
#watermark {
	display: none;
	position: absolute;
	width: 70%;
	top: 40%;
	left: 50%;
	transform: translate(-50%, -50%);
	opacity: 0.12;
	z-index: 1;
	pointer-events: none;
}
#watermark img {
	width: 100%;
}
.tabulator {
	background-color: #5b6367;
	border-top-color: #4d5356;
	border-left-color: #4d5356;
	border-right-color: #4d5356;
	border-bottom-color: #4d5356;
	font-size: 0.80rem;
}
.tabulator-table {
	color: #c8c3bc !important;
}
.tabulator-row {
	background-color: #181a1b !important;
}
.tabulator-row.tabulator-row-even {
	background-color: #212425 !important;
}
.tabulator-row.tabulator-selected {
	background-color: #153867 !important;
}
.tabulator-row .tabulator-cell {
	border-right-color: #484e51;
}
.tabulator .tabulator-header {
	background-color: #26292b;
	border-bottom-color: #4d5356;
	color: #b2aca2;
	outline-color: currentcolor;
}
.tabulator .tabulator-header .tabulator-header-tooltip {
	background-color: #26292b;
	color: #b2aca2;
}
.tabulator .tabulator-header .tabulator-col {
	background-color: #26292b;
	border-right-color: #484e51;
}
.tabulator-header .tabulator-col {
		vertical-align: middle;
		text-align: center;
}
.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {
	border-bottom-color: #43494c;
	border-top-color: currentcolor;
}
.tabulator .tabulator-header .tabulator-col .tabulator-arrow {
	display: none !important;
}
.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {
	overflow: visible;
}
.tabulator-cell[tabulator-field=weather] {
	gap: 3px;
}
/*
#header {
	height: 50px;
	position: relative;
}
#header, #mobile-header {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}
*/
#header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 2rem;
	flex-wrap: wrap;
	background: rgba(0,0,0,0.4); /* semi-transparent overlay */
	backdrop-filter: blur(6px);
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

#center-dropdown {
	position: absolute;
	left: 50%; transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
#center-dropdown button {
	background: #007bff;
}
footer {
	text-align: center;
}
#mobile-header {
	display: none;
	flex-direction: column;
	height: auto;
	margin-top: 0.75rem;
	margin-bottom: 0.5rem;
}
#sub-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin: 0.5rem auto;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}
button {
	background: #007bff;
	color: white;
	padding: 8px 10px;
	border-radius: 6px;
	border: none;
	font-weight: 500;
	cursor: pointer;
}
#pricing {
	background-color: #FFD700;
	color: #000;
  font-weight: bold;
}
#pricing:hover {
    background-color: #FFC107;
}
#sub-header button:hover, #auth-buttons button:hover {
	background: #444;
}
#content {
	display: flex;
	height: calc(100% - 50px);
}
#auth {
	position: relative;
	height: 40px;
	display: flex;
	justify-content: center;
	align-items: center;
}
#username {
	font-size: 16px;
}
#email {
	border: 1px solid rgba(164, 164, 170, 0.3);
	padding: 5px;
}
#title {
}
#donate {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 5px;
	position: absolute;
	right: 1rem;
}
#auth-buttons {
	display: none;
	align-items: center;
	gap: 10px; /* space between buttons */
	justify-content: flex-end; /* push to right side of header */
}
#auth #login {
	margin-left: 0.5rem;
}
#upgrade {
	display: none;
}
#button-container {
	display: flex;
	justify-content: space-evenly;
}
h1 {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 700;
}

#mobile-header #donate {
	display: none;
	position: initial;
		gap: 5px;
}
#donate img {
	width: 24px; height: 24px;
	vertical-align: middle;
}
#donate img:hover {
	cursor: pointer;
}
#donate div {
	text-align: center;
}
#donate a {
	color: transparent;
}
.spinner {
	border: 3px solid rgba(255,255,255,0.3);
	border-top: 3px solid #fff;
	border-radius: 50%;
	width: 16px;
	height: 16px;
	display: inline-block;
	margin-left: 8px;
	animation: spin 0.8s linear infinite;
	vertical-align: middle;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}
.body {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 50%;
}
.bet-row {
	display: flex;
	align-items: center;
	gap: 5px;
}
#left-body {
	width: 100%;
}
#right-body {
	display: none;
	position: relative;
	padding: 0 1rem;
}
#updated {
	font-style: italic;
	font-size: 1rem;
}
#updated-container {
	display: flex;
	justify-content: center;
	align-items: end;
	width: 100%;
	padding-bottom: 0.75rem;
}
#hrtable {
	min-height: 200px;
}
#player-table {
	width: 90%;
	margin-top: auto;
	margin-bottom: auto;
}
#player-tables {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	gap: 0.35rem;
}
.dbl-badge {
	position: absolute;
	top: 0;
	right: 0;
	color: #fff;
	font-size: 0.7rem;
	font-weight: bold;
	padding: 2px 4px;
	border-radius: 50%;
	line-height: 4;
	transform: translate(25%, -25%); /* shift outside corner a bit */
	box-shadow: 0 0 2px rgba(0,0,0,0.4);
}
#player-ev, #player-weather, #player-pitcher {
	padding-left: 5px;
}
#player-ev span {
}
.player-cell {
	position: relative;
	display: flex;
	width: 100%; height: 100%;
	gap: 3px;
}
.opp-cell .bats, .player-cell .bats {
	position: absolute;
	right: 0;
	bottom: -0.2rem;
	font-size: 0.5rem;
}
.opp-cell {
	position: relative;
	width: 100%; height: 100%;
	display: flex;
	gap: 2px;
}
.game-cell {
	position: relative;
	display: inline-block;
	width: 100%; height: 100%;
}
.evbook-cell, .ev-cell, .kelly-cell {
	display: flex;
	justify-content: center;
	width: 100%;
}
.evbook-cell:hover {
	.evbook-implied {
		display: initial;
	}
	.evbook-odds {
		display: none;
	}
}
.ev-cell:hover {
	.ou {
		display: initial;
	}
	.ev {
		display: none;
	}
}
.bvp-cell:hover {
	.bvp-pitcher {
		display: initial;
	}
	.bvp-value {
		display: none;
	}
}
/*
.kelly-cell:hover {
	.kelly { display: none; }
	.kelly-wager { display: initial; }
}
*/
.field-cell {
	position: relative;
}
.evbook-implied, .ev-cell .ou, .kelly-wager, .bvp-pitcher {
	display: none;
}
.sport-img {
	height: 36px; width: 36px;
}
.game-img {
	height: 18px; width: 18px;
}
.book-img {
	height: 24px; width: 24px;
}
.field {
	width: 20px; width: 20px;
}
.wind, .weather {
	height: 28px; width: 28px;
}
.team-img {
	height: 24px; width: 24px;
}
.tabulator .team-img, .tabulator .wind, .tabulator .weather {
	height: 18px; width: 18px;
}
.tabulator .book-img {
	height: 16px; width: 16px;
	margin-left: 0.5rem;
}
.tabulator-cell {
	height: 24px;
}
h2 {
	display: flex;
	gap: 10px;
	margin-bottom: 1rem;
	align-items: center;
	margin: 0;
}
nav {
	text-align: center;
}
.game-container {
	position: relative;
	min-width: auto;
	height: 100%;
}
.game-img.away {
	z-index: 2;
	left: 0;
	opacity: 0.9;
}
.game-img.home {
	z-index: 1;
	margin-left: -7px;
}

#player-weather {
	display: flex;
	align-items: center;
	gap: 5px;
}

#player-pitcher {
	display: flex;
	align-items: center;
	gap: 5px;
}
#player-pitcher h4 {
	margin: 0;
}
.player-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
#player-odds {
	display: flex;
	gap: 10px;
	max-width: 400px;
	overflow-x: hidden;
}
#player-odds div {
	display: flex;
	align-items: center;
	gap: 5px;
}
#player-header {
	display: flex;
	justify-content: space-between;
	width: 100%;
	gap: 10px;
	margin-top: 1rem;
}
#player-controls {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: left;
}
.player-dropdowns {
	display: flex;
	overflow: hidden;
	align-items: center;
	/*
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	*/
}
#table-dropdown {
	width: calc(100% + 24px);
}
#table-select, #prop-select {
	width: 100%;
}
#log-chart {
}

.nav {
	justify-content: center;
	display: flex;
	gap: 2px;
	overflow-x: auto;
	white-space: nowrap;
	padding: 10px;
	border-radius: 5px;
	scrollbar-width: none;
}

.nav::-webkit-scrollbar {
	display: none; /* Hides scrollbar for WebKit browsers */
}

.nav-item, .nav button {
	padding: 8px 16px;
	background-color: #e8e6e3;
	color: black;
	border-radius: 20px;
	text-align: center;
	cursor: pointer;
	flex-shrink: 0;
	border-width: 1px;
	overflow-x: auto;
	scroll-behavior: smooth;
}

#date-dropdown input {
	max-width: 140px;
}

.homer {
	color: white;
	background: rgb(56, 142, 60);
}
.homer .positive {
	color: white;
}

.dropdown {
	position: relative;
	display: inline-block;
}
.dropdown select, #date-dropdown input {
	background-color: #1b1d1e;        /* transparent to blend with header */
	color: #f0f0f0;                 /* light text */
	border: 1px solid rgba(255,255,255,0.1);
	box-shadow: 0 4px 15px rgba(0,0,0,0.4);
	border-radius: 4px;
	padding: 8px 10px;
	font-weight: 500;
	font-size: 0.9rem;
	appearance: none;               /* remove default arrow styling */
	-webkit-appearance: none;
	-moz-appearance: none;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}
.dropdown svg {
	position: absolute;
	top: 50%;
	transform: translate(0, -50%) rotate(90deg);
	right: 6px;
	overflow: hidden;
	pointer-events: none;
}

/* SELECTS */
#page-select-wrapper {
}
.select-wrapper {
	position: relative;
	display: inline-block;
	width: auto;
	max-width: 100%;
}

.select-wrapper select {
	appearance: none;
	width: 100%; height: 100%;
	padding: 0.5rem 2rem 0.5rem 0.75rem;
	background: #1c1c1c;
	color: white;
	border: 1px solid #444;
	border-radius: 6px;

	min-width: 10ch;
}

.select-arrow {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1rem;
	height: 1rem;
	pointer-events: none;
	color: #aaa;
}

#sport-select {
	min-width: 120px;
}

.nav-item:hover, .nav button:hover, #player-ou button:hover {
	background-color: #3a3f44;
	color: #e8e6e3;
	border-color: #596068;
	transition: all 0.3s ease;
}

#player-odds .active {
	color: #ffcb05;
}

.nav-item.active, .nav button.active {
	background-color: #2b2d2e;
	color: #ffcb05;
	border-color: #ff9f00 !important;
	box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
	transition: all 0.1s ease;
}

#account {
	background-color: #2563eb;
	color: #ffffff;
}
button#account:hover {
	background-color: #1e40af;
}
#upgrade {
	font-weight: 600;
	background-color: #facc15;
	color: #1a1a1a;
}
button#upgrade:hover {
	background-color: #eab308;
}
#logout {
	background-color: #dc2626;
	color: #ffffff;
}
button#logout:hover {
	background-color: #b91c1c;
}
.profile-container {
	max-width: 700px;
	margin: auto;
	background: #1b1d1e;
	border-radius: 12px;
	padding: 2rem;
	color: #f0f0f0;
	box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.profile-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.5rem;
}
.profile-badge {
	font-size: 3rem;
}

.profile-info {
	display: flex;
	flex-direction: column;
}
.profile-info h2.username {
	margin: 0;
	font-size: 1.6rem;
	font-weight: 700;
}
.profile-info .email {
	font-size: 0.9rem;
	color: #aaa;
}

.profile-info .tier {
	margin-top: 0.3rem;
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 4px;
	font-size: 0.8rem;
	font-weight: 600;
}
.profile-info .tier.vip {
	background: gold;
	color: #000;
}
.profile-info .tier.premium {
	background: #0f0;
	color: #000;
}

.upgrade-btn {
	background: #444;
	color: #fff;
	border: none;
	margin-top: 0.8rem;
	padding: 0.4rem 0.8rem;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 600;
}
.upgrade-link {
	color: #1da1f2;
	font-weight: 700;
	text-decoration: none;
}
.upgrade-link:hover {
	text-decoration: underline;
}
.upgrade-btn:hover {
	background: #666;
}

.profile-subscription h3,
.profile-links {
	text-align: center;
}
.profile-links h3 {
	margin-top: 0;
	margin-bottom: 0.75rem;
	font-size: 1.2rem;
}

.sub-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.8rem 1.2rem;
	margin-bottom: 1.5rem;
}

.label {
	font-weight: 600;
	color: #aaa;
}
.value {
	display: block;
	font-size: 1rem;
	margin-top: 0.2rem;
}

.profile-links {
	border-top: 1px solid rgba(255,255,255,0.1);
	padding-top: 1rem;
}

.link-btn {
	display: block;
	background: #333;
	color: #fff;
	border: none;
	padding: 0.6rem 1rem;
	margin-bottom: 0.5rem;
	border-radius: 4px;
	cursor: pointer;
	text-align: left;
	font-weight: 600;
}
.link-btn:hover {
	background: #555;
}
.logout {
	background: #a33;
}
.logout:hover {
	background: #c55;
}

@media (max-width: 600px) {
	footer {
		padding: 0 1rem;
	}
	footer p {
		margin: 0.5rem 0;
	}
	html {
		font-size: 15px;
	}
	body {
		flex-direction: column;
	}
	.tabulator {
		width: 100% !important;
	}
	h1, h2 {
		font-size: 1.25rem;
	}
	.profile-container {
		padding: 1rem;
	}
	.body, #left-body {
		width: 100%;
	}
	#mobile-header {
		display: flex;
	}
	#header {
		flex-direction: column;
		align-items: flex-start;
		padding: 0.5rem;
		gap: 0.5rem;
	}
	#auth-buttons {
		width: 100%;
		align-items: center;
		gap: 0.5rem;
	}
	.dropdown select {
		width: 100%;
	}

	#title h1 {
		font-size: 1.25rem;
	}
	.dropdown {
		flex: 0 0 auto;
	}
	#center-dropdown {
		transform: none;
		position: static;
		display: flex;
		align-items: center;
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 0.5rem;
		padding: 0.5rem 0;
		-webkit-overflow-scrolling: touch;
	}
	#center-dropdown button {
		flex: 0 0 auto;
	}
	#content {
		flex-direction: column;
		height: initial;
	}
	#button-container {
		width: initial;
	}
	h2 {
		font-size: 1.25rem;
		justify-content: center;
		margin-bottom: 0;
	}
	#updated {
		font-size: 0.85rem;
	}
	#donate img {
		width: 18px; height: 18px;
	}
	.book-img {
		height: 18px; width: 18px;
	}
	#player-ev {
		text-align: center;
		margin: 0;
		font-size: 1rem;
	}
	#player-controls {
		align-items: center;
		flex-direction: column;
		margin-top: 0.5rem;
	}
	#player-odds {
		justify-content: center;
	}
	#mobile-header #donate {
		display: flex;
	}
	#player-header {
		margin-top: 0.75rem;
		align-items: center;
		justify-content: space-evenly;
		gap:0;
		flex-wrap: wrap;
	}
	.player-row {
		flex-direction: column;
		gap: 5px;
	}
	#player-tables, #player-header, #player-table, #player-header, #table,#table-container,#log-chart {
		width: 100% !important;
	}
	#player-odds {
		width: 90%;
		overflow-x: scroll;
	}
	#body {
		flex-direction: column;
	}
	#right-body, #left-body {
		padding: 0;
	}
	.game-container {
		margin-right: 0.1rem;
	}
	.game-img {
		height: 16px; width: 16px;
		top: 0 !important;
	}
	.tabulator .tabulator-row, #player-odds {
		font-size: 12px;
	}
	.tabulator .tabulator-header input {
		font-size: 16px;
	}
	.tabulator .tabulator-cell:nth-child(1) {
		width: 40px;
	}
}

@media (max-width: 768px) {
}

@media (hover: hover) and (pointer: fine) {
	.tabulator .tabulator-header .tabulator-col.tabulator-sortable.tabulator-col-sorter-element:hover, .tabulator-row:hover {
		background-color: #34393b !important;
	}
}