/*闽云公司版权所有*/
:root {
	--bg: #0b0f14;
	--fg: #e6edf3;
	--muted: #9aa4ad;
	--accent: #3da9fc;
	--btn-bg: rgba(20, 25, 31, 0.7);
	--btn-border: rgba(255, 255, 255, 0.12);
}

* {
	box-sizing: border-box;
}

html, body, #app {
	height: 100%;
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
	overscroll-behavior: none;
 /* 阻止页面在拖拽时上下滚动 */
}
/* 让页面采用三行网格布局：头部 / 中间自适应 / 底部 */
#app {
	display: grid;
	grid-template-rows: auto 1fr auto;
}

.app-header, .app-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	gap: 8px;
}

.app-header h1 {
	font-size: 16px;
	margin: 0;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.upload-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: var(--btn-bg);
	border: 1px solid var(--btn-border);
	border-radius: 8px;
	color: var(--fg);
	cursor: pointer;
	user-select: none;
}

.upload-btn input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.viewer-wrap {
	position: relative;
  /* 让中间区域自适应高度，由网格的 1fr 控制 */
	min-height: 320px;
}

.viewer {
	position: absolute;
	inset: 0;
	touch-action: none;
 /* 将触摸事件交给全景交互处理，提升滑动顺畅度 */
}

/* 控件 */
.controls {
	position: absolute;
	left: 12px;
	top: 12px;
	display: flex;
	gap: 8px;
	z-index: 10;
}

.controls button {
	width: 40px;
	height: 40px;
	padding: 0;
	background: var(--btn-bg);
	border: 1px solid var(--btn-border);
	border-radius: 10px;
	color: var(--fg);
	font-size: 18px;
	cursor: pointer;
	transition: transform .12s ease, background .12s ease;
	-webkit-tap-highlight-color: transparent;
}

.controls button:hover {
	background: rgba(61, 169, 252, 0.18);
}

.controls button:active {
	transform: scale(0.96);
}

/* 页脚 */
.app-footer {
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	flex-wrap: wrap;
      /* 自动换行，避免挤不下 */
	gap: 6px 12px;
        /* 行间与列间距 */
	padding: 10px 14px;
   /* 与头部一致的内边距 */
	font-size: 12px;
	color: var(--muted);
	line-height: 1.4;
}

/* 电脑端（宽屏）居中显示页脚文字 */
@media (min-width: 769px) {
	.app-footer {
		justify-content: center;
		text-align: center;
	}
}

/* 响应式 */
@media (max-width: 768px) {
	.controls button {
		width: 44px;
		height: 44px;
		font-size: 20px;
	}

	.app-header h1 {
		font-size: 15px;
	}
}

@media (max-width: 420px) {
	.controls {
		gap: 6px;
		left: 10px;
		top: 10px;
	}

	.controls button {
		width: 42px;
		height: 42px;
		font-size: 18px;
		border-radius: 9px;
	}
}