CodeSoft's picture
Add poll edit/delete for members; preserve votes for unchanged options
3bcd30f verified
Raw
History Blame Contribute Delete
10 kB
:root {
--bg: #06040f;
--panel: rgba(12, 9, 26, 0.72);
--panel-solid: #0c091a;
--border: rgba(140, 120, 255, 0.22);
--border-strong: rgba(160, 130, 255, 0.45);
--text: #eceaf6;
--muted: #a49fc2;
--accent: #7b5cff;
--accent-soft: rgba(123, 92, 255, 0.18);
--ok: #5ee6a8;
--err: #ff7a90;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
background: var(--bg);
color: var(--text);
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
line-height: 1.5;
min-height: 100vh;
}
/* ---- background: slow drifting glow orbs + faint grid ---- */
.bg {
position: fixed;
inset: 0;
z-index: 0;
overflow: hidden;
background:
radial-gradient(ellipse 120% 80% at 50% -20%, #161033 0%, transparent 60%),
var(--bg);
}
.bg-orb {
position: absolute;
border-radius: 50%;
filter: blur(90px);
opacity: 0.55;
will-change: transform;
}
.bg-orb-a {
width: 55vmax; height: 55vmax;
left: -15vmax; top: -18vmax;
background: radial-gradient(circle, rgba(82, 38, 255, 0.5) 0%, transparent 70%);
animation: drift-a 26s ease-in-out infinite alternate;
}
.bg-orb-b {
width: 45vmax; height: 45vmax;
right: -18vmax; top: 10vmax;
background: radial-gradient(circle, rgba(140, 60, 255, 0.35) 0%, transparent 70%);
animation: drift-b 32s ease-in-out infinite alternate;
}
.bg-orb-c {
width: 50vmax; height: 50vmax;
left: 15vmax; bottom: -25vmax;
background: radial-gradient(circle, rgba(40, 90, 255, 0.3) 0%, transparent 70%);
animation: drift-c 38s ease-in-out infinite alternate;
}
@keyframes drift-a {
from { transform: translate3d(0, 0, 0) scale(1); }
to { transform: translate3d(8vmax, 6vmax, 0) scale(1.15); }
}
@keyframes drift-b {
from { transform: translate3d(0, 0, 0) scale(1.1); }
to { transform: translate3d(-7vmax, 9vmax, 0) scale(0.95); }
}
@keyframes drift-c {
from { transform: translate3d(0, 0, 0) scale(1); }
to { transform: translate3d(-6vmax, -8vmax, 0) scale(1.2); }
}
.bg-grid {
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(150, 130, 255, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(150, 130, 255, 0.05) 1px, transparent 1px);
background-size: 44px 44px;
mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, black 0%, transparent 75%);
-webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, black 0%, transparent 75%);
}
@media (prefers-reduced-motion: reduce) {
.bg-orb { animation: none; }
}
.shell {
position: relative;
z-index: 1;
max-width: 660px;
margin: 0 auto;
padding: 40px 20px 80px;
}
/* ---- header ---- */
.top {
display: flex; align-items: center; justify-content: space-between;
gap: 12px; flex-wrap: wrap;
border-bottom: 1px solid var(--border);
padding-bottom: 16px; margin-bottom: 12px;
}
.top h1 { font-size: 20px; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.logo { margin-right: 4px; }
.auth { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip {
display: inline-block;
font-size: 13px;
padding: 5px 12px;
border-radius: 999px;
border: 1px solid var(--border-strong);
background: var(--accent-soft);
}
.chip-ok { color: var(--ok); border-color: rgba(94, 230, 168, 0.4); background: rgba(94, 230, 168, 0.1); }
.chip-warn { color: #ffcf7a; border-color: rgba(255, 207, 122, 0.4); background: rgba(255, 207, 122, 0.08); }
.lede { color: var(--muted); font-size: 14px; }
.lede code, .meta code {
font-size: 13px;
background: var(--accent-soft);
border: 1px solid var(--border);
border-radius: 4px;
padding: 1px 5px;
}
.muted { color: var(--muted); font-size: 14px; }
a { color: var(--text); }
/* ---- buttons ---- */
.btn {
appearance: none;
background: var(--accent);
color: #fff;
border: 1px solid transparent;
border-radius: 8px;
padding: 8px 16px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: inline-block;
font-family: inherit;
box-shadow: 0 4px 20px rgba(123, 92, 255, 0.35);
transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover:not(:disabled) { background: #8e73ff; transform: translateY(-1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.quiet {
background: rgba(255, 255, 255, 0.06);
color: var(--text);
border-color: var(--border);
box-shadow: none;
}
.btn.quiet:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); transform: none; }
/* ---- tabs ---- */
.tabs {
display: flex;
gap: 4px;
margin: 20px 0 16px;
padding: 4px;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--panel);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
}
.tabs button {
flex: 1;
appearance: none;
border: 1px solid transparent;
border-radius: 9px;
background: transparent;
color: var(--muted);
font-size: 14px;
font-weight: 500;
font-family: inherit;
padding: 9px 12px;
cursor: pointer;
transition: color 0.15s ease, background 0.15s ease;
}
.tabs button:hover { color: var(--text); }
.tabs button.active {
color: #fff;
background: var(--accent-soft);
border-color: var(--border-strong);
}
.notice { font-size: 14px; padding: 10px 14px; margin: 0 0 14px; border-radius: 8px; border: 1px solid; }
.notice.err { color: var(--err); border-color: rgba(255, 122, 144, 0.35); background: rgba(255, 122, 144, 0.08); }
.notice.ok { color: var(--ok); border-color: rgba(94, 230, 168, 0.35); background: rgba(94, 230, 168, 0.08); }
/* ---- poll cards ---- */
.card {
border: 1px solid var(--border);
border-radius: 14px;
padding: 20px;
margin-bottom: 16px;
background: var(--panel);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.card h2 { font-size: 17px; margin: 0 0 2px; font-weight: 600; }
.meta { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.opts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.opts button {
width: 100%; text-align: left;
background: rgba(255, 255, 255, 0.04);
color: var(--text);
border: 1px solid var(--border);
border-radius: 10px;
padding: 11px 14px;
font-size: 14px;
cursor: pointer;
font-family: inherit;
transition: border-color 0.15s ease, background 0.15s ease;
}
.opts button:hover:not(:disabled) { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.07); }
.opts button:disabled { cursor: default; }
.opts button.mine {
border-color: var(--accent);
background: var(--accent-soft);
box-shadow: 0 0 0 1px var(--accent) inset;
}
.opt-top { display: flex; justify-content: space-between; gap: 12px; }
.num { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar {
display: block; height: 4px;
background: rgba(255, 255, 255, 0.08);
border-radius: 99px;
margin-top: 9px;
overflow: hidden;
}
.bar i {
display: block; height: 100%;
background: linear-gradient(90deg, #5226ff, #9a7bff);
border-radius: 99px;
transition: width 0.4s ease;
}
/* voter chips inside each option row */
.voters {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-top: 9px;
}
.voter {
font-size: 11.5px;
line-height: 1;
padding: 4px 8px;
border-radius: 999px;
border: 1px solid var(--border);
background: rgba(255, 255, 255, 0.06);
color: var(--muted);
font-weight: 500;
}
.voter.me {
color: #fff;
border-color: rgba(255, 255, 255, 0.55);
background: rgba(123, 92, 255, 0.45);
}
/* ---- form ---- */
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0; }
input, textarea {
display: block; width: 100%; margin-top: 5px;
border: 1px solid var(--border);
border-radius: 10px;
padding: 10px 13px;
font-size: 14px;
font-family: inherit;
color: var(--text);
background: rgba(255, 255, 255, 0.05);
transition: border-color 0.15s ease;
}
input::placeholder, textarea::placeholder { color: rgba(164, 159, 194, 0.55); }
input:focus, textarea:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(123, 92, 255, 0.2);
}
input:disabled, textarea:disabled { background: rgba(255, 255, 255, 0.03); color: var(--muted); cursor: not-allowed; }
textarea { resize: vertical; }
/* ---- option editor ---- */
.field { display: block; font-size: 13px; color: var(--muted); margin: 14px 0; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; }
.field-hint { font-size: 12px; color: var(--muted); opacity: 0.7; font-variant-numeric: tabular-nums; }
.opt-editor { list-style: none; margin: 5px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.opt-editor li { display: flex; gap: 8px; align-items: center; }
.opt-editor input { flex: 1; margin-top: 0; }
.icon-btn {
appearance: none;
flex: 0 0 auto;
width: 38px; height: 38px;
border-radius: 10px;
border: 1px solid var(--border);
background: rgba(255, 255, 255, 0.04);
color: var(--muted);
font-size: 15px;
line-height: 1;
cursor: pointer;
font-family: inherit;
transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.icon-btn:hover:not(:disabled) {
border-color: rgba(255, 122, 144, 0.5);
color: var(--err);
background: rgba(255, 122, 144, 0.08);
}
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.add-opt { margin-top: 2px; }
.card-actions { display: inline-flex; gap: 6px; margin-left: auto; }
.card-actions .icon-btn { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; vertical-align: middle; }
.card-actions .icon-btn:hover:not(:disabled) { border-color: rgba(142, 115, 255, 0.5); color: #8e73ff; background: rgba(142, 115, 255, 0.08); }
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
footer {
border-top: 1px solid var(--border);
margin-top: 16px;
padding-top: 16px;
font-size: 13px;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }