Files
douyin_guaji-main/webui/styles.css
T

547 lines
11 KiB
CSS

:root {
--bg: #f6f7fb;
--card: #ffffff;
--card2: #fbfcfe;
--border: #e6e8ef;
--text: #111827;
--muted: #6b7280;
--primary: #2563eb;
--danger: #dc2626;
--shadow: 0 12px 30px rgba(17,24,39,0.08);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
margin: 0;
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
background: radial-gradient(1200px 600px at 18% 10%, rgba(37,99,235,0.10), transparent 55%),
radial-gradient(900px 520px at 82% 16%, rgba(220,38,38,0.07), transparent 60%),
var(--bg);
color: var(--text);
}
.app { max-width: 1360px; margin: 0 auto; padding: 16px; }
.header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 12px 14px;
border: 1px solid var(--border);
background: linear-gradient(180deg, var(--card2), var(--card));
border-radius: 14px;
box-shadow: var(--shadow);
}
.title { font-size: 19px; font-weight: 700; letter-spacing: 0.2px; }
.subtitle { font-size: 13px; color: var(--muted); margin-top: 4px; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.grid {
margin-top: 14px;
display: flex;
flex-direction: column;
gap: 12px;
}
.cardLog { order: 0; }
.cardShot { order: 1; }
.cardConfig { order: 2; }
/* 关键:避免日志超长行撑爆 grid 导致页面变形 */
.grid > * { min-width: 0; }
.card {
border: 1px solid var(--border);
background: linear-gradient(180deg, var(--card2), var(--card));
border-radius: 14px;
padding: 12px;
min-height: 520px;
box-shadow: var(--shadow);
min-width: 0;
}
.cardScroll { max-height: calc(100vh - 132px); overflow: auto; }
.configLayout {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: auto minmax(0, 1fr);
gap: 12px;
margin-top: 10px;
}
.sideNav {
border: 1px solid var(--border);
border-radius: 14px;
background: var(--card);
padding: 8px;
display: flex;
flex-direction: row;
gap: 8px;
position: relative;
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
}
@supports ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))) {
.sideNav {
background: rgba(255,255,255,0.78);
-webkit-backdrop-filter: blur(6px);
backdrop-filter: blur(6px);
}
}
.tabBtn {
border: 1px solid transparent;
background: transparent;
color: rgba(17,24,39,0.78);
border-radius: 12px;
padding: 8px 10px;
font-weight: 700;
cursor: pointer;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
gap: 6px;
min-height: 40px;
flex: 0 0 auto;
}
.tabText { font-size: 12px; line-height: 1; }
.tabBtn:hover { background: #eef2ff; color: rgba(17,24,39,0.92); }
.tabBtn.active {
background: #eaf0ff;
color: rgba(17,24,39,0.92);
border-color: rgba(37,99,235,0.30);
box-shadow: 0 6px 16px rgba(37,99,235,0.10);
}
.tabIcon {
width: 18px;
height: 18px;
display: inline-flex;
color: rgba(37,99,235,0.85);
}
.tabIcon svg { width: 18px; height: 18px; }
.panels { min-width: 0; }
.panel { padding-top: 2px; }
.panel[hidden] { display: none; }
.cardTitle {
font-weight: 700;
margin-bottom: 12px;
font-size: 13px;
color: rgba(17,24,39,0.88);
display: flex;
align-items: center;
gap: 8px;
}
.sectionTitle {
margin: 14px 0 8px;
font-weight: 700;
font-size: 12px;
color: rgba(17,24,39,0.78);
display: flex;
align-items: center;
gap: 8px;
}
.sectionIcon {
width: 18px;
height: 18px;
color: #6b7280;
display: inline-flex;
}
.sectionIcon svg { width: 18px; height: 18px; }
.row { margin-bottom: 10px; }
.label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.input {
width: 100%;
padding: 10px 12px;
border-radius: 10px;
border: 1px solid var(--border);
background: #ffffff;
color: var(--text);
outline: none;
font-size: 13px;
line-height: 1.35;
}
.input:focus { border-color: rgba(37,99,235,0.65); box-shadow: 0 0 0 3px rgba(37,99,235,0.16); }
.textarea { resize: vertical; min-height: 110px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.rowActions { display: flex; gap: 10px; flex-wrap: wrap; }
.rowActions .btn { flex: 1 1 140px; }
.btn {
padding: 10px 12px;
border-radius: 10px;
border: 1px solid var(--border);
background: #f3f4f6;
color: var(--text);
cursor: pointer;
font-weight: 600;
display: inline-flex;
align-items: center;
gap: 8px;
font-size: 13px;
}
.btn:hover { background: #e9edf3; }
.btn:active { transform: translateY(1px); }
.btnPrimary { background: var(--primary); border-color: rgba(37,99,235,0.65); color: #ffffff; }
.btnPrimary:hover { filter: brightness(0.96); }
.btnDanger { background: var(--danger); border-color: rgba(220,38,38,0.55); color: #ffffff; }
.btnDanger:hover { filter: brightness(0.96); }
.btnIcon {
width: 18px;
height: 18px;
display: inline-flex;
}
.btnIcon svg { width: 18px; height: 18px; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.log {
height: 100%;
/* 增大日志面板的初始可视高度,便于桌面端查看更多行为日志 */
min-height: 700px;
/* 最大高度使用视窗计算,避免在超大屏幕下被限制得太短 */
max-height: calc(100vh - 120px);
overflow: auto;
margin: 0;
padding: 10px;
border-radius: 10px;
border: 1px solid var(--border);
background: #0b1220;
color: rgba(255,255,255,0.92);
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
font-size: 13px;
line-height: 1.55;
min-width: 0;
max-width: 100%;
}
/* 双日志面板布局与搜索框样式 */
.logRow { display: flex; gap: 12px; }
.logSection { flex: 1 1 0; display: flex; flex-direction: column; }
.logHeader { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.logTitle { font-weight:600; color:var(--text); }
.logHeaderActions { display:flex; gap:8px; align-items:center; }
.logSearchBox { border:1px solid var(--border); padding:6px 8px; border-radius:4px; min-width:220px; background:var(--card); color:var(--text); }
.logSearchBox:focus { outline:2px solid rgba(37,99,235,0.12); }
.btn.small { padding:4px 8px; font-size:12px; }
.preview {
border: 1px solid var(--border);
background: #f3f4f6;
border-radius: 12px;
padding: 8px;
height: 260px;
display: flex;
align-items: center;
justify-content: center;
}
.cardShot .preview {
height: min(520px, 60vh);
}
/* 移除旧的 stickyBar(开始运行已在顶部栏) */
.preview img {
max-width: 100%;
max-height: 100%;
border-radius: 8px;
}
@media (max-width: 980px) {
.grid { flex-direction: column; }
.card { min-height: unset; }
.log { min-height: 360px; }
.configLayout { grid-template-columns: 1fr; }
.sideNav { position: static; flex-wrap: nowrap; }
}
@media (max-width: 520px) {
.app { padding: 12px; }
.header-actions { gap: 8px; }
.btn { padding: 9px 10px; }
}
.grid2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.grid3 {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 10px;
}
.inline2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.check {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 10px;
border: 1px solid var(--border);
border-radius: 10px;
background: #ffffff;
}
.statsGrid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.stat {
border: 1px solid var(--border);
background: linear-gradient(180deg, var(--card2), var(--card));
border-radius: 12px;
padding: 10px;
min-width: 0;
}
.statLabel {
font-size: 11px;
color: var(--muted);
margin-bottom: 6px;
}
.statValue {
font-weight: 800;
font-size: 14px;
color: rgba(17,24,39,0.92);
}
.statHint {
margin-top: 6px;
font-size: 11px;
color: var(--muted);
}
.chartsGrid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
@media (max-width: 980px) {
.chartsGrid { grid-template-columns: 1fr; }
}
.chartBlock {
border: 1px solid var(--border);
border-radius: 14px;
background: linear-gradient(180deg, var(--card2), var(--card));
padding: 12px;
box-shadow: var(--shadow);
}
.chartTitle {
font-weight: 800;
font-size: 12px;
color: rgba(17,24,39,0.88);
margin-bottom: 10px;
}
.chart {
width: 100%;
min-height: 140px;
min-width: 0;
}
.barRow {
display: flex;
align-items: center;
gap: 10px;
margin: 8px 0;
}
.barLabel {
width: 190px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: rgba(17,24,39,0.78);
font-size: 12px;
}
.barTrack {
flex: 1;
height: 10px;
border-radius: 999px;
background: #ffffff;
border: 1px solid var(--border);
overflow: hidden;
}
.barFill {
height: 100%;
width: 0%;
background: rgba(37,99,235,0.22);
}
.barValue {
width: 70px;
text-align: right;
font-variant-numeric: tabular-nums;
color: rgba(17,24,39,0.85);
font-size: 12px;
}
.table {
border: 1px solid var(--border);
border-radius: 14px;
overflow: hidden;
background: #ffffff;
box-shadow: var(--shadow);
}
.tableRow {
display: grid;
grid-template-columns: 170px 1fr 100px;
gap: 12px;
padding: 10px 12px;
border-top: 1px solid var(--border);
align-items: center;
}
.tableRow:first-child { border-top: none; }
.tableHead {
font-weight: 800;
background: #f8fafc;
}
.mono {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 12px;
color: rgba(17,24,39,0.75);
}
/* 预约队列样式 */
.cardReservations { order: 1.5; }
.reservationsContent {
margin-top: 12px;
}
.reservationsInfo {
padding: 12px;
background: #f8fafc;
border-radius: 8px;
margin-bottom: 16px;
border: 1px solid var(--border);
}
.reservationsInfo > div {
margin: 6px 0;
font-size: 14px;
}
.reservationsInfo strong {
font-weight: 600;
color: var(--text);
}
.reservationsList {
display: flex;
flex-direction: row; /* 横向排列 */
gap: 12px;
align-items: flex-start;
/* 横向滚动,垂直方向固定高度以便卡片一致 */
max-height: 320px;
overflow-x: auto;
overflow-y: hidden;
padding-bottom: 6px;
-webkit-overflow-scrolling: touch;
}
/* 每个项固定最小宽度,横向排列时按卡片显示 */
.reservationItem {
flex: 0 0 320px;
min-width: 280px;
}
.reservationItem {
border: 1px solid var(--border);
border-radius: 10px;
padding: 12px;
background: linear-gradient(135deg, rgba(37,99,235,0.03), rgba(255,255,255,0.8));
transition: all 0.2s;
}
.reservationItem:hover {
box-shadow: 0 4px 12px rgba(37,99,235,0.1);
transform: translateY(-2px);
}
.reservationHeader {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
padding-bottom: 8px;
border-bottom: 1px solid var(--border);
}
.reservationIndex {
font-size: 15px;
font-weight: 700;
color: var(--primary);
}
.reservationValue {
font-size: 16px;
font-weight: 700;
color: #dc2626;
}
.reservationBody {
font-size: 13px;
line-height: 1.8;
}
.reservationBody > div {
margin: 4px 0;
}
.reservationBody strong {
font-weight: 600;
color: var(--muted);
min-width: 80px;
display: inline-block;
}