/* ---------- BASE ---------- */
body {
    background: #f5f7fa;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    transition: background 0.3s;
}

/* ---------- DARK MODE ---------- */
body.dark {
    background: #0d1117;
}

body.dark .calculator {
    background: #161b22;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

body.dark .display {
    background: #0d1117;
    color: #fff;
}

body.dark .btn {
    background: #21262d;
    color: #fff;
}

body.dark .btn:hover {
    background: #30363d;
}

body.dark .accent {
    background: #238636;
}

body.dark .accent:hover {
    background: #2ea043;
}

/* ---------- TOGGLE BUTTON ---------- */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e7e9ec;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
}

body.dark .theme-toggle {
    background: #21262d;
    color: white;
}

/* ---------- CALCULATOR ---------- */
.calculator {
    width: 320px;
    background: #ffffff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.display {
    background: #f0f2f5;
    padding: 20px;
    font-size: 2.4rem;
    text-align: right;
    border-radius: 12px;
    margin-bottom: 20px;
    color: #333;
    transition: 0.3s;
}

/* ---------- GRID ---------- */
.keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* ---------- BUTTONS ---------- */
.btn {
    background: #e7e9ec;
    border: none;
    padding: 18px;
    font-size: 1.3rem;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.15s;
    transform: scale(1);
}

/* Hover smooth */
.btn:hover {
    background: #dfe1e4;
}

/* Press animation */
.btn:active {
    transform: scale(0.92);
}

/* Light buttons */
.light {
    background: #f1f3f5;
}

/* Accent buttons */
.accent {
    background: #4a8cff;
    color: white;
}

.accent:hover {
    background: #3a78e0;
}

/* Zero spans 2 columns */
.zero {
    grid-column: span 2;
}
