/* Local fonts (no render-blocking external @import) */
@font-face {
	font-family: "Space Mono";
	src: url(../font/SpaceMono.ttf);
	font-display: swap;
}

* {
	margin: 0;
	padding: 0;
}

body {
	background-color: #202124;
	color: #ffffff;
	font-family: "Space Mono", monospace;
	background-image: url("../img/galaxy-bg.webp");
	background-image: image-set(url("../img/galaxy-bg.webp") type("image/webp"), url("../img/galaxyAll.gif") type("image/gif"));
	background-size: cover;
}

.icons{
	position: absolute;
	margin: 2vmax;
	width: 2vmax;
	filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(350deg) brightness(102%) contrast(102%);
	opacity: 0.8;
	transition: 300ms;
}

.icons:hover{
	margin: 1.75vmax;
	width: 2.5vmax;
	opacity: 1;
}

.back{
	transform: rotate(180deg);
}

.user{
	right: 0;	
}

.container {
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	padding-top: 80px;
	box-sizing: border-box;
}

.form-wrapper {
	display: flex;
	justify-content: center;
	width: min(440px, calc(100vw - 32px));
	border-radius: 2vmin;
	box-shadow: 0 0 1.5vmax rgba(0, 0, 0, 0.2);
	background-color: #202124fa;
}

.form {
	text-align: center;
	width: 80%;
	padding-top: 2.5vmin;
	padding-bottom: 2.5vmin;
}

h1, h2 {
	font-size: 2em;
	color: rgba(0, 0, 0, 1);
	color: #fff;
    text-shadow: 0px 0px 5px #9700bd,
                0px 0px 3px #9700bd,
                0px 0px 2px #9700bd,
                0px 0px 8px #9700bd,
                0px 0px 10px #9700bd,
                0px 0px 15px #000000;
	text-shadow: none;
				text-align: center;
	margin-bottom: 5vmin;
}

label {
	text-align: left;
	
	font-size: 1.2em;
	font-weight: 600;
	color: #ffffffcf;
	margin-bottom: 1vmin;
	display: block;
}

input {
	border: none;
	margin-bottom: 2.5vmin;
	border-radius: 2vmin;
	background-color: #484b50;
	font-size: 1.1em;
	width: 90%;
	color: #ffffff;
	font-family: "Space Mono", monospace;
	padding: 1vmin;
}

input:focus {
	outline: none;
	background-color: #4d4f53;
}

#password-strength {
	margin-top: -2.5vmin;
	margin-bottom: 2.5vmin;
	font-size: 0.85em;
	transition: color 0.2s;
}

.pw-wrapper {
	position: relative;
	width: 100%;
}

.pw-wrapper input {
	padding-right: 45px !important;
}

.pw-toggle {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	color: #ffffffb3;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s, transform 0.2s;
	width: 24px;
	height: 24px;
	z-index: 2;
}

.pw-toggle:hover {
	color: #c93ff0;
	transform: translateY(-50%) scale(1.1);
}

.eye-icon {
	width: 20px;
	height: 20px;
}

/* ── Form field wrappers ─────────────────────────────── */


.form-control {
	margin-bottom: 2.5vmin;
	text-align: left;
}

.form-control input {
	margin-bottom: 0.4vmin;
	width: 100%;
	box-sizing: border-box;
	border: 2px solid transparent;
	transition: border-color 0.2s;
}

.form-control.error input {
	border-color: #ff5252;
	background-color: #3d2020;
}

.form-control.success input {
	border-color: #7bc043;
}

.error-text {
	display: block;
	font-size: 0.78em;
	color: #ff8080;
	min-height: 1em;
	margin-top: 0.2vmin;
}

/* ── Server alert banner ────────────────────────────── */

.alert-error {
	background-color: rgba(216, 0, 12, 0.15);
	border: 1px solid #ff5252;
	border-radius: 1vmin;
	color: #ff6b6b;
	font-size: 0.9em;
	margin-bottom: 2vmin;
	padding: 1vmin 1.5vmin;
	text-align: left;
}

/* ── Disabled submit button ─────────────────────────── */

button[type="submit"]:disabled {
	background-color: #4a4a4a;
	cursor: not-allowed;
	width: 100%;
	opacity: 0.7;
}

button[type="submit"] {
	margin-top: 1vmin;
	padding: 1vmin;
	border: 1px solid rgba(224, 123, 255, 0.35);
	border-radius: 2vmin;
	background: linear-gradient(180deg, #7c1d99 0%, #6b1681 60%, #57126a 100%);
	color: #ffffff;
	font-size: 1.2em;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 100%;
	font-family: "Space Mono", monospace;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.35);
}

button[type="submit"]:hover {
	background: linear-gradient(180deg, #9330ad 0%, #7c1d99 60%, #6b1681 100%);
	border-color: rgba(224, 123, 255, 0.6);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 14px rgba(151, 0, 189, 0.45);
	width: 95%;
}

button[type="submit"]:active {
	transform: scale(0.98);
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45);
}

#logout-btn{
	position: relative;
	left: 2vmin;
	margin-top: 1vmin;
	padding: 1vmin;
	border: none;
	border-radius: 2vmin;
	background-color: #5a5a5a;
	color: #ffffff;
	font-size: 1.2em;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 30%;
	font-family: "Space Mono", monospace;
}
#logout-btn:hover{
	background-color: lightgray;
	color: #000000;
}



form p{
	margin-top: 1vh;
	color: #ffffffaa;
}
form p a{
	text-decoration: underline;
	text-underline-offset: 2px;
	color: #7cc4ff;
	white-space: nowrap;
}

form p a:hover {
	color: #a8d8ff;
}
@media (min-width: 1400px) {
	.form-wrapper{
		width: 35vmax;
	}
}

@media (max-width: 768px) {
	.form-wrapper {
		padding: .5vmin;
	}

	h1, h2 {
		font-size: 1.8em;
	}

	input {
		font-size: 1.1em;
		padding: 1vmin;
	}

	label {
		font-size: 1.1em;
		margin-bottom: 1vmin;
	}

	button[type="submit"] {
		margin-top: 1vmin;
		font-size: 1.2em;
		padding: 1vmin;
	}


	.icons{
		position: absolute;
		margin: 3vmax;
		width: 4vmax;
		filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(350deg) brightness(102%) contrast(102%);
		opacity: 0.8;
		transition: 300ms;
	}
	
	.icons:hover{
		margin: 2.5vmax;
		width: 5vmax;
		opacity: 1;
	}
}

@font-face {
    font-family: space;
    src: url(../font/Space.ttf);
}

.game-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    box-sizing: border-box;
    z-index: 100;
    background: linear-gradient(180deg, rgba(32,33,36,0.85) 0%, rgba(32,33,36,0) 100%);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid rgba(151, 0, 189, 0.15);
}

.header-logo a {
    font-family: space, sans-serif;
    font-size: 2.2rem;
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 0 8px rgba(151, 0, 189, 0.6);
    transition: all 0.3s ease;
}

.header-logo a:hover {
    color: #d67bff;
    text-shadow: 0 0 12px #9700bd, 0 0 20px #9700bd;
}

.header-nav {
    display: flex;
    gap: 20px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(32, 33, 36, 0.6);
    border: 1px solid rgba(151, 0, 189, 0.4);
    border-radius: 8px;
    padding: 8px 16px;
    color: #ffffff;
    text-decoration: none;
    font-family: "Space Mono", monospace;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(151, 0, 189, 0.25);
    border-color: #9700bd;
    box-shadow: 0 0 10px rgba(151, 0, 189, 0.4);
    transform: translateY(-2px);
}

.nav-svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
/* ── v2 consistency overrides: align header/footer/utils with main theme ── */
.game-header {
    height: clamp(40px, 6vh, 60px);
    padding: 0 clamp(10px, 4vw, 40px);
    background: rgba(20, 20, 24, 0.75);
    border-bottom: 1px solid rgba(151, 0, 189, 0.2);
}

.header-logo a {
    font-size: clamp(1.2rem, 3.5vw, 2.2rem);
}

.header-nav {
    gap: clamp(10px, 2vw, 20px);
}

.nav-btn {
    font-size: clamp(0.75rem, 1.5vw, 0.95rem);
    padding: clamp(6px, 1.2vh, 10px) clamp(10px, 1.5vw, 16px);
}

.nav-btn:focus-visible,
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid #e07bff;
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-footer {
    position: absolute;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
    z-index: 5;
}

.site-footer nav {
    margin-bottom: 2px;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.site-footer a:hover {
    color: #e07bff;
    text-decoration: underline;
}

.noscript-note {
    margin-top: 16px;
    color: #ffd75e;
}

@media (max-width: 560px) {
    .nav-label {
        display: none;
    }

    .header-logo a {
        font-size: 1.1rem;
    }

    .nav-btn {
        padding: 6px 10px;
    }

    .container {
        padding-top: 70px;
    }

    .site-footer small {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-btn:hover {
        transform: none;
    }
}

/* main.container scrolls on short viewports instead of clipping the form */
main.container {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    padding-left: 16px;
    padding-right: 16px;
}

/* ── v2 exact-match: nav buttons identical to main theme ── */
.nav-btn {
    background: rgba(255, 255, 255, 0.08);
    gap: clamp(4px, 1vw, 8px);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-btn:hover {
    border-color: rgba(183, 0, 221, 0.95);
    box-shadow: 0 0 15px rgba(183, 0, 221, 0.5);
}

.nav-svg {
    width: clamp(12px, 2vw, 18px);
    height: clamp(12px, 2vw, 18px);
}

/* Collapsible wordmark (matches main theme) */
.logo-short {
    display: none;
}

@media (max-width: 640px) {
    .header-logo .logo-full {
        display: none;
    }

    .header-logo .logo-short {
        display: inline;
    }
}
