@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700;800&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Kalam:wght@700&display=swap"); * { box-sizing: border-box; margin: 0; padding: 0; font-family: "Nunito", sans-serif; } html, body { position: relative; width: 100%; height: 100vh; overflow: hidden; background-color: #040a22; } /* -------------------- */ /* TITLE */ /* 外层只管方位,内层只管字体与方向,避免 transform 互相覆盖 */ /* -------------------- */ .title { position: fixed; z-index: 1; line-height: 1; pointer-events: none; } .title[data-pos="tl"] { top: 6%; left: 5%; } .title[data-pos="ml"] { top: 50%; left: 5%; transform: translateY(-50%); } .title[data-pos="bl"] { bottom: 6%; left: 5%; } .title[data-pos="tc"] { top: 6%; left: 50%; transform: translateX(-50%); } .title[data-pos="bc"] { bottom: 6%; left: 50%; transform: translateX(-50%); } .title[data-pos="tr"] { top: 6%; right: 5%; } .title[data-pos="br"] { bottom: 6%; right: 5%; } .title-text { display: block; font-family: "Didot Title", Georgia, "Times New Roman", serif; font-size: 5rem; line-height: 1; color: #fff; letter-spacing: 0.02em; white-space: nowrap; } .title-text[data-dir="v"] { writing-mode: vertical-rl; } .title-text[data-dir="vr"] { writing-mode: vertical-rl; transform: rotate(180deg); } /* -------------------- */ /* STAGE / BACKGROUND */ /* -------------------- */ .stage { position: relative; width: 100%; height: 100vh; overflow: hidden; } .gradient { position: absolute; z-index: 0; top: 50%; left: 50%; width: 500px; height: 500px; margin: -250px 0 0 -250px; filter: blur(50px); background-image: linear-gradient(#4ddc9e, #5b37eb, #f1307e); animation: rotate 10s cubic-bezier(0.8, 0.2, 0.2, 0.8) alternate infinite; border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; } @keyframes rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* 位置与尺寸由 script.js 按 alpha 有效区域计算后内联写入 */ .slide-img { position: absolute; display: block; z-index: 2; opacity: 0; pointer-events: none; transition: opacity 0.6s ease; } .slide-img.is-active { opacity: 1; } /* -------------------- */ /* PREV / NEXT / SETTINGS */ /* -------------------- */ .nav { position: fixed; top: 50%; right: 3.5%; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 24px; transform: translateY(-50%); } .nav button { appearance: none; background: transparent; border: 0; padding: 8px; color: rgba(255, 255, 255, 0.32); font-family: "Nunito", sans-serif; font-size: 0.72rem; font-weight: 600; line-height: 1; letter-spacing: 0.26em; text-transform: uppercase; cursor: pointer; transition: color 0.3s ease, transform 0.3s ease; } .nav button:hover, .nav button:focus-visible { color: rgba(255, 255, 255, 0.9); outline: none; } .nav button:hover { transform: scale(1.06); } #settingsBtn { margin-top: 6px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.62rem; letter-spacing: 0.2em; } /* -------------------- */ /* SETTINGS OVERLAY */ /* -------------------- */ .settings[hidden] { display: none; } .settings { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; } .settings-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 20, 0.66); } .settings-panel { position: relative; width: min(540px, calc(100vw - 32px)); max-height: 86vh; overflow-y: auto; padding: 28px 32px 32px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px; background: #0a1130; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5); } .settings-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); } .settings-head h2 { color: #fff; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.3em; } .settings-close { appearance: none; width: 32px; height: 32px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%; background: transparent; color: rgba(255, 255, 255, 0.7); font-size: 1.3rem; line-height: 1; cursor: pointer; transition: border-color 0.2s, color 0.2s; } .settings-close:hover, .settings-close:focus-visible { border-color: rgba(255, 255, 255, 0.6); color: #fff; outline: none; } .settings-group { padding-top: 22px; } .settings-label { margin-bottom: 14px; color: rgba(255, 255, 255, 0.92); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; } .settings-label span { margin-left: 8px; color: rgba(255, 255, 255, 0.32); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.18em; } .field { display: block; margin-bottom: 18px; } .field-name { display: block; margin-bottom: 8px; color: rgba(255, 255, 255, 0.45); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; } .field input[type="text"] { width: 100%; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; background: rgba(255, 255, 255, 0.05); color: #fff; font-family: inherit; font-size: 0.95rem; letter-spacing: 0.08em; outline: none; transition: border-color 0.2s; } .field input[type="text"]:focus { border-color: rgba(255, 255, 255, 0.55); } /* 数值滑块:字号 / 字距 */ .range-field { margin-top: 18px; } .range-field .settings-label { display: flex; align-items: baseline; } .range-field output { margin-left: auto; color: rgba(255, 255, 255, 0.85); font-size: 0.78rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; } .range-field input[type="range"] { appearance: none; width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; } .range-field input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); } .range-field input[type="range"]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; margin-top: -5.5px; border: 0; border-radius: 50%; background: #fff; transition: transform 0.2s; } .range-field input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); } .range-field input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; } .range-field input[type="range"]:hover::-webkit-slider-thumb, .range-field input[type="range"]:focus-visible::-webkit-slider-thumb { transform: scale(1.25); } .range-field input[type="range"]:focus-visible { outline: none; } /* 圆形复选框:所有组共用同一套 8 列网格,圆点与标签逐列对齐 */ .choices, .choices-grid, .choices-steps { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 16px 0; } /* 数字档位使用等宽数字,避免位数变化造成抖动 */ .choices-steps .cap { font-variant-numeric: tabular-nums; } .choice { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; user-select: none; } .choice input { position: absolute; width: 0; height: 0; opacity: 0; } .choice .dot { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 50%; transition: border-color 0.2s, background 0.2s; } .choice .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: transparent; transition: background 0.2s; } .choice input:checked + .dot { border-color: #fff; } .choice input:checked + .dot::after { background: #fff; } .choice input:focus-visible + .dot { outline: 2px solid rgba(255, 255, 255, 0.6); outline-offset: 3px; } .choice .cap { color: rgba(255, 255, 255, 0.48); font-size: 0.68rem; line-height: 1.25; text-align: center; white-space: normal; overflow-wrap: break-word; transition: color 0.2s; } .choice input:checked ~ .cap { color: rgba(255, 255, 255, 0.95); } /* -------------------- */ /* STATUS / RESPONSIVE */ /* -------------------- */ .status { position: fixed; left: 50%; bottom: 8%; z-index: 20; display: none; max-width: 80vw; color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; letter-spacing: 0.04em; text-align: center; transform: translateX(-50%); } .status.is-visible { display: block; } @media (max-width: 500px) { .gradient { width: 300px; height: 300px; margin: -150px 0 0 -150px; } .nav { right: 5%; gap: 20px; } .settings-panel { padding: 24px 20px; } .choices, .choices-grid, .choices-steps { gap: 14px 0; } .choice .cap { font-size: 0.6rem; letter-spacing: 0; } }