
:root {
    --bg: #f4f7fd;
    --card-bg: #fff;
    --primary: #5a8dee;
    --primary-hover: #3d6dcc;
    --text: #2e3a59;
    --muted: #6b7280;
    --shadow: rgba(0, 0, 0, 0.08);
}

/* predictable sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.calculator-container {
    width: 340px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 12px 32px var(--shadow);
    padding: 28px;
}

.input-section,
.result-section,
.history-section,
.button-section {
    margin-bottom: 24px;
}

.input-field {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text);
}

.checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    white-space: nowrap;
    font-size: 0.9rem;
    color: var(--muted);
}

/* modern styled history box */
.history-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.history-section textarea.input-field {
    height: 160px;
    background: #f9fbfe;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 12px;
    border: none;
    border-radius: 8px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
    resize: none;
    overflow-y: auto;
    color: var(--text);
}

/* custom scrollbar */
.history-section textarea::-webkit-scrollbar {
    width: 6px;
}

.history-section textarea::-webkit-scrollbar-track {
    background: transparent;
}

.history-section textarea::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.history-section textarea {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.button-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.aspButton {
    padding: 12px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

    .aspButton:hover {
        background-color: var(--primary-hover);
        transform: translateY(-2px);
    }

    .aspButton:active {
        transform: translateY(0);
    }
