54797f9dd9
Remove the responsive two-column desktop arrangement and make the calculator stack vertically with a 4-column display button row that preserves alignment. Also align the display buttons with the shared base button styling.
404 lines
7.4 KiB
CSS
404 lines
7.4 KiB
CSS
:root {
|
|
--bg0: #10151e;
|
|
--bg1: #1b2432;
|
|
--panel: #2c3442;
|
|
--panel2: #394354;
|
|
--edge: #0c1118;
|
|
--display: #cfe0ae;
|
|
--display2: #b9cd8a;
|
|
--displayText: #1f2a12;
|
|
--buttonText: #f4f7fb;
|
|
--shadow: rgba(0, 0, 0, 0.35);
|
|
--btnTop: #444c58;
|
|
--btnBottom: #2f3640;
|
|
--btnAccentTop: #3f526b;
|
|
--btnAccentBottom: #2b394c;
|
|
--btnAltTop: #525c69;
|
|
--btnAltBottom: #3a434f;
|
|
--btnDangerTop: #584042;
|
|
--btnDangerBottom: #402d2f;
|
|
--btnEscapeTop: #6a4a2a;
|
|
--btnEscapeBottom: #4a331d;
|
|
--btnEnterTop: #4f7f4d;
|
|
--btnEnterBottom: #355a34;
|
|
--btnText: #eef2f7;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html, body {
|
|
margin: 0;
|
|
min-height: 100%;
|
|
}
|
|
|
|
body {
|
|
min-height: 100vh;
|
|
font-family: Arial, sans-serif;
|
|
color: var(--buttonText);
|
|
background:
|
|
radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 32%),
|
|
linear-gradient(180deg, var(--bg1), var(--bg0));
|
|
}
|
|
|
|
.app-shell {
|
|
min-height: 100vh;
|
|
display: grid;
|
|
place-items: center;
|
|
padding: 0;
|
|
}
|
|
|
|
.calculator {
|
|
width: 100%;
|
|
height: auto;
|
|
min-height: 100%;
|
|
display: grid;
|
|
padding: 8px;
|
|
border-radius: 8px;
|
|
background: linear-gradient(180deg, var(--panel2), var(--panel));
|
|
border: 1px solid var(--edge);
|
|
box-shadow: 0 26px 70px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
|
grid-template-columns: 1fr;
|
|
grid-template-rows: auto auto auto auto auto;
|
|
row-gap: 6px;
|
|
grid-template-areas:
|
|
"display"
|
|
"display-buttons"
|
|
"keypad"
|
|
"functions"
|
|
"trigo";
|
|
}
|
|
|
|
.display-block,
|
|
.display-panel,
|
|
.display-buttons-panel,
|
|
.keypad-panel,
|
|
.functions-panel,
|
|
.trigo-panel,
|
|
.status-line {
|
|
border-radius: 8px;
|
|
border: 1px solid rgba(255, 255, 255, 0.06);
|
|
background: rgba(6, 10, 16, 0.16);
|
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.display-block {
|
|
grid-area: display;
|
|
display: grid;
|
|
gap: 0;
|
|
align-self: start;
|
|
justify-items: stretch;
|
|
grid-template-rows: auto auto;
|
|
row-gap: 0;
|
|
}
|
|
|
|
.display-panel {
|
|
position: relative;
|
|
width: 100%;
|
|
padding: 16px;
|
|
padding-bottom: 8px;
|
|
background: linear-gradient(180deg, var(--display), var(--display2));
|
|
color: var(--displayText);
|
|
font-family: "Courier New", monospace;
|
|
overflow: hidden;
|
|
height: auto;
|
|
min-height: clamp(112px, 18vw, 124px);
|
|
max-height: none;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.display-frame {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.display-grid {
|
|
height: 100%;
|
|
display: grid;
|
|
grid-template-columns: 1fr;
|
|
grid-template-rows: repeat(4, minmax(0, 1fr));
|
|
gap: 2px;
|
|
}
|
|
|
|
.stack-cell {
|
|
display: grid;
|
|
grid-template-columns: 2.2ch 1fr auto;
|
|
align-items: center;
|
|
gap: 12px;
|
|
font-size: clamp(18px, 3vw, 30px);
|
|
line-height: 1;
|
|
min-height: 0;
|
|
padding-block: 0;
|
|
}
|
|
|
|
.stack-label {
|
|
text-align: right;
|
|
opacity: 0.78;
|
|
}
|
|
|
|
.stack-value {
|
|
min-height: 0;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
text-align: right;
|
|
justify-self: end;
|
|
}
|
|
|
|
.display-buttons-panel {
|
|
grid-area: display-buttons;
|
|
padding: 10px;
|
|
align-self: start;
|
|
min-height: 0;
|
|
padding-top: 10px;
|
|
padding-bottom: 8px;
|
|
}
|
|
|
|
.display-buttons-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
gap: 8px;
|
|
align-content: start;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.display-button {
|
|
background: linear-gradient(180deg, var(--btnTop), var(--btnBottom));
|
|
color: #eef2f7;
|
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 3px 0 rgba(0, 0, 0, 0.28);
|
|
}
|
|
|
|
.display-button-offset {
|
|
grid-column-start: 2;
|
|
}
|
|
|
|
.display-button-spacer {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.mode-menu {
|
|
position: fixed;
|
|
z-index: 20;
|
|
display: grid;
|
|
gap: 6px;
|
|
padding: 10px;
|
|
border-radius: 8px;
|
|
background: rgba(18, 24, 33, 0.98);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
|
|
}
|
|
|
|
.mode-menu-item {
|
|
min-width: 120px;
|
|
background: linear-gradient(180deg, var(--btnAltTop), var(--btnAltBottom));
|
|
}
|
|
|
|
.mode-menu-item.is-active {
|
|
outline: 2px solid rgba(207, 224, 174, 0.7);
|
|
}
|
|
|
|
.key-escape {
|
|
background: linear-gradient(180deg, var(--btnEscapeTop), var(--btnEscapeBottom));
|
|
color: #eef2f7;
|
|
}
|
|
|
|
.keypad-panel {
|
|
grid-area: keypad;
|
|
padding: 10px;
|
|
}
|
|
|
|
.functions-panel {
|
|
grid-area: functions;
|
|
padding: 10px;
|
|
align-self: start;
|
|
min-height: 0;
|
|
padding-top: 10px;
|
|
padding-bottom: 8px;
|
|
}
|
|
|
|
.trigo-panel {
|
|
grid-area: trigo;
|
|
padding: 10px;
|
|
align-self: start;
|
|
min-height: 0;
|
|
padding-top: 10px;
|
|
padding-bottom: 8px;
|
|
}
|
|
|
|
.status-bar {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 2;
|
|
padding: 8px 12px;
|
|
min-height: 30px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.02em;
|
|
color: rgba(31, 42, 18, 0.96);
|
|
background: rgba(255, 246, 170, 0.92);
|
|
border-bottom: 1px solid rgba(31, 42, 18, 0.2);
|
|
transform: translateY(-100%);
|
|
opacity: 0;
|
|
transition: transform 180ms ease, opacity 180ms ease;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.status-bar.is-visible {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
|
|
.status-bar.is-error {
|
|
color: #fff;
|
|
background: rgba(72, 14, 14, 0.98);
|
|
border-bottom-color: rgba(255, 255, 255, 0.12);
|
|
}
|
|
|
|
.keypad-grid,
|
|
.functions-grid,
|
|
.trigo-grid {
|
|
display: grid;
|
|
gap: 8px;
|
|
grid-auto-rows: minmax(0, 1fr);
|
|
}
|
|
|
|
.keypad-grid {
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
grid-template-rows: repeat(5, minmax(0, 1fr));
|
|
}
|
|
|
|
.functions-grid,
|
|
.trigo-grid {
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
}
|
|
|
|
.functions-grid,
|
|
.trigo-grid {
|
|
grid-template-rows: repeat(2, minmax(0, 1fr));
|
|
}
|
|
|
|
button {
|
|
border: 1px solid rgba(14, 18, 25, 0.85);
|
|
border-radius: 8px;
|
|
padding: 10px 8px;
|
|
|
|
font: inherit;
|
|
font-weight: 700;
|
|
color: var(--btnText);
|
|
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
|
|
cursor: pointer;
|
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 3px 0 rgba(0, 0, 0, 0.28);
|
|
transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
|
|
line-height: 1;
|
|
}
|
|
|
|
button:hover {
|
|
filter: brightness(1.06);
|
|
}
|
|
|
|
.display-button:hover {
|
|
filter: brightness(1.08);
|
|
}
|
|
|
|
button:active {
|
|
transform: translateY(2px);
|
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 0 rgba(0, 0, 0, 0.25);
|
|
}
|
|
|
|
.display-button:active {
|
|
transform: translateY(2px);
|
|
}
|
|
|
|
.stack-copy-button {
|
|
padding: 4px;
|
|
border-radius: 999px;
|
|
min-width: 24px;
|
|
width: 24px;
|
|
height: 24px;
|
|
display: inline-grid;
|
|
place-items: center;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transform: scale(0.9);
|
|
background: transparent;
|
|
box-shadow: none;
|
|
color: rgba(31, 42, 18, 0.58);
|
|
margin-left: 6px;
|
|
}
|
|
|
|
.stack-cell:last-child {
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.stack-copy-button svg {
|
|
width: 13px;
|
|
height: 13px;
|
|
fill: currentColor;
|
|
display: block;
|
|
}
|
|
|
|
.stack-copy-button.is-visible {
|
|
opacity: 0.7;
|
|
pointer-events: auto;
|
|
transform: scale(1);
|
|
}
|
|
|
|
.stack-copy-button:hover {
|
|
opacity: 1;
|
|
filter: none;
|
|
color: rgba(31, 42, 18, 0.85);
|
|
}
|
|
|
|
.stack-copy-button:active {
|
|
transform: translateY(2px) scale(1);
|
|
color: rgba(31, 42, 18, 0.95);
|
|
}
|
|
|
|
.stack-copy-button:focus-visible {
|
|
outline: 1px solid rgba(31, 42, 18, 0.35);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.key-default {
|
|
background: linear-gradient(180deg, var(--btnTop), var(--btnBottom));
|
|
color: #eef2f7;
|
|
}
|
|
|
|
.key-accent {
|
|
background: linear-gradient(180deg, var(--btnAccentTop), var(--btnAccentBottom));
|
|
color: #eef2f7;
|
|
}
|
|
|
|
.key-alt {
|
|
background: linear-gradient(180deg, var(--btnAltTop), var(--btnAltBottom));
|
|
color: #eef2f7;
|
|
}
|
|
|
|
.key-danger {
|
|
background: linear-gradient(180deg, var(--btnDangerTop), var(--btnDangerBottom));
|
|
color: #eef2f7;
|
|
}
|
|
|
|
.key-enter {
|
|
background: linear-gradient(180deg, var(--btnEnterTop), var(--btnEnterBottom));
|
|
color: #eef2f7;
|
|
}
|
|
|
|
.hidden-input {
|
|
position: absolute;
|
|
left: -9999px;
|
|
width: 1px;
|
|
height: 1px;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
|