:root
{
	--bg: #0e1117;
	--panel: #161b22;
	--border: #30363d;
	--text: #e6edf3;
	--muted: #9ba3af;
	--accent: #8c03fc;
	--accent-hover: #6f02c8;
	--panel-dark: #0d1117;

	--font-ui: "Futura LT Bold", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

*
{
	box-sizing: border-box;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body
{
	margin: 0;
	min-height: 100vh;
	background: radial-gradient(circle at top, #151a22, var(--bg));
	color: var(--text);
	display: flex;
	justify-content: center;
}

.container
{
	width: 100%;
	max-width: 1100px;
	padding: 24px 16px 20px;
	display: flex;
	flex-direction: column;
}

/* ===== Header / Branding ===== */

.top-header
{
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 28px;
	text-align: center;
}

.logo-image
{
	max-width: 350px;
	width: 100%;
	height: auto;
}

.title
{
	font-size: 20pt;
	font-family:
		"BankGothic Md BT Medium",
		"Bank Gothic",
		"Microgramma D Extended",
		"Eurostile",
		"Orbitron",
		"Arial Black",
		sans-serif;
}

.subtitle
{
	font-family: var(--font-ui);
	font-size: 12px;
	color: var(--muted);
	line-height: 1.4;
	max-width: 520px;
}

/* ===== Main Card ===== */

.card
{
	background: linear-gradient(180deg, #161b22, #0f131a);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: clamp(18px, 4vw, 36px);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* ===== Examples ===== */

.examples
{
	margin: 0 auto 18px;
	width: fit-content;
	max-width: 100%;
	text-align: center;
}

.example-tabs
{
	font-family: var(--font-ui);
	display: inline-flex;
	margin: 0 auto 14px;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	justify-content: center;
	background: var(--panel-dark);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 4px;
}

.example-tabs button
{
	font-family: var(--font-ui);
	background: transparent;
	border: none;
	color: var(--muted);
	padding: 8px 12px;
	font-size: 0.75rem;
	border-radius: 8px;

	transition:
		background 0.2s ease,
		color 0.2s ease,
		box-shadow 0.2s ease;
}

.example-tabs button:not(.active):hover
{
	background: rgba(140, 3, 252, 0.08);
	color: var(--accent);
	box-shadow: inset 0 0 0 1px var(--accent);
}

.example-tabs button.active
{
	background: var(--panel);
	color: #ffffff;
	box-shadow: inset 0 0 0 1px var(--accent);
}

.example-set
{
	display: none;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.example-set.active
{
	display: flex;
}

.example-set button
{
	font-family: var(--font-ui);
	padding: 6px 12px;
	font-size: 12px;
	border-radius: 999px;
	background: transparent;
	border: 1px solid var(--border);
	color: var(--text);
	cursor: pointer;
	opacity: 0.9;

	transition:
		background 0.2s ease,
		color 0.2s ease,
		box-shadow 0.2s ease;
}

.example-set button:hover
{
	background: rgba(140, 3, 252, 0.08);
	border-color: var(--accent);
	color: var(--accent);
}

/* ===== Input ===== */

.input-group
{
	display: flex;
	gap: 10px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.input-group + .examples .examples-title
{
	margin-top: -6px;
}

input[type="text"]
{
	font-family: var(--font-ui);
	flex: 1;
	padding: 14px 16px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--panel-dark);
	color: var(--text);
	min-height: 48px;
	font-size: 1rem;
}

button,
.action-btn
{
	padding: 14px 22px;
	border-radius: 10px;
	border: none;
	background: linear-gradient(180deg, var(--accent), var(--accent-hover));
	color: #ffffff;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

button
{
	font-size: 12px;
}

.action-btn
{
	min-height: 48px;
	font-size: 0.875rem;
	position: relative;
	overflow: hidden;
}

button:disabled,
.action-btn:disabled
{
	opacity: 0.6;
	cursor: not-allowed;
}

/* ===== Answer (fixed height to prevent layout shift) ===== */

.asked-question
{
	margin-top: 20px;
	padding: 14px 18px;
	border-radius: 12px;
	background: var(--panel-dark);
	border: 1px solid var(--border);
	font-size: 12px;
	color: var(--muted);
	display: none;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
	position: relative;
}

.asked-question::before
{
	content: "Query";
	position: absolute;
	top: -11px;
	left: 18px;
	padding: 2px 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #ffffff;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 999px;
}

.asked-question span
{
	display: block;
	margin-top: 2px;
	color: var(--text);
	font-weight: 600;
	font-size: 14px;
}

.answer
{
	margin-top: 14px;
	padding: 26px 28px;
	border-radius: 16px;
	background: linear-gradient(180deg, #0f141c, #0b0f15);
	border: 1px solid var(--accent);
	line-height: 1.2;
	font-size: 12px;
	display: none;
	position: relative;
	box-shadow:
		0 0 0 1px rgba(140, 3, 252, 0.18),
		0 16px 40px rgba(0, 0, 0, 0.65);
}

.answer::before
{
	content: "Answer";
	position: absolute;
	top: -11px;
	left: 18px;
	padding: 2px 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #ffffff;
	background: var(--accent);
	border-radius: 999px;
}

.answer.busy
{
	border-color: #ff6b6b;
	box-shadow:
		0 0 0 1px rgba(255, 107, 107, 0.35),
		0 12px 30px rgba(0, 0, 0, 0.6);
	color: #ffb3b3;
	font-weight: 600;
}

/* Thinking animation */

@keyframes thinkingGlow
{
	0%
	{
		box-shadow: 0 0 0 rgba(140, 3, 252, 0);
		border-color: var(--border);
	}
	50%
	{
		box-shadow:
			0 0 12px rgba(140, 3, 252, 0.35),
			0 0 24px rgba(140, 3, 252, 0.15);
		border-color: var(--accent);
	}
	100%
	{
		box-shadow: 0 0 0 rgba(140, 3, 252, 0);
		border-color: var(--border);
	}
}

.answer.thinking
{
	display: block;
	color: var(--muted);
	font-style: italic;
	background: linear-gradient(180deg, #0f141c, #0b0f15);
	animation: thinkingGlow 1.8s ease-in-out infinite;
}

.answer.thinking > *
{
	position: relative;
	z-index: 1;
}

.answer.thinking::after
{
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;

	background:
		linear-gradient(
			120deg,
			rgba(255, 0, 150, 0.25),
			rgba(0, 200, 255, 0.25),
			rgba(0, 255, 150, 0.25),
			rgba(255, 200, 0, 0.25),
			rgba(180, 0, 255, 0.25)
		);

	background-size: 400% 400%;
	animation: siriRainbow 8s ease-in-out infinite;

	filter: blur(28px);
	opacity: 0.55;
	z-index: 0;
	pointer-events: none;
}

/* Markdown */

.answer p
{
	margin: 0;
	font-size: 14px;
}

.answer p + p
{
	margin-top: 16px;
}

.answer h1,
.answer h2,
.answer h3
{
	margin: 0.8em 0 0.4em;
	line-height: 1.3;
}

.answer h2
{
	font-size: 16px;
}

.answer h3
{
	font-size: 14px;
}

.answer code,
.answer pre
{
	font-size: 12px;
}

.answer a
{
	color: var(--accent);
	text-decoration: none;
	font-weight: 600;
}

.answer a:hover
{
	text-decoration: underline;
}

/* ===== Sources ===== */

.sources
{
	margin-top: 10px;
	font-size: 12px;
	color: var(--muted);
	display: none;
}

.sources a
{
	color: var(--accent);
	text-decoration: none;
	font-weight: 600;
}

.sources a:hover
{
	color: var(--accent-hover);
	text-decoration: underline;
}

/* ===== Footer / Notes ===== */

.notice
{
	margin-top: 24px;
	padding: 14px 16px;
	border-radius: 10px;
	background: var(--panel-dark);
	border: 1px solid var(--border);
	font-size: 12px;
	line-height: 1.5;
	color: var(--muted);
}

.notice strong
{
	color: var(--text);
}

.notice a
{
	color: var(--accent);
	text-decoration: none;
	font-weight: 600;
}

.notice a:hover
{
	text-decoration: underline;
}

.footer-banner
{
	margin-top: 18px;
	text-align: center;
	font-size: 12px;
	color: var(--muted);
}

@media (max-width: 600px)
{
	.input-group
	{
		gap: 8px;
	}

	button
	{
		padding: 14px 18px;
	}

	.answer
	{
		padding: 20px 18px;
		font-size: 1rem;
		line-height: 1.5;
	}

	.answer p
	{
		font-size: 1rem;
	}

	.title
	{
		font-size: 1.25rem;
	}

	.subtitle
	{
		font-size: 0.875rem;
	}
}

@media (min-width: 1024px)
{
	.card
	{
		padding: 36px 40px;
	}

	.subtitle
	{
		max-width: 700px;
	}
}

@keyframes siriRainbow
{
	0%
	{
		background-position: 0% 50%;
	}
	50%
	{
		background-position: 100% 50%;
	}
	100%
	{
		background-position: 0% 50%;
	}
}

/* ===== Header Banner ===== */

.header-banner
{
	position: relative;
	margin: -28px -28px 32px;
	padding: 36px 24px 40px;
	border-radius: 14px 14px 0 0;
	overflow: hidden;
}

/* Blurred background image */
.header-banner::before
{
	content: "";
	position: absolute;
	inset: 0;

	background: url("resources/image/bg.png") center 30% / cover no-repeat;
	filter: blur(3px) saturate(1.05);
	transform: scale(1.1); /* prevents blur edge cutoff */

	z-index: 0;
}

/* Dark overlay for readability */
.header-banner::after
{
	content: "";
	position: absolute;
	inset: 0;

	background: linear-gradient(
		to bottom,
		rgba(14, 17, 23, 0.35),
		rgba(14, 17, 23, 0.65)
	);

	z-index: 1;
}

/* Header content above everything */
.header-banner > *
{
	position: relative;
	z-index: 2;
}

.header-banner .title,
.header-banner .subtitle
{
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* Mobile adjustment */
@media (max-width: 600px)
{
	.header-banner
	{
		padding: 24px 16px 28px;
		background-position: center top;
	}
}

.answer-actions
{
	margin-top: 16px;
	display: flex;
	gap: 14px;
}

@font-face
{
	font-family: 'PricedownBl-Regular';
	font-style: normal;
	font-weight: normal;
	src: local('PricedownBl-Regular'), url('resources/font/pricedown bl.woff') format('woff');
}

@font-face
{
  font-family: "BankGothic Md BT Medium";
  src: url("adfd298e421945768d7bf13da3ee8a45.eot"); /* IE9*/
  src: url("adfd298e421945768d7bf13da3ee8a45.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
  url("adfd298e421945768d7bf13da3ee8a45.woff2") format("woff2"), /* chrome、firefox */
  url("adfd298e421945768d7bf13da3ee8a45.woff") format("woff"), /* chrome、firefox */
  url("adfd298e421945768d7bf13da3ee8a45.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
  url("adfd298e421945768d7bf13da3ee8a45.svg#BankGothic Md BT Medium") format("svg"); /* iOS 4.1- */
}

@font-face
{
	font-family: 'Futura LT Bold';
	src: url('resources/font/FuturaLT-Bold.woff') format('woff');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face
{
	font-family: 'Futura LT';
	src: url('resources/font/FuturaLT.woff') format('woff');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

.action-btn
{
	position: relative;
	padding: 14px 22px;
	border-radius: 10px;
	border: none;
	background: linear-gradient(180deg, var(--accent), var(--accent-hover));
	color: #ffffff;
	font-weight: 600;
	min-height: 48px;
	font-size: 0.875rem;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
}

.action-btn:disabled
{
	opacity: 0.6;
	cursor: not-allowed;
}

.action-btn::before
{
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			120deg,
			transparent 30%,
			rgba(255, 255, 255, 0.35),
			transparent 70%
		);
	transform: translateX(-120%);
	transition: transform 0.6s ease;
	pointer-events: none;
}

.action-btn:not(:disabled):hover::before
{
	transform: translateX(120%);
}

.action-btn:not(:disabled):hover,
button:not(:disabled):hover
{
	box-shadow:
		0 0 0 1px rgba(140, 3, 252, 0.4),
		0 0 14px rgba(140, 3, 252, 0.35);
}

.report-modal
{
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 999;
}

.report-modal-box
{
	background: var(--panel-dark);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 22px;
	width: 90%;
	max-width: 420px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.report-title
{
	font-family: "Futura LT Bold", system-ui;
	font-size: 14px;
	margin-bottom: 2px;
}

#report-comment
{
	width: 100%;
	min-height: 120px;
	resize: vertical;
	padding: 12px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: #0b0f15;
	color: var(--text);
	font-size: 12px;
	font-family: var(--font-ui);
}

.report-actions
{
	margin-top: 14px;
	display: flex;
	gap: 14px;
	justify-content: center;
}

.report-success
{
	display: none;
	margin-top: 14px;
	padding: 12px;
	border-radius: 10px;
	background: rgba(0, 200, 0, 0.08);  /* Light green background */
	border: 1px solid #00c800;  /* Green border */
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
}

#reportBtn
{
	background: linear-gradient(180deg, #d64545, #b63737);
}

#reportBtn:not(:disabled):hover
{
	box-shadow:
		0 0 0 1px rgba(214, 69, 69, 0.45),
		0 0 14px rgba(214, 69, 69, 0.4);
}

#report-username
{
	width: 100%;
	margin-bottom: 10px;
	padding: 12px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: #0b0f15;
	color: var(--text);
	font-size: 12px;
}

.report-label
{
	display: block;
	margin-bottom: 6px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
}

.report-subtitle
{
	margin-bottom: 14px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--muted);
}

.report-footnote
{
	margin-top: 12px;
	font-size: 11px;
	color: var(--muted);
	text-align: center;
}

.answer + .input-group
{
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--border);
}

.release-notice
{
	margin: 0 0 24px;
	padding: 14px 18px;
	border-radius: 12px;

	background:
		linear-gradient(
			180deg,
			rgba(255, 193, 7, 0.12),
			rgba(255, 193, 7, 0.05)
		);

	border: 1px solid rgba(255, 193, 7, 0.55);

	color: #ffe08a;
	font-size: 12px;
	line-height: 1.5;
	text-align: center;

	box-shadow:
		0 0 0 1px rgba(255, 193, 7, 0.25),
		0 12px 30px rgba(0, 0, 0, 0.6);
}

.release-notice strong
{
	color: #fff3cd;
}

.stats-table
{
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0 24px;
	font-size: 12px;
}

.stats-table th,
.stats-table td
{
	padding: 10px 12px;
	border: 1px solid var(--border);
	text-align: left;
}

.stats-table th
{
	background: var(--panel-dark);
	color: var(--muted);
	font-weight: 600;
}

.stats-table tr:nth-child(even)
{
	background: rgba(255,255,255,0.02);
}

/* ===== Stats Cards ===== */

.stats-grid
{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 14px;
	margin-bottom: 24px;
}

.stat-card
{
	background: linear-gradient(180deg, #0f141c, #0b0f15);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 16px;
	box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

.stat-label
{
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--muted);
}

.stat-value
{
	margin-top: 6px;
	font-size: 22px;
	font-weight: 700;
	color: var(--accent);
}

/* ===== Table Panels ===== */

.table-panel
{
	background: linear-gradient(180deg, #0f141c, #0b0f15);
	border: 1px solid var(--border);
	border-radius: 14px;
	margin-bottom: 24px;
	box-shadow: 0 14px 35px rgba(0,0,0,0.6);
	overflow: hidden;
}

.table-header
{
	padding: 14px 18px;
	background: var(--panel-dark);
	border-bottom: 1px solid var(--border);
}

.table-header h3
{
	margin: 0;
	font-size: 14px;
	font-family: var(--font-ui);
	color: var(--text);
}

/* ===== Enhanced Stats Tables ===== */

.stats-table
{
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
}

.stats-table thead th
{
	background: linear-gradient(180deg, #151a22, #0f141c);
	color: var(--muted);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 11px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
}

.stats-table tbody td
{
	padding: 12px 14px;
	border-bottom: 1px solid rgba(255,255,255,0.05);
	color: var(--text);
}

.stats-table tbody tr:last-child td
{
	border-bottom: none;
}

/* Zebra + hover */

.stats-table tbody tr:nth-child(even)
{
	background: rgba(255,255,255,0.02);
}

.stats-table tbody tr:hover
{
	background: rgba(140, 3, 252, 0.08);
}

/* Numeric alignment */

.stats-table td:nth-child(n+2),
.stats-table th:nth-child(n+2)
{
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* Emphasis for totals / cost */

.stats-table td:last-child
{
	font-weight: 600;
	color: var(--accent);
}
