/* styles.css */
/* Made by: [ROX]ChickeN */

body {
	margin: 0;
	padding: 0;
	font-family: Arial, sans-serif;
	color: #eee;

	background: url('../assets/bg.jpg') no-repeat center center fixed;
	background-size: cover;
	background-attachment: fixed;
}

#scoreboard-card,
#lb-card {
	display: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

#scoreboard-card.visible,
#lb-card.visible {
	display: block;
	opacity: 1;
}

.faq-item {
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid #222;
}

.faq-item h3 {
	color: #00aaff;
	margin-bottom: 6px;
	font-size: 1.05em;
}

.faq-item p {
	color: #ccc;
	line-height: 1.5;
}

.credits {
	margin-top: 30px;
	padding-top: 15px;
	border-top: 1px solid #333;
}

.credits h3 {
	margin-bottom: 10px;
	color: #00aaff;
	font-size: 1.1em;
}

.credits ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.credits li {
	margin-bottom: 6px;
	color: #ddd;
}

.credits code {
	color: #00ffaa;
	font-weight: bold;
}

.credits span {
	color: #aaa;
	margin-left: 6px;
}

.timeline {
	position: relative;
	list-style: none;
	margin: 30px 0;
	padding-left: 30px;
}

.timeline::before {
	content: "";
	position: absolute;
	left: 10px;
	top: 0;
	bottom: 0;
	width: 2px;
	background: #444;
}

.timeline-event {
	position: relative;
	margin-bottom: 25px;
	padding-left: 25px;
}

.timeline-dot {
	position: absolute;
	left: -2px;
	top: 6px;
	width: 10px;
	height: 10px;
	background: #00aaff;
	border-radius: 50%;
	box-shadow: 0 0 6px rgba(0, 170, 255, 0.6);
}

.timeline-event p {
	margin: 0;
	color: #ddd;
	line-height: 1.4;
}

.timestamp {
	color: #00ffaa;
	font-weight: bold;
}

.color-btn {
	width: 40px;
	height: 40px;
	margin: 3px;
	font-weight: bold;
	font-size: 1.2em;
	cursor: pointer;
	border: 1px solid #222;
	border-radius: 4px;
	color: white;
}

.color-btn[data-color="^1"] {
	background: red;
}

.color-btn[data-color="^2"] {
	background: green;
}

.color-btn[data-color="^3"] {
	background: yellow;
}

.color-btn[data-color="^4"] {
	background: blue;
}

.color-btn[data-color="^5"] {
	background: cyan;
}

.color-btn[data-color="^6"] {
	background: magenta;
}

.color-btn[data-color="^7"] {
	background: white;
	color: black;
}

.name-editor {
	border: 1px solid #333;
	min-height: 30px;
	padding: 6px;
	margin-top: 10px;
	font-family: monospace;
	font-size: 1.2em;
	background: #1a1a1a;
	color: #eee;
}

/* ===== MODAL ===== */
.modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999;
}

.modal.hidden {
	display: none;
}

.modal-content {
	background: #111;
	border: 1px solid #333;
	padding: 24px;
	border-radius: 8px;
	width: 90%;
	max-width: 420px;
	text-align: center;
}

.modal-content h2 {
	margin-bottom: 10px;
}

.key-output {
	font-family: monospace;
	font-size: 1.1em;
	padding: 10px;
	background: #000;
	border: 1px solid #444;
	margin: 15px 0;
	user-select: all;
}

.modal-buttons {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

.modal-buttons button:hover {
	background: #4caf50;
	color: #000;
}

.modal-buttons button.secondary:hover {
	background: #d1d1d1;
	color: #000;
}

.modal-buttons button {
	background: #1e1e1e;
	color: #4caf50;
	border: 1px solid #333;
	padding: 10px 18px;
	cursor: pointer;
	border-radius: 4px;
	font-weight: bold;
}

.modal-buttons button.secondary {
	background: #ffffff;
	color: #000;
}

.instruction {
	color: #777;
	font-size: 13px;
}
/* ===== MODAL END ===== */

footer {
	position: fixed;
	left: 0;
	bottom: 0;
	width: 100%;
	background-color: red;
	color: white;
	text-align: center;
}

a {
	color: #4caf50;
	text-decoration: none;
}

a:hover {
	text-shadow: 0 0 6px #4caf50;
}

.tool-btn {
	background: #1e1e1e;
	color: #4caf50;
	border: 1px solid #333;
	padding: 10px 18px;
	cursor: pointer;
	border-radius: 4px;
	font-weight: bold;
}

.tool-btn:hover {
	background: #4caf50;
	color: #000;
}

main,
.card {
	background: rgba(26, 26, 26, 0.85);
	padding: 20px;
	border-radius: 5px;
	border: 1px solid #222;
}

header {
	background: linear-gradient(90deg, #0f0f0f, #141414);
	padding: 20px;
	text-align: center;
	border-bottom: 2px solid #222;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

header h1 {
	margin: 0;
	font-size: 2.6em;
	color: #4caf50;
	text-shadow: 0 0 10px #4caf50, 0 0 20px #4caf50;
	transition: text-shadow 0.3s ease;
}

header h1:hover {
	text-shadow: 0 0 20px #4caf50, 0 0 40px #4caf50, 0 0 60px #4caf50;
}

nav {
	display: flex;
	gap: 10px;
	padding: 10px;
	background: #0b0b0b;
	border-bottom: 1px solid #222;
	overflow-x: auto;
	white-space: nowrap;
	scrollbar-width: none;
	/* Firefox */
}

nav::-webkit-scrollbar {
	display: none;
	/* Chrome / Safari */
}

nav a {
	flex: 0 0 auto;
	padding: 8px 14px;
}

nav {
	display: flex;
	justify-content: center;
	background: #181818;
	padding: 12px 0;
	box-shadow: inset 0 -1px 4px rgba(255, 255, 255, 0.05);
}

nav a {
	color: #ccc;
	margin: 0 20px;
	text-decoration: none;
	font-size: 1.1em;
	position: relative;
	transition: color 0.2s;
}

nav a::after {
	content: '';
	position: absolute;
	width: 0;
	height: 2px;
	background: #4caf50;
	bottom: -3px;
	left: 0;
	transition: width 0.3s;
}

nav a:hover {
	color: #4caf50;
}

nav a:hover::after {
	width: 100%;
}


main {
	padding: 30px;
	max-width: 980px;
	margin: auto;
}

.section-title {
	font-size: 1.8em;
	border-bottom: 2px solid #333;
	padding-bottom: 8px;
	margin-bottom: 20px;
	color: #4caf50;
}

.card {
	background: rgba(26, 26, 26, 0.95);
	padding: 20px;
	border: 1px solid #222;
	margin-bottom: 20px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
	transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

footer {
	text-align: center;
	padding: 15px;
	font-size: 1.2em;
	background: #141414;
	color: #777;
	border-top: 1px solid #222;
}

#scoreboard,
#lb-list {
	font-family: monospace;
}

#scoreboard .header,
#scoreboard .row {
	display: grid;
	grid-template-columns: 26px 1fr 60px 60px 26px;
	align-items: center;
	gap: 8px;
	padding: 6px 4px;
}

#scoreboard .header {
	color: #aaa;
	border-bottom: 1px solid #333;
}

#scoreboard .header,
#scoreboard .row {
	gap: 6px;
}

#scoreboard .row {
	border-bottom: 1px solid #222;
}

#scoreboard .row.red {
	background: rgba(255, 0, 0, 0.12);
}

#scoreboard .row.blue {
	background: rgba(0, 38, 255, 0.12);
}

.header span {
	font-weight: bold;
	color: #bbb;
}

.row:hover {
	background: rgba(255, 255, 255, 0.08);
	transition: background 0.2s;
}

.flag {
	width: 24px;
	height: 16px;
	object-fit: cover;
	display: inline-block;
}

.flag.empty {
	width: 24px;
	height: 16px;
}

.carry {
	width: 18px;
	height: 18px;
}

.player-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 4px 0;
}

.header,
.row {
	display: grid;
	grid-template-columns: 32px 1fr 50px 50px 32px;
	align-items: center;
	gap: 4px;
	padding: 4px 0;
}

.header span {
	display: flex;
	align-items: center;
}

.header span:nth-child(2) {
	justify-content: flex-start;
}

#spectators {
	margin-top: 20px;
	font-size: 14px;
	opacity: 0.85;
}

#spectators .spectator {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-right: 10px;
	padding: 2px 4px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.05);
	transition: background 0.2s;
}

#spectators .spectator:hover {
	background: rgba(255, 255, 255, 0.1);
}

#spectators .spectator .flag {
	transform: translateY(8%);
}

.spectators-title {
	font-weight: bold;
	margin-bottom: 5px;
}

.cur-tab {
	color: #4caf50;
	font-size: 1.2em;
}

@media (max-width: 600px) {

	#scoreboard .header,
	#scoreboard .row {
		grid-template-columns: 24px 1fr 50px 50px 30px;
		font-size: 0.85em;
	}

	#lb-list .header {
		grid-template-columns: 25px 20px 1fr 10px 10px 7px 7px !important;
		font-size: 0.85em;
	}

	#lb-list .row {
		grid-template-columns: 25px 20px 1fr 10px 10px 7px 7px !important;
		font-size: 0.85em;
	}
}

@media (max-width: 768px) {
	body {
		background-position: top center;
	}

	header h1 {
		font-size: 1.6em;
	}

	footer {
		font-size: 0.9em;
	}

	nav {
		gap: 10px;
	}

	nav a {
		margin: 0 10px;
	}

	main {
		padding: 15px;
	}

	.card {
		padding: 15px;
	}

	iframe {
		height: 300px;
	}
}

#lb-list .header {
	display: grid !important;
	grid-template-columns: 45px 24px 1fr 100px 100px 70px 70px !important;
	align-items: center;
	gap: 8px;
	padding: 6px 4px;
}

#lb-list .row {
	display: grid !important;
	grid-template-columns: 45px 24px 1fr 100px 100px 70px 70px !important;
	align-items: center;
	gap: 8px;
	padding: 6px 4px;
}

#lb-list .name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#lb-list .score,
#lb-list .kd,
#lb-list .time {
	text-align: left;
}

#lb-list .header {
	color: #aaa;
	border-bottom: 1px solid #333;
	font-weight: bold;
}

#lb-list .row {
	border-bottom: 1px solid #222;
	transition: background 0.2s;
}

#lb-list .row:hover {
	background: rgba(255, 255, 255, 0.08);
}

#lb-list .place {
	font-weight: bold;
	color: #ffcc00;
}

#lb-list .name {
	font-weight: bold;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
