@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
	--ghost-cyan: #00ffcc;
	--ghost-violet: #8a2be2;
}

body {
	background-color: #000;
	color: var(--ghost-cyan);
	font-family: 'Share Tech Mono', monospace;
	margin: 0;
	height: 100dvh;
	overflow: hidden;
	touch-action: none;
}

/* --- ブート画面のスタイリング --- */
#boot-screen {
	position: fixed;
	inset: 0;
	background: #000;
	z-index: 5000;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	color: var(--ghost-cyan);
	transition: opacity 1s ease-out;
}

.boot-container {
	text-align: center;
	width: 280px;
}

.radar-circle {
	margin: 0 auto 20px;
	border: 1px solid var(--ghost-cyan);
	border-radius: 50%;
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0% {
		transform: scale(1);
		opacity: 0.5;
	}

	50% {
		transform: scale(1.1);
		opacity: 1;
	}

	100% {
		transform: scale(1);
		opacity: 0.5;
	}
}

.boot-log {
	text-align: left;
	font-size: 11px;
	border-top: 1px solid rgba(0, 255, 204, 0.2);
	padding-top: 15px;
}

.boot-step {
	margin-bottom: 6px;
	display: flex;
	justify-content: space-between;
	opacity: 0.4;
}

.boot-step.active {
	opacity: 1;
	color: #fff;
	text-shadow: 0 0 8px var(--ghost-cyan);
}

.boot-step.done {
	opacity: 1;
	color: var(--ghost-violet);
}

/* --- メインUI --- */
#top-ad-area {
	position: fixed;
	top: 0;
	width: 100%;
	height: 60px;
	background: rgba(5, 5, 8, 0.9);
	border-bottom: 1px solid rgba(138, 43, 226, 0.3);
	z-index: 1000;
	display: flex;
	justify-content: center;
	align-items: center;
	padding-top: env(safe-area-inset-top);
}

#camera-stage {
	position: fixed;
	top: calc(60px + env(safe-area-inset-top));
	left: 0;
	width: 100vw;
	height: calc(100dvh - (60px + env(safe-area-inset-top)));
	background: #000;
}

video#input-video,
canvas#output-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

video#input-video {
	z-index: 1;
}

canvas#output-canvas {
	z-index: 5;
	pointer-events: none;
}

.hud-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 10;
	background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.05) 50%);
	background-size: 100% 4px;
	padding: 20px;
	padding-bottom: calc(20px + env(safe-area-inset-bottom));
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-sizing: border-box;
}

.btn-ghost {
	pointer-events: auto;
	border: 1px solid var(--ghost-cyan);
	padding: 12px 4px;
	background: rgba(0, 20, 20, 0.7);
	color: var(--ghost-cyan);
	font-size: 10px;
	text-transform: uppercase;
	text-align: center;
}

.entertainment-notice {
	font-size: 8px;
	opacity: 0.4;
	color: #fff;
	margin-top: 5px;
}

#overlay-screen {
	position: fixed;
	inset: 0;
	background: #000;
	z-index: 2000;
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.loading-bar {
	width: 200px;
	height: 2px;
	background: #111;
	margin-top: 20px;
	overflow: hidden;
}

.loading-fill {
	width: 100%;
	height: 100%;
	background: var(--ghost-violet);
	transform: translateX(-100%);
}

.animate-load {
	animation: load 2.5s forwards;
}

@keyframes load {
	100% {
		transform: translateX(0);
	}
}

#result-view {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.98);
	z-index: 3000;
	display: none;
	flex-direction: column;
	padding: 20px;
	align-items: center;
	padding-top: calc(20px + env(safe-area-inset-top));
	padding-bottom: calc(20px + env(safe-area-inset-bottom));
	overflow-y: auto;
}

#output-photo {
	width: 100%;
	max-width: 500px;
	border: 1px solid var(--ghost-violet);
	margin-bottom: 20px;
}

#adblock-shield {
	position: fixed;
	inset: 0;
	background: #000;
	z-index: 9999;
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 30px;
	text-align: center;
}
