Files
Toolbox/public/tools/zen_box/zen_box.css
T

809 lines
19 KiB
CSS

:root {
--bg-deep: #060612;
--bg-mid: #0a0a1e;
--surface: rgba(255,255,255,0.06);
--surface2: rgba(255,255,255,0.10);
--border: rgba(255,255,255,0.08);
--gold: #e8b86d;
--gold-dim: #a07840;
--gold-glow: rgba(232,184,109,0.15);
--gold-soft: rgba(232,184,109,0.08);
--text: #e8e6f0;
--text-dim: #7a7890;
--safe-top: env(safe-area-inset-top, 0px);
--safe-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
height: 100%;
background: var(--bg-deep);
color: var(--text);
font-family: -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
-webkit-tap-highlight-color: transparent;
overscroll-behavior: none;
overflow: hidden;
user-select: none;
}
.starfield {
position: fixed;
inset: 0;
z-index: 0;
overflow: hidden;
background: radial-gradient(ellipse at 50% 40%, #0d0d2b 0%, #080818 40%, #050510 70%, #030308 100%);
}
.starfield::before {
content: '';
position: absolute;
width: 300px; height: 300px;
top: 28%; left: 50%;
transform: translate(-50%, -50%);
background: radial-gradient(circle, rgba(232,184,109,0.04) 0%, transparent 70%);
border-radius: 50%;
pointer-events: none;
}
.stars-sm, .stars-md, .stars-lg {
position: absolute;
inset: 0;
border-radius: 50%;
}
.stars-sm {
width: 1px; height: 1px;
background: transparent;
box-shadow:
12px 45px 0 0.5px rgba(255,255,255,0.22),
78px 120px 0 0.5px rgba(255,255,255,0.18),
145px 30px 0 0.5px rgba(255,255,255,0.26),
200px 88px 0 0.5px rgba(255,255,255,0.16),
260px 155px 0 0.5px rgba(255,255,255,0.20),
310px 22px 0 0.5px rgba(255,255,255,0.24),
55px 210px 0 0.5px rgba(255,255,255,0.14),
180px 260px 0 0.5px rgba(255,255,255,0.18),
340px 95px 0 0.5px rgba(255,255,255,0.22),
30px 310px 0 0.5px rgba(255,255,255,0.16),
120px 340px 0 0.5px rgba(255,255,255,0.20),
225px 180px 0 0.5px rgba(255,255,255,0.14),
290px 280px 0 0.5px rgba(255,255,255,0.18),
370px 40px 0 0.5px rgba(255,255,255,0.22),
95px 140px 0 0.5px rgba(255,255,255,0.17),
350px 200px 0 0.5px rgba(255,255,255,0.15),
160px 70px 0 0.5px rgba(255,255,255,0.24),
240px 320px 0 0.5px rgba(255,255,255,0.19),
40px 380px 0 0.5px rgba(255,255,255,0.14),
300px 360px 0 0.5px rgba(255,255,255,0.21),
190px 400px 0 0.5px rgba(255,255,255,0.16),
70px 450px 0 0.5px rgba(255,255,255,0.18),
330px 420px 0 0.5px rgba(255,255,255,0.14),
250px 470px 0 0.5px rgba(255,255,255,0.20),
140px 500px 0 0.5px rgba(255,255,255,0.17),
20px 540px 0 0.5px rgba(255,255,255,0.22),
200px 560px 0 0.5px rgba(255,255,255,0.15),
310px 550px 0 0.5px rgba(255,255,255,0.19),
100px 580px 0 0.5px rgba(255,255,255,0.14),
360px 580px 0 0.5px rgba(255,255,255,0.18),
410px 55px 0 0.5px rgba(255,255,255,0.16),
440px 140px 0 0.5px rgba(255,255,255,0.20),
390px 250px 0 0.5px rgba(255,255,255,0.14),
420px 330px 0 0.5px rgba(255,255,255,0.18),
460px 75px 0 0.5px rgba(255,255,255,0.22),
470px 200px 0 0.5px rgba(255,255,255,0.15),
450px 390px 0 0.5px rgba(255,255,255,0.16),
430px 470px 0 0.5px rgba(255,255,255,0.20),
400px 600px 0 0.5px rgba(255,255,255,0.14),
8px 8px 0 0.5px rgba(255,255,255,0.12),
110px 12px 0 0.5px rgba(255,255,255,0.14),
230px 6px 0 0.5px rgba(255,255,255,0.10),
355px 14px 0 0.5px rgba(255,255,255,0.13),
460px 10px 0 0.5px rgba(255,255,255,0.11),
50px 680px 0 0.5px rgba(255,255,255,0.12),
180px 720px 0 0.5px rgba(255,255,255,0.14),
290px 700px 0 0.5px rgba(255,255,255,0.10),
380px 740px 0 0.5px rgba(255,255,255,0.13),
440px 680px 0 0.5px rgba(255,255,255,0.11),
150px 800px 0 0.5px rgba(255,255,255,0.10),
330px 820px 0 0.5px rgba(255,255,255,0.12);
animation: twinkle-sm 6s ease-in-out infinite alternate;
}
.stars-md {
width: 1.5px; height: 1.5px;
background: transparent;
box-shadow:
50px 80px 0 0.5px rgba(255,255,255,0.32),
170px 150px 0 0.5px rgba(255,255,255,0.28),
280px 60px 0 0.5px rgba(255,255,255,0.35),
350px 130px 0 0.5px rgba(255,255,255,0.26),
90px 250px 0 0.5px rgba(255,255,255,0.30),
220px 300px 0 0.5px rgba(255,255,255,0.24),
320px 230px 0 0.5px rgba(255,255,255,0.32),
40px 350px 0 0.5px rgba(255,255,255,0.28),
150px 420px 0 0.5px rgba(255,255,255,0.26),
270px 380px 0 0.5px rgba(255,255,255,0.34),
110px 490px 0 0.5px rgba(255,255,255,0.30),
340px 460px 0 0.5px rgba(255,255,255,0.28),
200px 520px 0 0.5px rgba(255,255,255,0.24),
60px 600px 0 0.5px rgba(255,255,255,0.32),
300px 620px 0 0.5px rgba(255,255,255,0.26),
405px 90px 0 0.5px rgba(255,255,255,0.28),
445px 210px 0 0.5px rgba(255,255,255,0.24),
415px 360px 0 0.5px rgba(255,255,255,0.30),
460px 480px 0 0.5px rgba(255,255,255,0.22),
435px 580px 0 0.5px rgba(255,255,255,0.26),
80px 660px 0 0.5px rgba(255,255,255,0.24),
240px 690px 0 0.5px rgba(255,255,255,0.28),
370px 670px 0 0.5px rgba(255,255,255,0.22),
130px 760px 0 0.5px rgba(255,255,255,0.20),
310px 780px 0 0.5px rgba(255,255,255,0.24);
animation: twinkle-md 8s ease-in-out infinite alternate;
}
.stars-lg {
width: 2px; height: 2px;
background: transparent;
box-shadow:
130px 100px 0 0.5px rgba(232,184,109,0.32),
300px 170px 0 0.5px rgba(255,255,255,0.42),
70px 300px 0 0.5px rgba(232,184,109,0.22),
250px 400px 0 0.5px rgba(255,255,255,0.38),
360px 350px 0 0.5px rgba(232,184,109,0.28),
180px 550px 0 0.5px rgba(255,255,255,0.36),
330px 530px 0 0.5px rgba(232,184,109,0.20),
420px 160px 0 0.5px rgba(255,255,255,0.38),
455px 320px 0 0.5px rgba(232,184,109,0.24),
410px 500px 0 0.5px rgba(255,255,255,0.34),
100px 650px 0 0.5px rgba(232,184,109,0.18),
280px 700px 0 0.5px rgba(255,255,255,0.32),
400px 660px 0 0.5px rgba(232,184,109,0.20);
animation: twinkle-lg 10s ease-in-out infinite alternate;
}
@keyframes twinkle-sm { 0% { opacity: 0.6; } 100% { opacity: 1; } }
@keyframes twinkle-md { 0% { opacity: 0.7; } 100% { opacity: 1; } }
@keyframes twinkle-lg { 0% { opacity: 0.5; } 100% { opacity: 1; } }
.app {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
height: 100dvh;
max-width: 480px;
margin: 0 auto;
}
.header {
padding: 16px 20px 8px;
padding-top: calc(12px + var(--safe-top));
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
position: relative;
z-index: 10;
}
.header-title {
font-size: 20px;
font-weight: 600;
letter-spacing: 0.06em;
color: var(--text);
display: flex;
align-items: center;
gap: 8px;
}
.header-title span { color: var(--gold); }
.header-icon {
width: 24px; height: 24px;
flex-shrink: 0;
}
.header-count {
font-size: 13px;
color: var(--text-dim);
}
.zen-center {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
position: relative;
padding: 0 20px;
min-height: 0;
}
.orbit-wrap {
position: relative;
width: 220px;
height: 220px;
display: flex;
align-items: center;
justify-content: center;
}
.orbit-ring {
position: absolute;
inset: 0;
border-radius: 50%;
border: 1px solid rgba(232,184,109,0.12);
animation: orbit-spin 30s linear infinite;
animation-play-state: running;
}
.orbit-ring-2 {
position: absolute;
inset: -18px;
border-radius: 50%;
border: 1px solid rgba(232,184,109,0.06);
animation: orbit-spin 45s linear infinite reverse;
}
.orbit-dot-1 {
position: absolute;
width: 6px; height: 6px;
border-radius: 50%;
background: var(--gold);
opacity: 0.55;
box-shadow: 0 0 8px rgba(232,184,109,0.5);
top: calc(50% - 110px - 3px);
left: calc(50% - 3px);
transform-origin: 3px calc(110px + 3px);
animation: orbit-spin 30s linear infinite;
}
.orbit-dot-2 {
position: absolute;
width: 4px; height: 4px;
border-radius: 50%;
background: var(--gold);
opacity: 0.30;
box-shadow: 0 0 6px rgba(232,184,109,0.3);
top: calc(50% + 128px - 2px);
left: calc(50% - 2px);
transform-origin: 2px calc(-128px + 2px);
animation: orbit-spin 45s linear infinite reverse;
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.zen-glow {
position: absolute;
width: 160px; height: 160px;
border-radius: 50%;
background: radial-gradient(circle, var(--gold-soft) 0%, transparent 70%);
opacity: 0;
transition: opacity 1.2s ease;
pointer-events: none;
}
.zen-glow.active {
opacity: 1;
animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse {
0%, 100% { transform: scale(1); opacity: 0.8; }
50% { transform: scale(1.15); opacity: 1; }
}
.zen-figure {
position: relative;
z-index: 2;
width: 140px;
height: 140px;
display: flex;
align-items: center;
justify-content: center;
}
.zen-figure svg {
width: 100%;
height: 100%;
filter: drop-shadow(0 0 20px rgba(232,184,109,0.15));
}
.zen-waves {
position: absolute;
inset: -10px;
pointer-events: none;
z-index: 1;
}
.zen-wave {
position: absolute;
top: 50%; left: 50%;
transform: translate(-50%, -50%);
border-radius: 50%;
border: 1px solid rgba(232,184,109,0.08);
opacity: 0;
pointer-events: none;
}
.zen-wave.active {
animation: wave-expand 3s ease-out infinite;
}
.zen-wave:nth-child(1) { width: 160px; height: 160px; animation-delay: 0s; }
.zen-wave:nth-child(2) { width: 160px; height: 160px; animation-delay: 1s; }
.zen-wave:nth-child(3) { width: 160px; height: 160px; animation-delay: 2s; }
@keyframes wave-expand {
0% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}
.track-info {
text-align: center;
padding: 0 20px;
flex-shrink: 0;
position: relative;
z-index: 10;
}
.track-title {
font-size: 17px;
font-weight: 600;
color: var(--text);
margin-bottom: 3px;
}
.track-artist {
font-size: 13px;
color: var(--text-dim);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.bottom-bar {
flex-shrink: 0;
padding: 12px 20px;
padding-bottom: calc(12px + var(--safe-bottom));
position: relative;
z-index: 20;
}
.glass-bar {
background: rgba(10,10,30,0.65);
backdrop-filter: blur(24px) saturate(1.2);
-webkit-backdrop-filter: blur(24px) saturate(1.2);
border: 1px solid var(--border);
border-radius: 20px;
padding: 14px 18px 16px;
}
.progress-wrap {
display: flex;
flex-direction: column;
gap: 5px;
margin-bottom: 12px;
}
.progress-bar {
-webkit-appearance: none;
appearance: none;
width: 100%;
height: 3px;
background: rgba(255,255,255,0.10);
border-radius: 2px;
outline: none;
cursor: pointer;
}
.progress-bar::-webkit-slider-thumb {
-webkit-appearance: none;
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--gold);
cursor: pointer;
box-shadow: 0 0 8px rgba(232,184,109,0.4);
}
.progress-bar::-webkit-slider-runnable-track {
height: 3px;
border-radius: 2px;
}
.time-row {
display: flex;
justify-content: space-between;
font-size: 11px;
color: var(--text-dim);
font-variant-numeric: tabular-nums;
}
.controls {
display: flex;
align-items: center;
justify-content: center;
gap: 24px;
}
.ctrl-btn {
border: none;
background: none;
color: var(--text-dim);
cursor: pointer;
padding: 8px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: color 0.15s, transform 0.1s;
-webkit-tap-highlight-color: transparent;
}
.ctrl-btn:active { transform: scale(0.9); }
.ctrl-btn.active-mode { color: var(--gold); }
.ctrl-btn svg { display: block; }
.play-btn {
width: 52px;
height: 52px;
min-width: 52px;
min-height: 52px;
flex-shrink: 0;
border-radius: 50%;
background: var(--gold);
color: var(--bg-deep);
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.15s, box-shadow 0.3s;
box-shadow: 0 0 20px rgba(232,184,109,0.25);
-webkit-tap-highlight-color: transparent;
position: relative;
overflow: hidden;
}
.play-btn:active { transform: scale(0.94); }
.play-btn::after {
content: '';
position: absolute;
inset: -4px;
border-radius: 50%;
border: 1px solid rgba(232,184,109,0.2);
pointer-events: none;
}
.secondary-controls {
display: flex;
align-items: center;
justify-content: center;
gap: 20px;
margin-top: 10px;
}
.sec-btn {
border: none;
background: none;
color: var(--text-dim);
cursor: pointer;
padding: 6px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: color 0.15s;
-webkit-tap-highlight-color: transparent;
}
.sec-btn:active { opacity: 0.6; }
.sec-btn.active-mode { color: var(--gold); }
.sheet-overlay {
position: fixed;
inset: 0;
z-index: 50;
background: rgba(0,0,0,0.5);
opacity: 0;
visibility: hidden;
transition: opacity 0.3s, visibility 0.3s;
}
.sheet-overlay.open {
opacity: 1;
visibility: visible;
}
.sheet {
position: fixed;
bottom: 0;
left: 50%;
transform: translateX(-50%) translateY(100%);
width: 100%;
max-width: 480px;
max-height: 70dvh;
z-index: 51;
background: rgba(12,12,30,0.85);
backdrop-filter: blur(30px) saturate(1.3);
-webkit-backdrop-filter: blur(30px) saturate(1.3);
border-top: 1px solid var(--border);
border-radius: 20px 20px 0 0;
transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
display: flex;
flex-direction: column;
}
.sheet.open {
transform: translateX(-50%) translateY(0);
}
.sheet-handle {
width: 36px;
height: 4px;
background: rgba(255,255,255,0.2);
border-radius: 2px;
margin: 10px auto 6px;
flex-shrink: 0;
}
.sheet-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 4px 20px 12px;
flex-shrink: 0;
}
.sheet-title {
font-size: 16px;
font-weight: 600;
color: var(--text);
}
.sheet-close {
border: none;
background: none;
color: var(--text-dim);
cursor: pointer;
padding: 6px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
-webkit-tap-highlight-color: transparent;
}
.sheet-close:active { opacity: 0.6; }
.sheet-list {
flex: 1;
overflow-y: auto;
padding: 0 20px;
padding-bottom: calc(16px + var(--safe-bottom));
-webkit-overflow-scrolling: touch;
}
.sheet-list::-webkit-scrollbar { display: none; }
.playlist-item {
display: flex;
align-items: center;
gap: 14px;
padding: 11px 0;
border-bottom: 1px solid var(--border);
cursor: pointer;
-webkit-tap-highlight-color: transparent;
transition: opacity 0.15s;
}
.playlist-item:last-child { border-bottom: none; }
.playlist-item:active { opacity: 0.6; }
.playlist-item.active .item-title { color: var(--gold); }
.item-num {
font-size: 13px;
color: var(--text-dim);
width: 24px;
text-align: center;
flex-shrink: 0;
font-variant-numeric: tabular-nums;
}
.item-num.playing-icon { color: var(--gold); }
.item-info { flex: 1; min-width: 0; }
.item-title {
font-size: 15px;
font-weight: 500;
color: var(--text);
margin-bottom: 2px;
}
.item-sub {
font-size: 12px;
color: var(--text-dim);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.item-cache {
flex-shrink: 0;
font-size: 11px;
padding: 3px 8px;
border-radius: 999px;
border: 1px solid rgba(255,255,255,0.08);
color: var(--text-dim);
}
.item-cache.cached {
color: var(--gold);
border-color: rgba(232,184,109,0.32);
background: rgba(232,184,109,0.08);
}
.item-cache.pending {
background: rgba(255,255,255,0.04);
}
.settings-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.45);
opacity: 0;
pointer-events: none;
transition: opacity 0.25s ease;
z-index: 24;
}
.settings-overlay.open {
opacity: 1;
pointer-events: auto;
}
.settings-panel {
position: fixed;
left: 50%;
top: calc(18px + var(--safe-top));
width: min(420px, calc(100vw - 24px));
transform: translateX(-50%) translateY(-12px);
opacity: 0;
pointer-events: none;
background: rgba(17,17,30,0.94);
backdrop-filter: blur(18px);
-webkit-backdrop-filter: blur(18px);
border: 1px solid var(--border);
border-radius: 20px;
box-shadow: 0 18px 48px rgba(0,0,0,0.38);
transition: opacity 0.25s ease, transform 0.25s ease;
z-index: 25;
}
.settings-panel.open {
opacity: 1;
pointer-events: auto;
transform: translateX(-50%) translateY(0);
}
.settings-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 18px 10px;
border-bottom: 1px solid rgba(255,255,255,0.06);
}
.settings-title {
font-size: 16px;
font-weight: 600;
color: var(--text);
}
.settings-body {
padding: 14px 18px 18px;
display: flex;
flex-direction: column;
gap: 16px;
}
.setting-group {
display: flex;
flex-direction: column;
gap: 8px;
}
.setting-label {
font-size: 13px;
color: var(--text);
font-weight: 500;
}
.setting-select {
width: 100%;
padding: 10px 12px;
border-radius: 12px;
border: 1px solid rgba(255,255,255,0.08);
background: rgba(255,255,255,0.06);
color: var(--text);
outline: none;
}
.setting-select:focus {
border-color: rgba(232,184,109,0.38);
}
.setting-summary {
padding: 10px 12px;
border-radius: 12px;
background: rgba(255,255,255,0.05);
border: 1px solid rgba(255,255,255,0.06);
color: var(--gold);
font-size: 13px;
}
.setting-note {
font-size: 12px;
line-height: 1.6;
color: var(--text-dim);
}
.marquee-host {
width: 100%;
overflow: hidden;
min-width: 0;
}
.marquee-track {
display: inline-flex;
align-items: center;
min-width: 100%;
transform: translateX(0);
}
.marquee-copy {
white-space: nowrap;
flex-shrink: 0;
}
.marquee-gap {
width: 42px;
flex-shrink: 0;
display: none;
}
.marquee-copy-duplicate {
display: none;
}
.marquee-host:not(.marquee-active) .marquee-track {
display: block;
}
.marquee-host:not(.marquee-active) .marquee-copy-primary {
display: block;
overflow: hidden;
text-overflow: ellipsis;
}
.marquee-host.marquee-active .marquee-gap,
.marquee-host.marquee-active .marquee-copy-duplicate {
display: inline-block;
}
.marquee-host.marquee-active .marquee-track {
width: max-content;
animation: marquee-scroll var(--marquee-duration, 14s) linear infinite;
animation-delay: 1.2s;
}
@keyframes marquee-scroll {
0%, 8% {
transform: translateX(0);
}
92%, 100% {
transform: translateX(calc(-1 * var(--marquee-distance, 0px)));
}
}
.setting-switch {
display: flex;
align-items: center;
gap: 10px;
color: var(--text);
font-size: 14px;
cursor: pointer;
}
.setting-switch input {
width: 16px;
height: 16px;
accent-color: var(--gold);
}
.toast {
position: fixed;
top: calc(60px + var(--safe-top));
left: 50%;
transform: translateX(-50%) translateY(-10px);
background: rgba(35,34,53,0.92);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
color: var(--text);
font-size: 13px;
padding: 8px 18px;
border-radius: 20px;
border: 1px solid var(--border);
opacity: 0;
transition: opacity 0.2s, transform 0.2s;
pointer-events: none;
white-space: nowrap;
z-index: 100;
}
.toast.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
.empty-state {
text-align: center;
padding: 48px 20px;
color: var(--text-dim);
font-size: 14px;
line-height: 1.7;
}