/* FiveGuessr game screen. Scoped to .fg-app so it works inside any theme. */
.fg-app {
	--fg-bg: #14121a;
	--fg-card: #1f1c28;
	--fg-card-2: #2a2635;
	--fg-text: #f3f1f7;
	--fg-muted: #a7a1b5;
	--fg-accent: #f5c518;
	--fg-accent-text: #1a1500;
	--fg-good: #3ecf8e;
	--fg-bad: #ff6b6b;
	--fg-radius: 14px;

	max-width: 640px;
	margin: 0 auto;
	padding: 20px 16px 28px;
	background: var(--fg-bg);
	color: var(--fg-text);
	border-radius: var(--fg-radius);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	line-height: 1.45;
	box-sizing: border-box;
}
.fg-app *, .fg-app *::before, .fg-app *::after { box-sizing: border-box; }
.fg-app p { margin: 0; }

.fg-header { text-align: center; margin-bottom: 18px; }
.fg-brand { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; color: var(--fg-accent); }
.fg-sub { color: var(--fg-muted); font-size: 0.95rem; }
.fg-difficulty {
	display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px;
	font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; vertical-align: 1px;
	border: 1px solid currentColor;
}
.fg-difficulty-easy { color: var(--fg-good); }
.fg-difficulty-medium { color: var(--fg-accent); }
.fg-difficulty-hard { color: var(--fg-bad); }
.fg-loading, .fg-empty { text-align: center; color: var(--fg-muted); padding: 24px 0; }
.fg-empty p + p { margin-top: 8px; }

.fg-preview-bar {
	background: #3a2f00; color: var(--fg-accent); border-radius: 8px;
	padding: 8px 12px; margin-bottom: 14px; font-size: 0.9rem;
}
.fg-link { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }

.fg-clues { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fg-clue { background: var(--fg-card); border-radius: var(--fg-radius); padding: 14px 16px; opacity: 0.85; }
.fg-clue-latest { opacity: 1; outline: 2px solid var(--fg-accent); }
.fg-clue-head {
	display: flex; justify-content: space-between; gap: 8px;
	font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-muted);
}
.fg-points { color: var(--fg-accent); white-space: nowrap; }
.fg-clue-text { margin-top: 6px !important; font-size: 1.05rem; }
.fg-visual {
	display: block; margin: 10px auto 0; max-width: 100%; width: 260px; height: auto;
	border-radius: 8px; image-rendering: pixelated;
}
.fg-guess-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 0.9rem; color: var(--fg-muted); }
.fg-guess-wrong { color: var(--fg-bad); }
.fg-guess-correct { color: var(--fg-good); font-weight: 700; }

.fg-guess { margin: 0 0 16px; }
.fg-combo { position: relative; }
.fg-input {
	width: 100%; font-size: 1rem; padding: 12px 14px; border-radius: 10px;
	border: 2px solid var(--fg-card-2); background: var(--fg-card); color: var(--fg-text);
}
.fg-input:focus { outline: none; border-color: var(--fg-accent); }

/* The guess box: brighter than the cards around it, with a search icon, so it reads as ready to type in. */
.fg-guess .fg-input {
	font-size: 1.1rem; padding: 15px 16px 15px 48px; border-radius: 12px;
	background: #322d42 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5c518' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px center / 20px 20px;
	border-color: rgba(245, 197, 24, 0.55);
	box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.08);
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.fg-guess .fg-input::placeholder { color: #d4cfe0; opacity: 1; }
.fg-guess .fg-input:hover { border-color: rgba(245, 197, 24, 0.8); }
.fg-guess .fg-input:focus { background-color: #3a3450; border-color: var(--fg-accent); box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.25); }
/* Until a title is picked, Guess is an outline, so the box stays the brightest thing. */
.fg-guess .fg-btn-primary:disabled { opacity: 1; background: transparent; color: var(--fg-muted); box-shadow: inset 0 0 0 2px var(--fg-card-2); }
.fg-options {
	position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
	list-style: none; margin: 0; padding: 4px; max-height: 320px; overflow-y: auto;
	background: var(--fg-card-2); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.fg-options[hidden] { display: none; }
.fg-option {
	display: flex; flex-direction: column;
	padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.fg-option-name { font-weight: 600; }
.fg-option-meta { font-size: 0.8rem; color: var(--fg-muted); }
.fg-option:hover, .fg-option[aria-selected="true"] { background: var(--fg-card); }
.fg-option-guessed { opacity: 0.45; cursor: not-allowed; }
.fg-option-empty { padding: 10px; color: var(--fg-muted); }

.fg-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.fg-btn {
	flex: 1 1 auto; font-size: 1rem; font-weight: 700; padding: 11px 16px; border-radius: 10px;
	border: 0; cursor: pointer; min-height: 44px;
}
.fg-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.fg-btn-primary { background: var(--fg-accent); color: var(--fg-accent-text); }
.fg-btn-ghost { background: var(--fg-card-2); color: var(--fg-text); }

.fg-error { margin-top: 12px !important; color: var(--fg-bad); text-align: center; }

.fg-result {
	display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px;
	background: var(--fg-card); border-radius: var(--fg-radius); padding: 16px;
}
.fg-result-win { outline: 2px solid var(--fg-good); }
.fg-result-miss { outline: 2px solid var(--fg-bad); }
.fg-poster { width: 110px; border-radius: 8px; flex: none; }
.fg-result-body { flex: 1; min-width: 0; }
.fg-result-head { font-size: 1.2rem; font-weight: 800; }
.fg-answer { font-size: 1.05rem; margin-top: 2px !important; }
.fg-score { color: var(--fg-accent); font-weight: 700; margin-top: 4px !important; }
.fg-share-preview {
	background: var(--fg-bg); color: var(--fg-text); border-radius: 8px; padding: 8px 10px; margin: 10px 0 0;
	font-size: 0.9rem; white-space: pre-wrap; font-family: inherit;
}
.fg-countdown { margin-top: 10px !important; color: var(--fg-muted); font-size: 0.9rem; }
.fg-countdown-time { font-variant-numeric: tabular-nums; color: var(--fg-text); font-weight: 700; }

.fg-attribution { max-width: 640px; margin: 10px auto 0; font-size: 0.75rem; color: #888; text-align: center; }

/* ---------- stats, account and leaderboard ---------- */
.fg-panel { background: var(--fg-card); border-radius: var(--fg-radius); padding: 16px; margin-bottom: 18px; }
.fg-panel-title {
	margin: 0 0 12px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
	letter-spacing: 0.06em; color: var(--fg-muted);
}
.fg-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.fg-stat, .fg-standings li { display: flex; flex-direction: column; align-items: center; }
.fg-stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fg-stat-label { font-size: 0.75rem; color: var(--fg-muted); }
.fg-histogram { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; }
.fg-bar-row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.fg-bar-label { width: 1em; text-align: center; color: var(--fg-muted); font-weight: 700; }
.fg-bar-track { flex: 1; }
.fg-bar-label-wide { width: 4.2em; text-align: left; }
.fg-everyone-head { margin-bottom: 10px !important; color: var(--fg-muted); }
.fg-everyone-head .fg-stat-value { color: var(--fg-text); margin-right: 4px; }
.fg-bar {
	display: block; min-width: 1.8em; padding: 1px 6px; border-radius: 4px; text-align: right;
	background: var(--fg-card-2); color: var(--fg-text); font-weight: 700; font-variant-numeric: tabular-nums;
}
.fg-bar-now { background: var(--fg-accent); color: var(--fg-accent-text); }
.fg-standing, .fg-note { margin-top: 12px !important; color: var(--fg-muted); font-size: 0.9rem; }
.fg-app a { color: var(--fg-accent); }
.fg-app a.fg-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.fg-app a.fg-btn-primary { color: var(--fg-accent-text); }
.fg-app a.fg-btn-ghost { color: var(--fg-text); }
.fg-signup { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--fg-card-2); text-align: center; }
.fg-signup .fg-btn { margin-top: 10px; }
.fg-ok { margin: 0 0 12px !important; color: var(--fg-good); text-align: center; }
.fg-app > .fg-error { margin: 0 0 12px !important; }

.fg-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.fg-form .fg-note { flex-basis: 100%; margin: 0 0 4px !important; }
.fg-form .fg-input { flex: 1 1 220px; width: auto; }
.fg-form .fg-btn { flex: 0 1 auto; }
.fg-code { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }
.fg-providers { display: grid; gap: 8px; margin-bottom: 4px; }
.fg-app a.fg-provider { color: #fff; }
.fg-provider-twitch { background: #9146ff; }
.fg-provider-discord { background: #5865f2; }
.fg-app a.fg-provider-google { background: #fff; color: #1f1f1f; }
.fg-or { text-align: center; color: var(--fg-muted); font-size: 0.85rem; margin: 12px 0 !important; }
.fg-name-prompt { background: var(--fg-card); border-radius: var(--fg-radius); padding: 16px; outline: 2px solid var(--fg-accent); }
.fg-standings { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.fg-standings .fg-note { margin-top: 0 !important; font-size: 0.8rem; }
.fg-account-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px !important; }
.fg-account-links .fg-btn { flex: 1 1 auto; }
.fg-danger { color: var(--fg-muted); font-size: 0.9rem; }
.fg-danger summary { cursor: pointer; }
.fg-danger .fg-form { margin-top: 8px; }

.fg-tabs { display: flex; gap: 4px; background: var(--fg-card); border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.fg-tab {
	flex: 1; border: 0; border-radius: 8px; padding: 9px 6px; background: none; color: var(--fg-muted);
	font: inherit; font-weight: 700; cursor: pointer; min-height: 40px;
}
.fg-tab[aria-selected="true"] { background: var(--fg-accent); color: var(--fg-accent-text); }
.fg-lb-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 0.9rem; }
.fg-lb-nav .fg-link { text-decoration: none; color: var(--fg-accent); min-height: 32px; }
.fg-lb-nav .fg-link:disabled { color: var(--fg-card-2); cursor: default; }
.fg-lb-label { font-weight: 700; }
.fg-lb { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.fg-lb th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg-muted); text-align: left; padding: 6px 8px; }
.fg-lb td { padding: 9px 8px; border-top: 1px solid var(--fg-card-2); }
.fg-lb .fg-lb-num { text-align: right; font-variant-numeric: tabular-nums; }
.fg-lb-rank { width: 2.5em; color: var(--fg-muted); font-weight: 700; }
.fg-lb-name { overflow-wrap: anywhere; }
.fg-lb-points { font-weight: 800; color: var(--fg-accent); }
.fg-lb-me td { background: var(--fg-card); }
.fg-lb-me .fg-lb-name { font-weight: 700; }
.fg-lb-you { font-weight: 400; color: var(--fg-muted); }

/* Verified check: logo gold circle, dark tick. */
.fg-verified {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 1.05em; height: 1.05em; margin-left: 0.3em; vertical-align: -0.12em;
	border-radius: 50%; background: #f5c518;
}
.fg-verified svg { width: 72%; height: 72%; fill: none; stroke: #1a1500; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fg-brand .fg-verified { width: 0.75em; height: 0.75em; vertical-align: 0.02em; }
.fg-lb-gap td { text-align: center; color: var(--fg-muted); border-top: 0; padding: 2px; }
.fg-lb-foot { margin-top: 12px !important; color: var(--fg-muted); font-size: 0.8rem; text-align: center; }

/* ---------- communities ---------- */
.fg-lb-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 0.9rem; color: var(--fg-muted); }
.fg-select { flex: 1; min-width: 0; padding: 8px 10px; }
.fg-copy { display: flex; gap: 8px; margin-top: 8px; }
.fg-copy .fg-input { flex: 1; min-width: 0; font-size: 0.85rem; }
.fg-copy .fg-btn { flex: none; }
.fg-form-stack { flex-direction: column; flex-wrap: nowrap; }
.fg-form-stack label { font-size: 0.8rem; font-weight: 700; color: var(--fg-muted); margin-top: 6px; }
.fg-form-stack .fg-input { flex: none; width: 100%; }
.fg-form-stack .fg-note { margin-top: 0 !important; }
.fg-form-stack .fg-btn { align-self: flex-start; margin-top: 8px; }
.fg-form-stack textarea.fg-input { resize: vertical; font: inherit; }
.fg-community-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fg-app a.fg-community-link { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: var(--fg-text); text-decoration: none; }
.fg-community-link .fg-note { margin-top: 0 !important; }
.fg-community-name { font-weight: 700; }
.fg-address { font-weight: 700; font-size: 1.05rem; }
.fg-community-desc { margin-top: 8px !important; }
.fg-community-member { text-align: center; margin: 0 0 18px !important; }
.fg-app > .fg-note { text-align: center; margin: 0 0 18px !important; }
.fg-invite { margin: 0 0 18px; padding: 16px; border: 2px solid var(--fg-accent); border-radius: var(--fg-radius); }
.fg-app > .fg-error { text-align: center; }
.fg-community-board .fg-tabs { background: var(--fg-bg); }
.fg-community-board .fg-lb-me td { background: var(--fg-card-2); }
.fg-legend { margin-top: 14px !important; font-size: 0.8rem; color: var(--fg-muted); }
.fg-key { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 2px; vertical-align: -0.05em; }
.fg-key-now { background: var(--fg-accent); }
.fg-key-everyone { background: var(--fg-muted); }
.fg-bar-track-pair { display: grid; gap: 2px; }
.fg-bar-everyone { background: var(--fg-card-2); color: var(--fg-muted); font-weight: 400; font-size: 0.75rem; }
.fg-members { list-style: none; margin: 0; padding: 0; }
.fg-member { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--fg-card-2); }
.fg-member .fg-note { margin-top: 0 !important; font-size: 0.8rem; }
.fg-member-name { overflow-wrap: anywhere; }
.fg-panel-sub { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-muted); margin: 16px 0 4px; }
.fg-settings summary { cursor: pointer; margin-bottom: 0; }
.fg-settings[open] summary { margin-bottom: 12px; }
.fg-settings .fg-danger { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--fg-card-2); }

/* ---------- guest callout and how to play ---------- */
.fg-guest-banner {
	display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 16px;
	background: var(--fg-card); border: 2px solid var(--fg-accent); border-radius: var(--fg-radius);
}
.fg-guest-text { flex: 1; font-size: 0.92rem; color: var(--fg-muted); }
.fg-guest-head { color: var(--fg-text); font-weight: 700; font-size: 1rem; }
.fg-app .fg-guest-banner .fg-btn { flex: none; }
.fg-guest-banner { position: relative; padding-right: 44px; }
.fg-guest-banner .fg-guest-x { top: 4px; right: 4px; width: 32px; height: 32px; font-size: 1.4rem; }
.fg-howto-link { margin-top: 6px; font-size: 0.9rem; color: var(--fg-muted); }
.fg-howto-link:hover { color: var(--fg-accent); }

.fg-app.fg-modal {
	width: calc(100% - 32px); max-width: 460px; max-height: calc(100% - 32px); overflow-y: auto;
	margin: auto; padding: 22px 20px 20px; border: 0; box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.fg-modal::backdrop { background: rgba(8, 6, 12, 0.72); }
.fg-modal-x {
	position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 8px;
	background: none; color: var(--fg-muted); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.fg-modal-x:hover { color: var(--fg-text); background: var(--fg-card-2); }
.fg-modal-title { margin: 0 0 10px; font-size: 1.4rem; font-weight: 800; color: var(--fg-accent); }
.fg-howto-list { margin: 12px 0; padding-left: 1.2em; display: grid; gap: 6px; }
.fg-howto-points {
	list-style: none; margin: 0 0 14px; padding: 0;
	display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center;
}
.fg-howto-points li {
	display: flex; flex-direction: column; padding: 8px 4px; border-radius: 10px; background: var(--fg-card);
	font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-muted);
}
.fg-howto-points strong { color: var(--fg-accent); font-size: 1rem; text-transform: none; letter-spacing: 0; }
.fg-modal .fg-note { font-size: 0.88rem; color: var(--fg-muted); margin-bottom: 14px; }
.fg-modal .fg-note a { color: var(--fg-accent); }
.fg-modal .fg-actions { display: flex; }

/* ---------- archive ---------- */
.fg-archive { list-style: none; margin: 0; padding: 0; }
.fg-archive li + li { border-top: 1px solid var(--fg-card-2); }
.fg-app a.fg-archive-item {
	display: grid; grid-template-columns: 3.2em 1fr auto; gap: 10px; align-items: center;
	padding: 10px 4px; color: var(--fg-text); text-decoration: none; border-radius: 8px;
}
.fg-app a.fg-archive-item:hover { background: var(--fg-card-2); }
.fg-archive-num { color: var(--fg-muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.fg-archive-date .fg-difficulty { font-size: 0.7rem; }
.fg-archive-result { font-size: 0.85rem; color: var(--fg-muted); white-space: nowrap; }
.fg-archive-new { color: var(--fg-accent); font-weight: 700; }
.fg-preview-bar a { color: inherit; }

.fg-note-top { margin: 0 0 12px !important; }
.fg-days-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fg-days { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.fg-day { position: relative; cursor: pointer; }
.fg-day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fg-day span {
	display: inline-flex; align-items: center; justify-content: center; min-width: 3.1em; min-height: 40px; padding: 0 8px;
	border-radius: 8px; background: var(--fg-card-2); color: var(--fg-muted); font-weight: 700;
}
.fg-day input:checked + span { background: var(--fg-accent); color: var(--fg-accent-text); }
.fg-day input:focus-visible + span { outline: 2px solid var(--fg-text); outline-offset: 2px; }
.fg-manage-link { margin: 12px 0 0 !important; }
#manage { scroll-margin-top: 16px; }
.fg-lb-days { font-size: 0.8rem; white-space: nowrap; }

@media (max-width: 480px) {
	.fg-guest-banner { flex-direction: column; align-items: stretch; text-align: center; padding: 14px 40px; }
	.fg-result { flex-direction: column; align-items: center; text-align: center; }
	.fg-poster { width: 140px; }
	.fg-lb-wide { display: none; }
	.fg-stat-value { font-size: 1.35rem; }
}

/* Ads (FG_Ads). Fixed-size units, so the page doesn't jump when one loads. */
.fg-ad { text-align: center; margin: 0 auto 18px; }
.fg-ad-label { display: block; margin-bottom: 6px; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: #8a8496; }
.fg-ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.fg-ad-frame { position: relative; max-width: 640px; margin-left: auto; margin-right: auto; }
.fg-ad-spot-rail { position: absolute; top: 0; left: calc(100% + 24px); width: 300px; }
.fg-ad-spot-community { max-width: 640px; margin: 18px auto 0; }
.fg-app > .fg-ad { margin-top: 24px; }
.fg-lb-ad td { text-align: center; padding: 16px 0 !important; }
.fg-lb-ad .fg-ad, .fg-archive-ad .fg-ad { margin-bottom: 0; }
.fg-archive-ad { padding: 14px 0; }
