479 lines
11 KiB
CSS
479 lines
11 KiB
CSS
/* Firefox Proton-style theme (dark) for the calculator shell. */
|
|
|
|
:root {
|
|
--chrome: #1c1b22;
|
|
--chrome-alt: #2a2a3a;
|
|
--content-bg: #15141a;
|
|
--field: #42414d;
|
|
--field-hover: #525268;
|
|
--text: #fbfbfe;
|
|
--subtext: #cfcfd8;
|
|
--dimtext: #9b9bab;
|
|
--accent: #00ddff;
|
|
--orange: #ff9500;
|
|
--red: #ff5f70;
|
|
--pink: #ff7bd5;
|
|
--border: #3a3944;
|
|
--fox-gradient: linear-gradient(90deg, #ff3650, #ff9500, #9059ff, #00ddff);
|
|
--shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
|
|
--radius: 8px;
|
|
--font: "Segoe UI", "Ubuntu", "Helvetica Neue", system-ui, sans-serif;
|
|
}
|
|
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
body {
|
|
font-family: var(--font);
|
|
min-height: 100vh;
|
|
display: grid;
|
|
place-items: center;
|
|
padding: 24px 12px;
|
|
background:
|
|
radial-gradient(1100px 500px at 15% -10%, rgba(144, 89, 255, 0.25), transparent 60%),
|
|
radial-gradient(900px 480px at 95% 110%, rgba(0, 221, 255, 0.16), transparent 55%),
|
|
radial-gradient(700px 400px at 60% 40%, rgba(255, 54, 80, 0.10), transparent 60%),
|
|
#0c0b14;
|
|
color: var(--text);
|
|
}
|
|
|
|
.ff-window {
|
|
width: min(1020px, 100%);
|
|
border-radius: 10px 10px 4px 4px;
|
|
box-shadow: var(--shadow);
|
|
overflow: hidden;
|
|
background: var(--chrome);
|
|
border: 1px solid rgba(255, 255, 255, 0.06);
|
|
}
|
|
|
|
/* ---------- titlebar ---------- */
|
|
|
|
.titlebar {
|
|
position: relative;
|
|
height: 36px;
|
|
background: var(--chrome);
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
.titlebar-caption {
|
|
padding-left: 14px;
|
|
font-size: 12px;
|
|
color: var(--subtext);
|
|
opacity: 0.85;
|
|
user-select: none;
|
|
}
|
|
.titlebar-dots {
|
|
position: absolute;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 74px;
|
|
height: 10px;
|
|
background:
|
|
radial-gradient(circle at 8% 50%, #4fc3f7 0 4px, transparent 5px),
|
|
radial-gradient(circle at 30% 28%, #ffb74d 0 4px, transparent 5px),
|
|
radial-gradient(circle at 52% 62%, #ef7d57 0 5px, transparent 6px),
|
|
radial-gradient(circle at 75% 35%, #ba68c8 0 4px, transparent 5px),
|
|
radial-gradient(circle at 93% 55%, #f06292 0 3px, transparent 4px);
|
|
opacity: 0.8;
|
|
}
|
|
.titlebtn {
|
|
margin-left: auto;
|
|
width: 46px;
|
|
height: 36px;
|
|
display: grid;
|
|
place-items: center;
|
|
font-size: 13px;
|
|
color: var(--subtext);
|
|
cursor: default;
|
|
user-select: none;
|
|
}
|
|
.titlebtn:hover { background: var(--chrome-alt); }
|
|
.titlebtn.close:hover { background: #d43a3a; color: #fff; }
|
|
.titlebtn.max { margin-left: 0; }
|
|
|
|
/* ---------- tabstrip ---------- */
|
|
|
|
.tabbar {
|
|
background: #18181b;
|
|
display: flex;
|
|
align-items: flex-end;
|
|
padding: 5px 5px 0;
|
|
gap: 3px;
|
|
}
|
|
.tab {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
max-width: 240px;
|
|
height: 34px;
|
|
padding: 0 10px 0 12px;
|
|
background: #2a2a3a;
|
|
border-radius: 8px 8px 0 0;
|
|
color: var(--subtext);
|
|
font-size: 13px;
|
|
position: relative;
|
|
cursor: default;
|
|
}
|
|
.tab.active {
|
|
background: var(--chrome);
|
|
color: var(--text);
|
|
}
|
|
.tab.active::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0; left: 10px; right: 10px;
|
|
height: 2px;
|
|
border-radius: 2px;
|
|
background: var(--fox-gradient);
|
|
}
|
|
.tab-icon { font-size: 14px; }
|
|
.tab-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.tab-close { margin-left: auto; opacity: 0.6; font-size: 11px; padding: 2px 4px; border-radius: 4px; }
|
|
.tab-close:hover { background: rgba(255, 255, 255, 0.12); opacity: 1; }
|
|
.tab.newtab {
|
|
width: 30px;
|
|
justify-content: center;
|
|
font-size: 16px;
|
|
color: var(--subtext);
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: 6px;
|
|
height: 30px;
|
|
align-self: center;
|
|
}
|
|
.tab.newtab:hover { background: var(--chrome-alt); }
|
|
|
|
/* ---------- nav toolbar / urlbar ---------- */
|
|
|
|
.navtoolbar {
|
|
background: var(--chrome);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 8px 10px;
|
|
position: relative;
|
|
}
|
|
.nav-btns { display: flex; gap: 2px; }
|
|
.nav-btn {
|
|
width: 32px;
|
|
height: 32px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
background: transparent;
|
|
color: var(--text);
|
|
font-size: 15px;
|
|
display: grid;
|
|
place-items: center;
|
|
cursor: pointer;
|
|
}
|
|
.nav-btn:hover { background: rgba(255, 255, 255, 0.08); }
|
|
.nav-btn:active { transform: scale(0.94); }
|
|
.nav-btn.fwd { opacity: 0.35; pointer-events: none; transform: scaleX(-1); }
|
|
.nav-btn.reload { font-size: 17px; }
|
|
.nav-btn.active { background: rgba(0, 221, 255, 0.12); color: var(--accent); }
|
|
.nav-right { display: flex; gap: 2px; margin-left: auto; }
|
|
|
|
.urlbar-wrap { flex: 1; position: relative; }
|
|
.urlbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
height: 36px;
|
|
padding: 0 10px;
|
|
border-radius: 4px;
|
|
border: 2px solid transparent;
|
|
background:
|
|
linear-gradient(var(--field), var(--field)) padding-box,
|
|
transparent border-box;
|
|
transition: background 120ms ease;
|
|
}
|
|
.urlbar:hover {
|
|
background:
|
|
linear-gradient(var(--field-hover), var(--field-hover)) padding-box,
|
|
transparent border-box;
|
|
}
|
|
.urlbar:focus-within {
|
|
background:
|
|
linear-gradient(#38384a, #38384a) padding-box,
|
|
var(--fox-gradient) border-box;
|
|
}
|
|
.urlbar-icon { opacity: 0.85; font-size: 13px; }
|
|
.urlbar input {
|
|
flex: 1;
|
|
min-width: 0;
|
|
background: transparent;
|
|
border: none;
|
|
outline: none;
|
|
color: var(--text);
|
|
font-size: 14px;
|
|
font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
|
|
}
|
|
.urlbar input::placeholder { color: var(--dimtext); font-family: var(--font); }
|
|
.urlbar-kbd {
|
|
font-size: 10px;
|
|
color: var(--dimtext);
|
|
border: 1px solid var(--border);
|
|
border-radius: 3px;
|
|
padding: 1px 5px;
|
|
}
|
|
.urlbar:focus-within .urlbar-kbd { display: none; }
|
|
|
|
/* awesome bar dropdown */
|
|
.awesomebar {
|
|
position: absolute;
|
|
top: calc(100% + 4px);
|
|
left: 0; right: 0;
|
|
background: var(--chrome-alt);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow);
|
|
z-index: 40;
|
|
overflow: hidden;
|
|
}
|
|
.sugg {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 8px 12px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
}
|
|
.sugg:hover { background: rgba(0, 221, 255, 0.08); }
|
|
.sugg-icon { color: var(--dimtext); width: 16px; text-align: center; }
|
|
.sugg-expr { flex: 1; font-family: Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.sugg-res { color: var(--accent); font-family: Consolas, monospace; }
|
|
|
|
/* ---------- content ---------- */
|
|
|
|
.content {
|
|
display: flex;
|
|
background: var(--content-bg);
|
|
min-height: 420px;
|
|
}
|
|
.page {
|
|
flex: 1;
|
|
padding: 22px 24px 26px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 18px;
|
|
}
|
|
|
|
.display-card {
|
|
background: var(--chrome);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 16px 18px 14px;
|
|
}
|
|
.display-expr {
|
|
font-size: 13px;
|
|
color: var(--dimtext);
|
|
font-family: Consolas, monospace;
|
|
min-height: 17px;
|
|
text-align: right;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
.display-value {
|
|
font-size: 44px;
|
|
font-weight: 200;
|
|
text-align: right;
|
|
letter-spacing: 0.5px;
|
|
overflow-wrap: anywhere;
|
|
margin-top: 4px;
|
|
}
|
|
.display-value.is-err { color: var(--red); }
|
|
.display-error {
|
|
margin-top: 6px;
|
|
text-align: right;
|
|
color: var(--red);
|
|
font-size: 13px;
|
|
}
|
|
|
|
/* keypad */
|
|
.keypad {
|
|
display: grid;
|
|
grid-template-columns: repeat(6, 1fr);
|
|
gap: 8px;
|
|
}
|
|
.k {
|
|
height: 50px;
|
|
border: 1px solid transparent;
|
|
border-radius: 4px;
|
|
background: var(--chrome-alt);
|
|
color: var(--text);
|
|
font-size: 17px;
|
|
cursor: pointer;
|
|
transition: background 90ms ease, transform 60ms ease;
|
|
}
|
|
.k:hover { background: #3a3944; border-color: var(--border); }
|
|
.k:active { transform: scale(0.96); background: #003e96; }
|
|
.k.num { background: #363644; font-weight: 600; }
|
|
.k.num:hover { background: #44445a; }
|
|
.k.op { color: var(--orange); font-weight: 700; }
|
|
.k.fn { color: var(--subtext); font-size: 15px; }
|
|
.k.warn { color: var(--pink); }
|
|
.k.eq {
|
|
background: linear-gradient(135deg, #ff9500, #e66000);
|
|
color: #fff;
|
|
font-weight: 800;
|
|
font-size: 22px;
|
|
}
|
|
.k.eq:hover { background: linear-gradient(135deg, #ffae3d, #ff7a1a); }
|
|
.k.eq:active { transform: scale(0.96); }
|
|
|
|
.chipshelp { color: var(--dimtext); font-size: 12px; }
|
|
|
|
/* ---------- library sidebar ---------- */
|
|
|
|
.library {
|
|
width: 272px;
|
|
flex-shrink: 0;
|
|
background: var(--chrome);
|
|
border-left: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.library.hidden { display: none; }
|
|
.lib-header {
|
|
padding: 14px 16px 10px;
|
|
font-weight: 700;
|
|
font-size: 15px;
|
|
}
|
|
.lib-tabs { display: flex; border-bottom: 1px solid var(--border); }
|
|
.lib-tab {
|
|
flex: 1;
|
|
background: none;
|
|
border: none;
|
|
color: var(--dimtext);
|
|
font-size: 13px;
|
|
padding: 8px 0 10px;
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
.lib-tab.active { color: var(--text); }
|
|
.lib-tab.active::after {
|
|
content: "";
|
|
position: absolute;
|
|
left: 18%; right: 18%; bottom: 0;
|
|
height: 2px;
|
|
border-radius: 2px;
|
|
background: var(--fox-gradient);
|
|
}
|
|
.lib-panel { padding: 6px 0; overflow-y: auto; }
|
|
.history-list { list-style: none; }
|
|
.history-empty { padding: 18px 16px; color: var(--dimtext); font-size: 13px; }
|
|
.history-item {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: baseline;
|
|
padding: 8px 16px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
}
|
|
.history-item:hover { background: var(--chrome-alt); }
|
|
.h-main {
|
|
flex: 1;
|
|
min-width: 0;
|
|
font-family: Consolas, monospace;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.h-res { color: var(--accent); font-family: Consolas, monospace; }
|
|
.history-item.bad .h-res { color: var(--red); }
|
|
.history-item.bad .h-main { opacity: 0.6; }
|
|
|
|
.funcs-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 7px;
|
|
padding: 12px 16px;
|
|
}
|
|
.func {
|
|
background: var(--chrome-alt);
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
color: var(--text);
|
|
font-size: 13px;
|
|
padding: 7px 0;
|
|
cursor: pointer;
|
|
}
|
|
.func:hover { background: #3a3944; border-color: var(--accent); }
|
|
.lib-note {
|
|
padding: 4px 16px 14px;
|
|
color: var(--dimtext);
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* ---------- statusbar ---------- */
|
|
|
|
.statusbar {
|
|
height: 26px;
|
|
background: var(--chrome);
|
|
border-top: 1px solid var(--border);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 12px;
|
|
font-size: 11px;
|
|
color: var(--dimtext);
|
|
}
|
|
|
|
/* ---------- modal ---------- */
|
|
|
|
.modal-veil {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(8, 8, 15, 0.72);
|
|
display: grid;
|
|
place-items: center;
|
|
z-index: 100;
|
|
}
|
|
.modal-veil[hidden] { display: none; }
|
|
.modal {
|
|
width: min(560px, 92vw);
|
|
max-height: 80vh;
|
|
overflow-y: auto;
|
|
background: var(--chrome-alt);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
.modal-head {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 14px 18px;
|
|
border-bottom: 1px solid var(--border);
|
|
font-weight: 700;
|
|
}
|
|
.modal-close {
|
|
background: none;
|
|
border: none;
|
|
color: var(--subtext);
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
}
|
|
.modal-close:hover { background: rgba(255, 255, 255, 0.1); }
|
|
.modal-body { padding: 16px 20px; font-size: 14px; }
|
|
.modal-body h3 { margin: 12px 0 6px; font-size: 14px; color: var(--accent); }
|
|
.modal-body h3:first-child { margin-top: 0; }
|
|
.modal-body ul { padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
|
|
.modal-body code {
|
|
background: #1c1b22;
|
|
padding: 1px 6px;
|
|
border-radius: 3px;
|
|
font-size: 13px;
|
|
color: var(--orange);
|
|
}
|
|
|
|
/* ---------- responsive ---------- */
|
|
|
|
@media (max-width: 860px) {
|
|
.content { flex-direction: column; }
|
|
.library { width: auto; border-left: none; border-top: 1px solid var(--border); }
|
|
.keypad { grid-template-columns: repeat(3, 1fr); }
|
|
.display-value { font-size: 34px; }
|
|
}
|