/* Theme: Neon Grid
 * Cyberpunk megacity at night: a rain-slick black street under a wall of
 * neon, acid-yellow HUD chrome, cyan/magenta signage, chromatic-aberration
 * glitches and chamfered "data shard" cards. Card layout handled by
 * NeonGridCardLayout.razor (chamfered shard plate, block difficulty meter,
 * hex serial, barcode strip, cut-corner points tag).
 *
 * Generic cyberpunk visual language only — no logos, artwork, fonts or other
 * assets from any game, film or book are used.
 */

[data-theme="neon-grid"] {
	/* ── Brand — acid yellow / neon cyan / hot magenta ─────────── */
	--eg-color-primary: #f5e50a; /* Acid yellow */
	--eg-color-primary-light: #fff45c;
	--eg-color-primary-rgb: 245, 229, 10;
	--eg-color-secondary: #00f0ff; /* Neon cyan */
	--eg-color-secondary-light: #6ff8ff;
	--eg-color-tertiary: #ff2a6d; /* Hot magenta */
	--eg-color-success: #39ff88;
	--eg-color-error: #ff3355;
	--eg-color-warning: #ff9f1c;
	--eg-color-info: #00b7ff;

	/* ── Typography — wide techno headings + terminal readouts ──── */
	--eg-font-heading: "Bahnschrift", "Eurostile", "Segoe UI", "Roboto Condensed",
		Arial, sans-serif;
	--eg-font-body: "Bahnschrift", "Segoe UI", Roboto, Arial, sans-serif;
	--eg-font-numbers: "Cascadia Mono", "Consolas", "SFMono-Regular", ui-monospace,
		monospace;

	/* ── Radius — cut, not rounded ──────────────────────────────── */
	--eg-radius-sm: 0;
	--eg-radius-md: 2px;
	--eg-radius-lg: 2px;
	--eg-radius-xl: 4px;
	--eg-radius-pill: 0;

	/* ── Shadows — neon bloom ───────────────────────────────────── */
	--eg-shadow-card: 0 10px 24px rgba(0, 0, 0, 0.6);
	--eg-shadow-elevated: 0 16px 36px rgba(0, 0, 0, 0.7);
	--eg-shadow-glow-primary: 0 0 18px rgba(var(--eg-color-primary-rgb), 0.5);
	--eg-shadow-glow-success: 0 0 18px rgba(57, 255, 136, 0.45);

	/* ── Palette — midnight street ──────────────────────────────── */
	--eg-palette-background: #07060d;
	--eg-palette-surface: #110f1c;
	--eg-palette-surface-accent: #05040a;
	--eg-palette-surface-variant: #241f38;
	--eg-palette-text-primary: #eef0ff;
	--eg-palette-text-secondary: #9a97bd;
	--eg-palette-text-disabled: #5a5678;
	--eg-palette-divider: #1f1b31;
	--eg-palette-divider-light: #332c4f;
	--eg-palette-primary: #f5e50a;
	--eg-palette-secondary: #00f0ff;
	--eg-palette-tertiary: #ff2a6d;
	--eg-palette-error: #ff3355;
	--eg-palette-success: #39ff88;
	--eg-palette-warning: #ff9f1c;
	--eg-palette-info: #00b7ff;

	/* Neon fills carry near-black ink */
	--eg-palette-on-primary: #0b0a02;
	--eg-palette-on-secondary: #001518;
	--eg-palette-on-tertiary: #1a0009;
	--eg-palette-on-error: #1a0006;
	--eg-palette-on-success: #001a0b;
	--eg-palette-on-warning: #1a0e00;
	--eg-palette-on-info: #00121c;

	/* Featured game-mode accents (base defaults in design-tokens.css). */
	--schniffel-accent-classic: #f5e50a;
	--schniffel-accent-classic-on: #0b0a02;
	--schniffel-accent-hardcore: #ff2a6d;
	--schniffel-accent-hardcore-on: #1a0009;
	--schniffel-accent-bigschniff: #00f0ff;
	--schniffel-accent-bigschniff-on: #001518;
	--schniffel-accent-royal: #b967ff;
	--schniffel-accent-royal-on: #12001f;

	/* Dark chip (card age pill) needs light text */
	--eg-palette-on-surface-variant: #eef0ff;

	/* Cards — dark shard glass with light text */
	--eg-palette-card: #120f20;
	--eg-palette-text-on-card: #eef0ff;
	--eg-palette-text-on-card-muted: #a19ec4;

	/* ── Player colors — gang tags ──────────────────────────────── */
	--eg-player-1: #f5e50a; /* acid */
	--eg-player-2: #00f0ff; /* cyan */
	--eg-player-3: #ff2a6d; /* magenta */
	--eg-player-4: #39ff88; /* toxic green */
	--eg-player-5: #b967ff; /* ultraviolet */
	--eg-player-6: #ff9f1c; /* sodium orange */
	--eg-player-7: #4d7cff; /* electric blue */
	--eg-player-8: #ff8fd8; /* bubblegum */
}

/* ── Megacity backdrop ────────────────────────────────────────
 * Magenta and cyan sign-glow bleeding in from the sides, a sodium haze at
 * the horizon, slanted rain streaks, CRT scanlines, and a perspective-less
 * street grid fading up from the bottom. Painted on the theme-provider's
 * ::before/::after (heros/vice/frontier pattern); the app shell is made
 * transparent so the scenery shows through. */
[data-theme="neon-grid"] {
	position: relative;
}

[data-theme="neon-grid"]::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background:
		/* magenta sign spill, upper left */
		radial-gradient(
			55% 45% at 0% 12%,
			rgba(255, 42, 109, 0.24) 0%,
			rgba(255, 42, 109, 0.06) 45%,
			transparent 70%
		),
		/* cyan sign spill, right */
			radial-gradient(
				50% 50% at 100% 38%,
				rgba(0, 240, 255, 0.18) 0%,
				rgba(0, 240, 255, 0.04) 45%,
				transparent 70%
			),
		/* sodium haze on the horizon */
			radial-gradient(
				90% 22% at 50% 66%,
				rgba(185, 103, 255, 0.14) 0%,
				transparent 70%
			),
		/* rain */
			repeating-linear-gradient(
				104deg,
				transparent 0 22px,
				rgba(180, 220, 255, 0.035) 22px 23px,
				transparent 23px 61px
			),
		/* CRT scanlines */
			repeating-linear-gradient(
				0deg,
				rgba(255, 255, 255, 0.025) 0 1px,
				transparent 1px 3px
			),
		/* night sky → wet street */
			linear-gradient(180deg, #05040a 0%, #0b0817 52%, #120b1e 100%);
}

[data-theme="neon-grid"]::after {
	content: "";
	position: absolute;
	inset: 64% 0 0 0;
	z-index: 0;
	pointer-events: none;
	background:
		repeating-linear-gradient(
			90deg,
			rgba(255, 42, 109, 0.16) 0 1px,
			transparent 1px 64px
		),
		repeating-linear-gradient(
			0deg,
			rgba(0, 240, 255, 0.12) 0 1px,
			transparent 1px 40px
		);
	-webkit-mask: linear-gradient(180deg, transparent 0%, #000 40%, rgba(0, 0, 0, 0.55) 100%);
	mask: linear-gradient(180deg, transparent 0%, #000 40%, rgba(0, 0, 0, 0.55) 100%);
	opacity: 0.75;
}

/* Lift the app content above the scenery layers (scoped to this theme).
   The scoped MainLayout.razor.css paints an opaque background on
   .schniffel-app — make the shell transparent so the city shows through. */
[data-theme="neon-grid"] .schniffel-app {
	position: relative;
	z-index: 1;
	background: transparent;
}

/* ── HUD chrome ──────────────────────────────────────────────── */
[data-theme="neon-grid"] .schniffel-topbar {
	background: rgba(9, 7, 17, 0.84);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(245, 229, 10, 0.45);
	box-shadow: 0 1px 0 rgba(255, 42, 109, 0.35), 0 6px 22px rgba(0, 0, 0, 0.5);
}

[data-theme="neon-grid"] .schniffel-footer {
	background: rgba(9, 7, 17, 0.84);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-top: 1px solid rgba(0, 240, 255, 0.3);
}

/* ── Dice — black resin cubes with neon pips ─────────────────── */
[data-theme="neon-grid"] .schniffel-die-face {
	background: linear-gradient(155deg, #1d1830 0%, #0b0915 100%);
	border: 2px solid rgba(0, 240, 255, 0.55);
	border-radius: 3px;
	box-shadow:
		inset 0 0 12px rgba(0, 240, 255, 0.12),
		0 0 10px rgba(0, 240, 255, 0.18),
		0 6px 14px rgba(0, 0, 0, 0.6);
}

[data-theme="neon-grid"] .schniffel-pip {
	background: var(--eg-color-secondary);
	box-shadow: 0 0 6px rgba(0, 240, 255, 0.9);
}

[data-theme="neon-grid"] .schniffel-die--saved .schniffel-die-face {
	border-color: var(--eg-color-primary);
	box-shadow:
		inset 0 0 12px rgba(245, 229, 10, 0.15),
		0 0 16px rgba(245, 229, 10, 0.5),
		0 6px 14px rgba(0, 0, 0, 0.6);
}

[data-theme="neon-grid"] .schniffel-die--saved .schniffel-pip {
	background: var(--eg-color-primary);
	box-shadow: 0 0 6px rgba(245, 229, 10, 0.9);
}

[data-theme="neon-grid"] .schniffel-die-saved-badge {
	border-radius: 0;
}

[data-theme="neon-grid"] .schniffel-die-placeholder {
	color: rgba(255, 42, 109, 0.65);
}

/* ── Claim fanfare skin (docs/features/claim-fanfare.md §4.3) ──
 * Acid-yellow cut-corner banner, glitching title, magenta/cyan split. */
[data-theme="neon-grid"] .schniffel-fanfare {
	--fanfare-banner-bg: var(--eg-palette-primary);
	--fanfare-banner-fg: var(--eg-palette-on-primary);
	--fanfare-banner-border: var(--eg-palette-tertiary);
	--fanfare-banner-radius: 0;
	--fanfare-title-color: var(--eg-palette-on-primary);
	--fanfare-title-transform: uppercase;
	--fanfare-title-shadow: -2px 0 0 rgba(255, 42, 109, 0.85), 2px 0 0 rgba(0, 240, 255, 0.85);
	/* Hard offset block in cyan behind the yellow banner + neon bloom. */
	--fanfare-banner-shadow: 7px 7px 0 var(--eg-palette-secondary);
	--fanfare-glow: 0 0 28px color-mix(in srgb, var(--eg-palette-tertiary) 45%, transparent);
	--fanfare-die-radius: 2px;
}

[data-theme="neon-grid"] .schniffel-fanfare-banner {
	padding-inline: 2.4rem;
}

[data-theme="neon-grid"] .schniffel-fanfare-title {
	letter-spacing: 0.08em;
	animation: neon-grid-glitch 2.4s steps(1, end) infinite;
}

[data-theme="neon-grid"] .schniffel-fanfare-subtitle {
	font-family: var(--eg-font-numbers);
	letter-spacing: 0.1em;
}

@keyframes neon-grid-glitch {
	0%, 86%, 100% { transform: none; clip-path: none; }
	88% { transform: translate(-3px, 0); clip-path: inset(0 0 55% 0); }
	90% { transform: translate(3px, 0); clip-path: inset(40% 0 0 0); }
	92% { transform: translate(-1px, 1px); clip-path: none; }
}

@media (prefers-reduced-motion: reduce) {
	[data-theme="neon-grid"] .schniffel-fanfare-title {
		animation: none;
	}
}
