/* TaxStache Trivia — Front-end Styles */
/* Brand: purple #685BC7, orange #FE572A, lime #DAFF02, near-black #201E1F, off-white #F3F0EB */

.tstriv-wrap {
	max-width: 680px;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #201E1F;
}

/* ---- Auth Form ---- */
.tstriv-auth {
	text-align: center;
	background: #F3F0EB;
	border-radius: 12px;
	padding: 40px 30px;
}
.tstriv-auth h2 {
	font-size: 28px;
	margin-bottom: 8px;
}
.tstriv-auth p {
	color: #555;
	margin-bottom: 24px;
}
.tstriv-auth-form {
	max-width: 360px;
	margin: 0 auto;
	text-align: left;
}
.tstriv-auth-form label {
	display: block;
	margin-bottom: 14px;
	font-weight: 600;
	font-size: 14px;
}
.tstriv-auth-form input[type="email"],
.tstriv-auth-form input[type="text"] {
	display: block;
	width: 100%;
	padding: 10px 14px;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-size: 16px;
	margin-top: 4px;
	box-sizing: border-box;
}
.tstriv-auth-form input:focus {
	border-color: #685BC7;
	outline: none;
}
.tstriv-hint {
	font-size: 12px;
	color: #888;
	margin: -8px 0 16px;
}

/* ---- Buttons ---- */
.tstriv-btn {
	display: inline-block;
	background: #685BC7;
	color: #fff;
	padding: 12px 28px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s;
}
.tstriv-btn:hover {
	background: #5248a3;
	color: #fff;
}

/* ---- Messages ---- */
.tstriv-msg {
	margin-top: 12px;
	padding: 10px;
	border-radius: 6px;
	font-size: 14px;
}
.tstriv-msg.success { background: #d4fcd4; color: #1a7a1a; }
.tstriv-msg.error { background: #fcd4d4; color: #7a1a1a; }

/* ---- Quiz Game ---- */
.tstriv-header {
	text-align: center;
	margin-bottom: 24px;
}
.tstriv-header h2 {
	font-size: 26px;
	margin-bottom: 10px;
}
.tstriv-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	font-size: 14px;
}
.tstriv-timer {
	font-size: 18px;
	font-weight: 700;
	color: #FE572A;
	font-variant-numeric: tabular-nums;
}
.tstriv-progress-bar {
	width: 100%;
	height: 6px;
	background: #e0e0e0;
	border-radius: 3px;
	overflow: hidden;
}
.tstriv-progress-bar > div {
	height: 100%;
	background: #685BC7;
	transition: width 0.3s ease;
}

/* ---- Questions ---- */
.tstriv-q h3 {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #888;
	margin-bottom: 8px;
}
.tstriv-question-text {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
	margin-bottom: 20px;
}
.tstriv-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.tstriv-option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	background: #F3F0EB;
	border: 2px solid transparent;
	border-radius: 10px;
	font-size: 16px;
	text-align: left;
	cursor: pointer;
	transition: all 0.15s;
}
.tstriv-option:hover {
	border-color: #685BC7;
	background: #f0edf9;
}
.tstriv-option.selected {
	border-color: #685BC7;
	background: #e8e4f5;
}
.tstriv-letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #685BC7;
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	flex-shrink: 0;
}

/* ---- Results ---- */
.tstriv-results-wrap {
	text-align: center;
}
.tstriv-big-score {
	font-size: 56px;
	font-weight: 800;
	color: #685BC7;
	margin: 10px 0;
}
.tstriv-rank {
	font-size: 18px;
	color: #FE572A;
	font-weight: 600;
}
.tstriv-result-item {
	text-align: left;
	padding: 16px;
	margin: 12px 0;
	border-radius: 8px;
	background: #F3F0EB;
}
.tstriv-result-item.correct { border-left: 4px solid #22c55e; }
.tstriv-result-item.wrong { border-left: 4px solid #ef4444; }
.tstriv-result-item .explanation {
	margin-top: 8px;
	font-size: 14px;
	color: #666;
	font-style: italic;
}

/* ---- Share Button ---- */
.tstriv-share {
	margin-top: 20px;
}
.tstriv-share button {
	background: #201E1F;
	color: #DAFF02;
	padding: 10px 24px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.tstriv-share button:hover { opacity: 0.85; }

/* ---- Leaderboard ---- */
.tstriv-lb h2 {
	text-align: center;
	font-size: 28px;
}
.tstriv-tabs {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 16px 0 24px;
}
.tstriv-tab {
	padding: 8px 20px;
	border-radius: 20px;
	background: #F3F0EB;
	color: #201E1F;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	transition: all 0.15s;
}
.tstriv-tab.active,
.tstriv-tab:hover {
	background: #685BC7;
	color: #fff;
}
.tstriv-table {
	width: 100%;
	border-collapse: collapse;
}
.tstriv-table th {
	background: #201E1F;
	color: #F3F0EB;
	padding: 10px 14px;
	text-align: left;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.tstriv-table td {
	padding: 10px 14px;
	border-bottom: 1px solid #e8e5e0;
	font-size: 15px;
}
.tstriv-table tr.tstriv-top td {
	font-weight: 700;
}
.tstriv-table tr.tstriv-top:first-child td {
	color: #FE572A;
}

/* ---- Already Played ---- */
.tstriv-done {
	text-align: center;
	padding: 40px 20px;
}
.tstriv-score-card {
	background: #F3F0EB;
	border-radius: 12px;
	padding: 24px;
	display: inline-block;
	margin: 16px 0;
}

/* ---- Notice ---- */
.tstriv-notice {
	text-align: center;
	padding: 40px 20px;
	color: #888;
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
	.tstriv-wrap { padding: 12px; }
	.tstriv-question-text { font-size: 17px; }
	.tstriv-option { padding: 12px 14px; font-size: 14px; }
	.tstriv-big-score { font-size: 44px; }
}
