:root {
	--sky-top: #67dff5;
	--sky-bottom: #b8f3ff;
	--grass: #68df72;
	--grass-light: #8aed75;
	--grass-dark: #38b95d;
	--coral: #ff5c7a;
	--coral-dark: #d93b62;
	--blue: #4d9cff;
	--blue-dark: #3074dc;
	--yellow: #ffd83d;
	--purple: #8758e9;
	--ink: #29254d;
	--muted: #696688;
	--cream: #fffaf0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.13) 25%, transparent 25%) 0 0 / 90px 90px,
        linear-gradient(315deg, rgba(65, 175, 224, 0.09) 25%, transparent 25%) 0 0 / 90px 90px,
        linear-gradient(180deg, var(--sky-top), var(--sky-bottom) 72%);
    color: var(--ink);
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

img,
svg {
    display: block;
    max-width: 100%;
}

#app {
    min-height: 100vh;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    display: none;
    position: fixed;
	z-index: 10000;
	inset: 0;
	overflow-y: auto;
	padding: 24px;
	color: var(--ink);
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.16) 25%, transparent 25%) 0 0 / 90px 90px,
		linear-gradient(315deg, rgba(217, 59, 98, 0.09) 25%, transparent 25%) 0 0 / 90px 90px,
		linear-gradient(180deg, #ff91a8, #ffd8df 72%);
	overscroll-behavior: contain;
}

#blazor-error-ui .blazor-error__layout {
	display: grid;
	min-height: calc(100svh - 48px);
	place-items: center;
}

#blazor-error-ui .blazor-error__card {
	display: grid;
	justify-items: center;
	width: min(100%, 430px);
	padding: 30px 28px 32px;
	border: 5px solid var(--ink);
	border-radius: 24px;
	background: rgba(255, 250, 240, 0.98);
	box-shadow: 0 9px 0 var(--coral), 0 15px 0 var(--ink), 0 26px 42px rgba(41, 37, 77, 0.28);
	text-align: center;
	animation: blazor-error-card-in 240ms ease-out both;
}

#blazor-error-ui .blazor-error__eyebrow {
	padding: 7px 12px;
	border: 3px solid var(--ink);
	border-radius: 999px;
	color: #ffffff;
	background: var(--coral);
	font-size: 0.68rem;
	font-weight: 950;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

#blazor-error-ui .blazor-error__icon {
	display: grid;
	width: 7rem;
	margin: 24px 0 20px;
	aspect-ratio: 1;
	border: 4px solid var(--ink);
	border-radius: 28px;
	color: #ffffff;
	background: var(--coral);
	box-shadow: 0 6px 0 var(--coral-dark), 0 10px 0 var(--ink);
	font-size: 4.2rem;
	font-weight: 1000;
	line-height: 1;
	place-items: center;
	transform: rotate(-3deg);
}

#blazor-error-ui .blazor-error__card > strong {
	max-width: 340px;
	font-size: clamp(1.65rem, 6vw, 2.15rem);
	font-weight: 1000;
	line-height: 1.05;
	letter-spacing: -0.035em;
}

#blazor-error-ui .blazor-error__message {
	max-width: 350px;
	margin-top: 12px;
	color: var(--muted);
	font-size: 0.9rem;
	font-weight: 800;
	line-height: 1.5;
}

#blazor-error-ui .reload {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 24px;
	padding: 13px 18px;
	border: 4px solid var(--ink);
	border-radius: 15px;
	color: var(--ink);
	background: var(--yellow);
	box-shadow: 0 6px 0 #d6a900, 0 10px 0 var(--ink);
	cursor: pointer;
	font-size: 0.82rem;
	font-weight: 1000;
	letter-spacing: 0.035em;
	text-decoration: none;
	text-transform: uppercase;
	transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

#blazor-error-ui .reload:hover {
	filter: saturate(1.08) brightness(1.03);
	transform: translateY(-2px);
}

#blazor-error-ui .reload:active {
	transform: translateY(5px);
	box-shadow: 0 1px 0 #d6a900, 0 4px 0 var(--ink);
}

#blazor-error-ui .reload:focus-visible {
	outline: 5px solid var(--purple);
	outline-offset: 4px;
}

#blazor-error-ui .dismiss {
	display: none;
}

@keyframes blazor-error-card-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.97);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* GameHub toast notifications */
#app .toast-host {
	z-index: 2000;
	gap: 12px;
	padding: 18px;
}

#app .toast-custom {
	min-width: 320px;
	max-width: min(420px, calc(100vw - 36px));
	padding: 15px 16px;
	border: 4px solid #29254d;
	border-left-width: 12px;
	border-radius: 16px;
	color: #29254d;
	background: #fffaf0;
	box-shadow: 0 7px 0 #696688, 0 11px 0 #29254d, 0 18px 26px rgba(41, 37, 77, 0.22);
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 850;
	line-height: 1.35;
}

#app .toast-custom:hover {
	transform: translateY(-3px) rotate(-0.25deg);
	box-shadow: 0 9px 0 #696688, 0 13px 0 #29254d, 0 22px 30px rgba(41, 37, 77, 0.26);
}

#app .toast-custom .message {
	padding-right: 14px;
}

#app .toast-custom-info {
	border-left-color: #4d9cff;
	background: #edf6ff;
	box-shadow: 0 7px 0 #3074dc, 0 11px 0 #29254d, 0 18px 26px rgba(41, 37, 77, 0.22);
}

#app .toast-custom-success {
	border-left-color: #68df72;
	background: #effff1;
	box-shadow: 0 7px 0 #38b95d, 0 11px 0 #29254d, 0 18px 26px rgba(41, 37, 77, 0.22);
}

#app .toast-custom-warning {
	border-left-color: #ffd83d;
	background: #fffbea;
	box-shadow: 0 7px 0 #e7a926, 0 11px 0 #29254d, 0 18px 26px rgba(41, 37, 77, 0.22);
}

#app .toast-custom-error {
	border-left-color: #ff5c7a;
	background: #fff2f5;
	box-shadow: 0 7px 0 #d93b62, 0 11px 0 #29254d, 0 18px 26px rgba(41, 37, 77, 0.22);
}

#app .toast-custom .custom-btn-close {
	display: grid;
	width: 31px;
	aspect-ratio: 1;
	padding: 0;
	border: 3px solid #29254d;
	border-radius: 9px;
	color: #29254d;
	background: rgba(255, 255, 255, 0.72);
	font-size: 1.1rem;
	line-height: 1;
	place-items: center;
}

#app .toast-custom .custom-btn-close:hover {
	color: #d93b62;
	background: #ffffff;
}

@media (max-width: 600px) {
	#app .toast-host.top-right {
		right: 0;
		left: 0;
		align-items: stretch;
		padding: 12px;
	}

	#app .toast-custom {
		width: 100%;
		min-width: 0;
		max-width: none;
	}
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.blazor-loading {
    display: grid;
    min-height: 100svh;
    padding: 24px;
    place-items: center;
}

.blazor-loading__card {
    display: grid;
    justify-items: center;
    width: min(100%, 390px);
    padding: 30px 28px 32px;
    border: 5px solid var(--ink);
    border-radius: 24px;
    background: rgba(255, 250, 240, 0.96);
    box-shadow: 0 9px 0 var(--purple), 0 15px 0 var(--ink), 0 26px 42px rgba(41, 37, 77, 0.22);
    text-align: center;
    animation: blazor-loading-card-in 240ms ease-out both;
}

.blazor-loading__eyebrow {
    padding: 7px 12px;
    border: 3px solid var(--ink);
    border-radius: 999px;
    background: var(--yellow);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.blazor-loading__indicator {
    display: grid;
    position: relative;
    width: 7rem;
    margin: 24px 0 20px;
    aspect-ratio: 1;
    border: 4px solid var(--ink);
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 6px 0 var(--blue-dark), 0 10px 0 var(--ink);
    place-items: center;
}

.loading-progress {
    display: block;
    width: 100%;
    height: 100%;
    animation: blazor-loading-progress-spin 1.8s linear infinite;
}

.loading-progress circle {
    fill: none;
    stroke: #dfeeff;
    stroke-width: 0.55rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--coral);
    stroke-linecap: round;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    inset: 0;
    display: grid;
    color: var(--ink);
    text-align: center;
    font-size: 0.86rem;
    font-weight: 1000;
    place-items: center;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Loading");
}

.blazor-loading__card > strong {
    font-size: 1.35rem;
    font-weight: 1000;
    letter-spacing: -0.025em;
}

.blazor-loading__message {
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

@keyframes blazor-loading-card-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes blazor-loading-progress-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    #blazor-error-ui .blazor-error__card,
    .blazor-loading__card,
    .loading-progress {
        animation: none;
    }

    #blazor-error-ui .reload {
        transition: none;
    }
}

code {
    color: #8758e9;
}
.page-sound-settings {
	position: absolute;
	z-index: 40;
	top: 24px;
	right: 28px;
}

.page-sound-settings:has(.sound-settings__backdrop),
.lobby-page__topbar:has(.sound-settings__backdrop),
.lobby-session-exit-action:has(.sound-settings__backdrop) {
	z-index: 100;
}
