/* 全景图展示与管理平台 —— 后台样式（自己写的，不引用任何 CDN 或第三方资源） */

:root {
	--bg: #0f141b;
	--panel: #171e28;
	--panel-2: #1e2733;
	--line: #2a3543;
	--text: #e7edf5;
	--dim: #93a1b3;
	--accent: #3aa0ff;
	--ok: #35c37d;
	--warn: #f0b429;
	--danger: #ff6b6b;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 14px/1.6 "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #0b1016; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ------------------------------------------------------------------ 顶栏 */
.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 22px;
	background: #121924;
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 10;
}

.brand { font-weight: 700; font-size: 16px; color: var(--text); }
.topbar nav { display: flex; align-items: center; gap: 14px; }
.topbar .who { color: var(--dim); font-size: 13px; }
.topbar .who em { color: var(--accent); font-style: normal; margin-left: 4px; }
.inline { display: inline; }

main { max-width: 1080px; margin: 0 auto; padding: 22px 18px 60px; }
footer { text-align: center; color: var(--dim); font-size: 12px; padding: 24px 0 40px; }

/* ------------------------------------------------------------------ 通用 */
.card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 18px;
	margin-bottom: 18px;
}
.card.narrow { max-width: 420px; margin: 8vh auto; }
.card h1, .card h2 { margin: 0 0 12px; font-size: 16px; }
.head h1 { margin: 0 0 6px; font-size: 20px; }
.hint { color: var(--dim); font-size: 13px; }
.dim { color: var(--dim); }

label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 10px; }
label.check { display: flex; align-items: center; gap: 6px; color: var(--text); margin: 0; }
input[type=text], input[type=password], input:not([type]), select, textarea {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 8px 10px;
	background: #0d131b;
	color: var(--text);
	border: 1px solid var(--line);
	border-radius: 6px;
	font: inherit;
}
input.tiny, select.tiny { padding: 4px 6px; font-size: 12px; }
input:focus, select:focus { outline: none; border-color: var(--accent); }

button, .button {
	display: inline-block;
	padding: 8px 14px;
	background: var(--panel-2);
	color: var(--text);
	border: 1px solid var(--line);
	border-radius: 6px;
	font: inherit;
	cursor: pointer;
}
button:hover, .button:hover { border-color: var(--accent); text-decoration: none; }
button.primary, .primary.button { background: var(--accent); border-color: var(--accent); color: #04121f; font-weight: 600; }
button.danger { border-color: #5b2b2b; color: var(--danger); }
button.link { background: none; border: none; color: var(--accent); padding: 0; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.row.tight { gap: 6px; align-items: center; }
.row label { margin-bottom: 0; min-width: 160px; }
.row.tight label, .row.tight input, .row.tight select { min-width: 0; }
.row.tight input { width: 130px; }
.stack label { margin-bottom: 12px; }
.stack button { width: 100%; }

/* 设置页：勾选项 + 链接按钮 + 状态色 */
label.check { display: flex; gap: 10px; align-items: flex-start; }
label.check input { width: auto; margin-top: 3px; }
label.check em { display: block; font-style: normal; line-height: 1.6; margin-top: 2px; }
.stack em { display: block; font-style: normal; line-height: 1.6; margin-top: 2px; }
.stack .row { align-items: center; }
.stack .row button { width: auto; padding: 9px 18px; }
a.button {
	display: inline-block;
	padding: 9px 16px;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: var(--panel-2);
	color: var(--text);
	text-decoration: none;
	font-size: 13px;
}
a.button:hover { border-color: var(--accent); text-decoration: none; }
strong.ok { color: var(--ok); }
strong.warn { color: var(--warn); }

.flash {
	background: #16324a;
	border: 1px solid #2a5d84;
	color: #d9ecff;
	padding: 10px 14px;
	border-radius: 8px;
	margin-bottom: 16px;
}

.badge {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 999px;
	font-size: 12px;
	background: var(--panel-2);
	border: 1px solid var(--line);
}
.badge.ready { color: var(--ok); border-color: #245c41; }
.badge.publishing { color: var(--warn); border-color: #6a5216; }
.badge.failed { color: var(--danger); border-color: #6b2b2b; }
.badge.warn { color: var(--warn); }

/* ------------------------------------------------------------------ 表格 */
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th, table.list td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.list th { color: var(--dim); font-weight: 500; }
table.list tr:hover td { background: #131a24; }
td.actions { display: flex; gap: 6px; }
td.actions form { display: inline; }

/* ------------------------------------------------------------------ 前台 */
.hero { padding: 34px 0 18px; }
.hero h1 { margin: 0 0 8px; font-size: 26px; }
.hero p { color: var(--dim); margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tile {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 10px;
	overflow: hidden;
	color: var(--text);
	transition: transform 0.15s, border-color 0.15s;
}
.tile:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.tile .thumb { aspect-ratio: 16 / 9; background: #0b1016; display: flex; align-items: center; justify-content: center; }
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .placeholder { color: var(--dim); font-size: 12px; }
.tile .meta { padding: 10px 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tile .meta span { color: var(--dim); font-size: 12px; }

/* ------------------------------------------------------------------ 上传 */
.drop {
	border: 2px dashed var(--line);
	border-radius: 10px;
	padding: 26px;
	text-align: center;
	color: var(--dim);
	transition: border-color 0.15s, background 0.15s;
}
.drop.over { border-color: var(--accent); background: #12202e; color: var(--text); }
.queue { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.queue-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.queue-item .name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item progress { width: 220px; height: 8px; }
.queue-item .pct { color: var(--dim); min-width: 90px; text-align: right; }
.queue-item.done .pct { color: var(--ok); }
.queue-item.failed .pct { color: var(--danger); }

.log {
	background: #0b1016;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 12px;
	max-height: 320px;
	overflow: auto;
	font: 12px/1.5 Consolas, "Courier New", monospace;
	white-space: pre-wrap;
	color: #cfe3ff;
}

@media (max-width: 720px) {
	table.list { display: block; overflow-x: auto; }
	.row label { min-width: 100%; }
}
