/* ===== FONTS ===== */

@font-face {
	font-family: 'VT323';
	src: url('../fonts/VT323-Regular.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Press Start 2P';
	src: url('../fonts/PressStart2P-Regular.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

/* ===== ROOT ===== */

:root{
	--bg:#1b0b31;
	--fg:#fefefe;
	--green:#a2ffd3;
	--yellow:#ffbf20;
	--red:#ff8a8a;
	--frame:0 0 0 2px #ff2ebd inset,0 0 0 8px rgba(255, 20, 180, .35) inset,0 18px 60px rgba(0,0,0,.65),0 0 36px rgba(255, 0, 200, .25);
	--frame-green:0 0 0 2px #20ff6e inset,0 0 0 8px rgba(32, 255, 110, .35) inset,0 18px 60px rgba(0,0,0,.65),0 0 36px rgba(32, 255, 110, .25);
	--frame-white:0 0 0 2px #fefefe inset,0 0 0 8px rgba(254,254,254,.35) inset,0 18px 60px rgba(0,0,0,.65),0 0 36px rgba(254,254,254,.25);
}

*,*::before,*::after{
	box-sizing:border-box;
}

body{
	font:20px "VT323",monospace;
	background:
		radial-gradient(120% 70% at 50% -10%, #3a0d5e 0%, rgba(27,11,49,0) 60%),
		radial-gradient(90% 50% at 50% 115%, #4b0a4f 0%, rgba(27,11,49,0) 65%),
		var(--bg);
	background-attachment:fixed;
	color: var(--fg);
	margin:0;
	min-height:100vh;
	-webkit-font-smoothing:antialiased;
}

/* Grille synthwave + scanlines, derrière tout le contenu */
body::before,
body::after{
	content:"";
	position:fixed;
	inset:0;
	pointer-events:none;
	z-index:-1;
}

body::before{
	background:
		linear-gradient(transparent 0 calc(100% - 1px), rgba(255,46,189,.12) calc(100% - 1px)) 0 0/100% 46px,
		linear-gradient(90deg, transparent 0 calc(100% - 1px), rgba(255,46,189,.10) calc(100% - 1px)) 0 0/46px 100%;
	mask-image:linear-gradient(to top, #000 0%, transparent 45%);
	-webkit-mask-image:linear-gradient(to top, #000 0%, transparent 45%);
	transform:perspective(420px) rotateX(58deg) scale(2.2);
	transform-origin:50% 100%;
	animation:grid-scroll 3.5s linear infinite;
}

body::after{
	background:repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
	opacity:.35;
	z-index:1000;
}

@keyframes grid-scroll{
	to{ background-position:0 46px, 0 0; }
}

@media (prefers-reduced-motion: reduce){
	body::before{ animation:none; }
}

/* ===== Buttons ===== */
.btn{
	font-family:"Press Start 2P";
	font-size:11px;
	letter-spacing:1px;
	text-transform:uppercase;
	display:inline-block;
	padding:10px 14px;
	color:#111;
	background:linear-gradient(#ffd86a,#ff9800);
	border:0;
	border-radius:0;
	text-align:center;
	box-shadow:0 4px 0 #a04a00, 0 0 18px rgba(255,191,32,.35);
	cursor:pointer;
	touch-action:manipulation;
	transition:transform .08s, box-shadow .08s, filter .15s;
}

.btn:hover{
	filter:brightness(1.08);
}

.btn:active{
	transform:translateY(3px);
	box-shadow:0 1px 0 #a04a00, 0 0 10px rgba(255,191,32,.25);
}

.btn:focus-visible{
	outline:2px solid #8fe3ff;
	outline-offset:3px;
}

.error{
	margin:5px 0;
	font:18px "VT323",monospace;
	color:var(--red);
	text-align:center;
	min-height:18px;
}

p{
	margin:0;
}

h1{
	margin:0;
	overflow:hidden;
	text-overflow:ellipsis;
	line-height:1.2;
	text-align:center;
	font-size:42px;
	letter-spacing:2px;
	text-transform:uppercase;
	color:#8fe3ff;
	text-shadow:0 0 10px #2bd9ff,2px 2px 0 #001c3a;
	white-space:nowrap;
}

h2 {
	margin:0;
	font: 14px "Press Start 2P";
    letter-spacing: 1px;
}

h3 {
	margin: 0;
	font:22px "VT323",monospace;
}

img {
	width:100%;
}

.left {
	text-align:left;
}

.center {
	text-align:center;
}

.right {
	text-align:right;
}

.text-green{
	color:var(--green);
}

.text-yellow{
	color:var(--yellow);
}

.text-red{
	color:var(--red);
}

.wrap{
	display:grid;
	gap:clamp(10px, 2.4vw, 15px);
	padding:10px 10px 70px 10px;
	max-width:600px;
	margin:0 auto;
}

.box{
	box-shadow:
		0 0 0 2px #ff2ebd inset,
		0 0 0 8px rgba(255, 20, 180, .35) inset,
		0 18px 60px rgba(0,0,0,.65),
		0 0 36px rgba(255, 0, 200, .25);
	padding:14px 16px;
	border-radius:18px;
}

.two-col{
	display:grid;
	grid-template-columns: 1fr 1fr;
	gap:10px;
	justify-content:space-between;
	margin:0
}

table{
	width:100%;
	border-collapse:separate;
	border-spacing:0;
}

thead th{
	font-family:"Press Start 2P";
	font-size:11px;
	letter-spacing:1px;
	text-transform:uppercase;
	padding:12px 10px;
	text-align:center;
	background:#0f1530;
	color:#bfe7ff;
}

thead th:nth-child(2){
	text-align:left;
}

tbody td{
	font-family:"VT323",monospace;
	font-size:24px;
	padding:10px 10px;
	border-top:1px solid #1e2a52;
	text-align:center;
}

tbody td:nth-child(2){
	text-align:left;
}

tbody tr:nth-child(odd){
	background:rgba(255,255,255,0.02);
}

tbody tr:hover{
	background:rgba(43,217,255,0.06);
}

tbody tr:nth-child(1) td{
	color:#ffe082;
	text-shadow:0 0 8px #ffb900;
}

tbody tr:nth-child(2) td{
	color:#c9dafe;
}

tbody tr:nth-child(3) td{
	color:#a2ffd3;
}

.bottom-nav{
	position:fixed;
	left:50%;
	transform:translateX(-50%);
	bottom:0;
	width:100%;
	display:flex;
	justify-content:space-around;
	gap:6px;
	padding:8px 0 16px 0;
	background:rgba(8,10,30,.6);
	backdrop-filter:blur(6px);
	box-shadow:0 -1px 0 rgba(255,255,255,.06), 0 -10px 30px rgba(0,0,0,.35);
	z-index:900;
	max-width:600px;
}

.navbtn{
	flex:1;
	display:flex;
	flex-direction:column;
	align-items:center;
	gap:4px;
	background:none;
	border:0;
	color:#ffd86a;
	cursor:pointer;
	padding:6px 0;
	opacity:.7;
}
.navbtn svg{
	width:32px;
	height:32px;
	fill:#ffbf20;
	filter:drop-shadow(0 0 6px rgba(255,185,0,.35))

}
.navbtn.active{
	opacity:1;
}
.navbtn.active svg{
	transform:translateY(-1px);
	filter:drop-shadow(0 0 6px rgba(255, 185, 0, .8));
}

/* ===== Finitions ===== */
h1{
	background:linear-gradient(180deg,#fff 0%,#8fe3ff 55%,#ff7be0 100%);
	-webkit-background-clip:text;
	background-clip:text;
	color:transparent;
	text-shadow:none;
	filter:drop-shadow(0 0 10px rgba(43,217,255,.65)) drop-shadow(2px 2px 0 #001c3a);
}
.box{
	background:linear-gradient(180deg, rgba(43,12,74,.62), rgba(22,8,39,.72));
	backdrop-filter:blur(3px);
	-webkit-backdrop-filter:blur(3px);
}
.bottom-nav{
	border-radius:16px 16px 0 0;
	background:rgba(14,5,28,.82);
	box-shadow:0 -1px 0 rgba(255,46,189,.45), 0 -12px 30px rgba(0,0,0,.45);
}
.navbtn{ position:relative; transition:opacity .15s, transform .12s; }
.navbtn:active{ transform:scale(.9); }
.navbtn.active::after{
	content:"";
	position:absolute;
	bottom:-3px;
	width:26px;
	height:3px;
	border-radius:2px;
	background:var(--yellow);
	box-shadow:0 0 10px var(--yellow);
}
.quest,.trophy{ animation:rise-in .3s ease both; }
@keyframes rise-in{ from{ opacity:0; transform:translateY(8px); } }
@media (prefers-reduced-motion: reduce){ .quest,.trophy{ animation:none; } }
