/* =============================================================
   Calculator — Modern Clean Theme
   ============================================================= */

.calculator {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #0F172A;
    border-radius: 0;
    padding: 0.5rem 0;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

/* ── Display ─────────────────────────────────────────────── */
input[type="text"] {
    width: 100%;
    height: 64px;
    background: #1E293B;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: #F1F5F9;
    font-size: 1.6rem;
    font-weight: 600;
    font-family: 'Inter', 'Segoe UI', monospace;
    text-align: right;
    padding: 0 1rem;
    margin-bottom: 1rem;
    outline: none;
    letter-spacing: 0.02em;
    caret-color: #06B6D4;
    transition: border-color 0.15s;
}

input[type="text"]:focus {
    border-color: #2563EB;
}

/* ── Button grid ─────────────────────────────────────────── */
form .buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
}

input[type="button"] {
    width: 100%;
    height: 52px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: #1E3A5F;
    color: #E2E8F0;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    line-height: 1;
}

input[type="button"]:hover {
    background: #2563EB;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.35);
}

input[type="button"]:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ── Operator buttons (/, *, -, +) ───────────────────────── */
input[value="/"],
input[value="*"],
input[value="-"],
input[value="+"] {
    background: #1E3A8A;
    color: #93C5FD;
    font-size: 1.1rem;
}

input[value="/"]:hover,
input[value="*"]:hover,
input[value="-"]:hover,
input[value="+"]:hover {
    background: #1D4ED8;
    color: #fff;
}

/* ── Clear button ────────────────────────────────────────── */
input#clear {
    background: #7F1D1D;
    color: #FCA5A5;
    border: none;
}

input#clear:hover {
    background: #EF4444;
    color: #fff;
    box-shadow: 0 4px 12px rgba(239,68,68,0.35);
}

/* ── Equals button (full width) ──────────────────────────── */
input#equal {
    grid-column: 1 / -1;
    width: 100%;
    height: 52px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(90deg, #2563EB, #06B6D4);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
    margin: 0;
    letter-spacing: 0.03em;
}

input#equal:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

input#equal:active {
    transform: translateY(0);
    box-shadow: none;
}
