/* ==========================================================================
   GravityDrumGallery27 – Styles
   ========================================================================== */

/* Container
   -------------------------------------------------------------------------- */
.gdg27-container {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #02050f;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
	font-family: 'Segoe UI', system-ui, sans-serif;
}
.gdg27-container:active { cursor: grabbing; }

.gdg27-canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
	position: absolute;
	top: 0; left: 0;
}

/* UI Overlay
   -------------------------------------------------------------------------- */
.gdg27-ui-overlay {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	pointer-events: none;
	z-index: 10;
}

/* Gravity Compass
   -------------------------------------------------------------------------- */
.gdg27-gravity-compass {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	pointer-events: none;
}
.compass-ring {
	fill: none;
	stroke: rgba(0,255,224,0.4);
	stroke-width: 1.5;
}
.compass-needle { fill: #00ffe0; }
.gdg27-floor-label {
	font-size: 10px;
	color: rgba(0,255,224,0.7);
	letter-spacing: 1px;
	text-transform: uppercase;
}

/* Speedrun Timer
   -------------------------------------------------------------------------- */
.gdg27-speedrun-timer {
	position: absolute;
	top: 14px;
	left: 14px;
	display: flex;
	align-items: center;
	gap: 6px;
	background: rgba(0,0,0,0.55);
	border: 1px solid rgba(0,255,224,0.3);
	border-radius: 4px;
	padding: 4px 10px;
	color: #00ffe0;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

/* Controls Hint
   -------------------------------------------------------------------------- */
.gdg27-controls-hint {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0,0,0,0.5);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 20px;
	padding: 5px 14px;
	color: rgba(255,255,255,0.55);
	font-size: 11px;
	white-space: nowrap;
	pointer-events: none;
	transition: opacity 1.5s;
}
.gdg27-container.gdg27-active .gdg27-controls-hint { opacity: 0; }

/* ============================================================
   Lightbox
   ============================================================ */
.gdg27-lightbox {
	position: absolute;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
}
.gdg27-lightbox-overlay {
	position: absolute;
	inset: 0;
	background: rgba(5,10,26,0.95);
	cursor: pointer;
}
.gdg27-lightbox-inner {
	position: relative;
	z-index: 101;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: min(92%, 900px);
	max-height: 92%;
	gap: 12px;
}

/* HUD corners */
.gdg27-lightbox-hud-corners {
	position: absolute;
	inset: -8px;
	pointer-events: none;
}
.hud-corner {
	position: absolute;
	width: 18px; height: 18px;
	border-color: #00ffe0;
	border-style: solid;
	opacity: 0.8;
}
.hud-corner.tl { top: 0; left: 0;   border-width: 2px 0 0 2px; }
.hud-corner.tr { top: 0; right: 0;  border-width: 2px 2px 0 0; }
.hud-corner.bl { bottom: 0; left: 0;  border-width: 0 0 2px 2px; }
.hud-corner.br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* HUD styles */
.gdg27-hud-cyberpunk .hud-corner {
	border-color: #ff00ff;
	box-shadow: 0 0 6px #ff00ff88;
}
.gdg27-hud-minimal .hud-corner { border-color: rgba(255,255,255,0.3); }

.gdg27-lightbox-close {
	position: absolute;
	top: -32px; right: -4px;
	background: transparent;
	border: 1px solid rgba(0,255,224,0.5);
	border-radius: 50%;
	color: #00ffe0;
	font-size: 14px;
	width: 28px; height: 28px;
	cursor: pointer;
	line-height: 1;
	transition: background 0.2s, color 0.2s;
	display: flex; align-items: center; justify-content: center;
}
.gdg27-lightbox-close:hover { background: #00ffe0; color: #02050f; }

.gdg27-lightbox-img-wrap {
	max-height: 65vh;
	overflow: hidden;
	border: 1px solid rgba(0,255,224,0.25);
}
.gdg27-lightbox-img {
	display: block;
	max-width: 100%;
	max-height: 65vh;
	object-fit: contain;
}

/* Lightbox Info */
.gdg27-lightbox-info {
	text-align: center;
	color: #fff;
}
.gdg27-lightbox-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #00ffe0;
	text-shadow: 0 0 8px rgba(0,255,224,0.5);
}
.gdg27-lightbox-level {
	font-size: 12px;
	color: rgba(255,255,255,0.5);
	letter-spacing: 1px;
}

/* Lightbox Bar */
.gdg27-lightbox-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
	width: 100%;
}
.gdg27-gravity-lock {
	background: rgba(0,0,0,0.5);
	border: 1px solid rgba(0,255,224,0.4);
	border-radius: 4px;
	color: #00ffe0;
	font-size: 12px;
	padding: 5px 12px;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}
.gdg27-gravity-lock:hover,
.gdg27-gravity-lock.locked { background: rgba(0,255,224,0.2); }

.gdg27-level-selector {
	display: flex;
	gap: 5px;
	flex-wrap: wrap;
	justify-content: center;
}
.gdg27-level-btn {
	background: rgba(0,0,0,0.6);
	border: 1px solid rgba(255,255,255,0.2);
	border-radius: 3px;
	color: rgba(255,255,255,0.7);
	font-size: 10px;
	padding: 3px 8px;
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s;
}
.gdg27-level-btn:hover,
.gdg27-level-btn.active {
	border-color: #00ffe0;
	color: #00ffe0;
}

/* Achievement Toast
   -------------------------------------------------------------------------- */
.gdg27-achievement {
	position: absolute;
	bottom: 60px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0,0,0,0.85);
	border: 1px solid rgba(255,200,0,0.6);
	border-radius: 6px;
	padding: 8px 18px;
	color: #ffd700;
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 8px;
	z-index: 50;
	pointer-events: none;
	animation: gdg27-toast-in 0.3s ease;
}
@keyframes gdg27-toast-in {
	from { opacity: 0; transform: translateX(-50%) translateY(12px); }
	to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Cyberpunk theme extras
   -------------------------------------------------------------------------- */
.gdg27-hud-cyberpunk .gdg27-gravity-compass .compass-ring { stroke: #ff00ff66; }
.gdg27-hud-cyberpunk .compass-needle                      { fill: #ff00ff; }
.gdg27-hud-cyberpunk .gdg27-floor-label                   { color: #ff00ff; }
.gdg27-hud-cyberpunk .gdg27-lightbox-title                { color: #ff00ff; text-shadow: 0 0 8px rgba(255,0,255,0.5); }

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
	.gdg27-controls-hint { font-size: 9px; padding: 4px 10px; }
	.gdg27-lightbox-title { font-size: 14px; }
	.gdg27-lightbox-close { top: -28px; }
	.gdg27-level-btn { font-size: 9px; padding: 2px 6px; }
}
