/* ══════════════════════════════════════════ */
/* ═══════ دکمه‌های ماشین‌حساب ═══════ */
/* ══════════════════════════════════════════ */

.calc-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-btn {
    padding: 20px 10px;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    background: #f5f5f7;
    color: #1d1d1f;
}

.calc-btn:active {
    transform: scale(0.95);
}

.calc-num {
    background: #ffffff;
    border: 1px solid #e5e5ea;
}

.calc-num:hover {
    background: #f5f5f7;
    border-color: #0071e3;
}

.calc-clear {
    background: #ffe5e0;
    color: #ff3b30;
}

.calc-action {
    background: #e8f0fe;
    color: #0071e3;
}

.calc-operator {
    background: #0071e3;
    color: white;
}

.calc-equals {
    background: #34c759;
    color: white;
}

/* ══════════════════════════════════════════ */
/* ═══════ نمایشگر (جدید) ═══════ */
/* ══════════════════════════════════════════ */

.calc-display-box {
    background: #f5f5f7;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    direction: ltr;
    text-align: left;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background-color 0.3s, border-color 0.3s;
}

.calc-history {
    color: #86868b;
    font-size: 14px;
    min-height: 20px;
    transition: color 0.3s;
    word-break: break-all;
}

.calc-result {
    font-size: 32px;
    font-weight: 800;
    color: #1d1d1f;
    transition: color 0.3s;
    word-break: break-all;
}

/* ══════════════════════════════════════════ */
/* ═══════ 🌟 حالت تاریک کامل ═══════ */
/* ══════════════════════════════════════════ */

body.dark .calc-display-box {
    background: #0f172a;
    border: 1px solid #334155;
}

body.dark .calc-result {
    color: #f8fafc;
}

body.dark .calc-history {
    color: #94a3b8;
}

body.dark .calc-num {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

body.dark .calc-num:hover {
    background: #334155;
    border-color: #3b82f6;
}

body.dark .calc-operator {
    background: #3b82f6;
    color: white;
}

body.dark .calc-action {
    background: #1e3a5f;
    color: #60a5fa;
}

body.dark .calc-clear {
    background: #4a2c2c;
    color: #ff6b6b;
}

body.dark .calc-equals {
    background: #22c55e;
    color: white;
}