*, *::before, *::after {
	box-sizing: border-box;
	font-family: "Lucida Console", Monaco, monospace;
}

body {
	background-color: #111;
	color: #ddd;
	min-height: 100vh;
	padding: 0;
	margin: 0;
}

/* ── Navbar ── */

#navbar {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding: 0.75rem 2rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	background-color: #0d0d0d;
}

#nav-title {
	color: #ff0 !important;
	font-size: 0.9rem;
	letter-spacing: 0.1em;
	margin-right: auto;
	border-bottom: 1px solid transparent !important;
}

#nav-title:hover {
	color: #fff !important;
	border-bottom-color: #ff0 !important;
}

#navbar a {
	color: #888;
	font-size: 0.8rem;
	text-decoration: none;
	letter-spacing: 0.08em;
	border-bottom: 1px solid transparent;
	transition: color 0.2s, border-color 0.2s;
}

#navbar a:hover {
	color: #ff0;
	border-bottom-color: #ff0;
}

.w3-container {
	padding: 2rem !important;
}

h1 {
	color: #ff0;
	font-size: 1.2rem;
	letter-spacing: 0.1em;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	padding-bottom: 0.5rem;
	margin-bottom: 1.5rem;
}

h2 {
	color: #aaa;
	font-size: 0.85rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	margin: 1.5rem 0 0.75rem;
}

/* ── Container ── */

.w3-container {
	max-width: 860px;
	margin: 0 auto;
	padding: 0;
}

/* ── Lists ── */

ul {
	color: #999;
	font-size: 0.85rem;
	line-height: 1.8;
	padding-left: 1.2rem;
	margin-bottom: 1.5rem;
}

ul a {
	color: #ff0;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s;
}

ul a:hover {
	border-bottom-color: #ff0;
}

/* ── Textarea ── */

textarea {
	width: 100%;
	background-color: #1a1a1a;
	color: #ddd;
	border: 1px solid rgba(255, 255, 255, 0.15) !important;
	padding: 0.75rem !important;
	font-size: 0.88rem;
	line-height: 1.6;
	resize: vertical;
	outline: none;
	transition: border-color 0.2s;
}

textarea:focus {
	border-color: rgba(255, 255, 0, 0.5) !important;
}

#charCount {
	color: #555;
	font-size: 0.78rem;
	text-align: right;
	margin: 0.3rem 0 0.75rem;
}

/* ── Checkbox ── */

.w3-check {
	accent-color: #ff0;
	margin-right: 0.4rem;
}

#agreementlabel {
	color: #888;
	font-size: 0.8rem;
}

#agreementlabel.w3-red {
	color: #f66;
	background: none !important;
	padding: 0 !important;
}

/* ── Buttons ── */

.w3-button {
	font-family: "Lucida Console", Monaco, monospace !important;
	font-size: 0.85rem !important;
	letter-spacing: 0.05em;
	padding: 0.5rem 1.2rem !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s !important;
	text-decoration: none;
	display: inline-block;
	margin-top: 0.75rem;
}

.w3-button.w3-blue {
	background-color: transparent !important;
	color: #ff0 !important;
	border-color: #ff0 !important;
}

.w3-button.w3-blue:hover {
	background-color: #ff0 !important;
	color: #111 !important;
}

.w3-button.w3-gray {
	background-color: transparent !important;
	color: #666 !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
}

.w3-button.w3-gray:hover {
	background-color: rgba(255, 255, 255, 0.07) !important;
	color: #ddd !important;
}

/* ── Result panel ── */

.w3-panel {
	background: none !important;
	padding: 0 !important;
}

#userinput {
	background-color: #1a1a1a !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	color: #bbb;
	font-size: 0.88rem;
	padding: 0.75rem 1rem !important;
	margin: 1rem 0 !important;
	line-height: 1.6;
}

#totalscore {
	color: #ddd;
	font-size: 0.95rem;
	padding: 0 !important;
	margin-bottom: 1rem !important;
}

#totalscore .w3-padding.w3-blue {
	background-color: #ff0 !important;
	color: #111 !important;
	padding: 0.2rem 0.6rem !important;
	font-weight: bold;
}

/* ── SVG loading ── */

#loading circle:first-child {
	stroke: #333;
}

#loading circle:last-child {
	stroke: #ff0;
}

/* ── Score / Ranking table ── */

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
	margin-top: 1rem;
}

thead th {
	color: #ff0;
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-align: left;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	background-color: transparent !important;
}

tbody tr {
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	transition: background-color 0.2s;
}

tbody tr:hover {
	background-color: rgba(255, 255, 0, 0.04);
}

td {
	padding: 0.6rem 0.75rem;
	color: #bbb;
	border: none !important;
	vertical-align: top;
}

td.w3-blue {
	background-color: rgba(255, 255, 0, 0.1) !important;
	color: #ff0 !important;
}

.hidden-text {
	background-color: #222;
	color: #222;
	border-radius: 2px;
	cursor: pointer;
}

.hidden-text.visible {
	background-color: transparent;
	color: #bbb;
}

/* ── Responsive ── */

@media (max-width: 600px) {
	h1 { font-size: 1rem; }
	table { font-size: 0.78rem; }
	td, th { padding: 0.4rem 0.5rem; }
}
