/* Scientific Calculator Specific Styles */
.calc-display-wrapper {
    background: #1e293b;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

.calc-display-secondary {
    color: #94a3b8;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    min-height: 1.2rem;
    text-align: right;
    margin-bottom: 0.5rem;
    overflow: hidden;
    white-space: nowrap;
}

.calc-display-main {
    background: transparent;
    border: none;
    color: #10b981;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    width: 100%;
    text-align: right;
    outline: none;
}

.calc-display-main::placeholder {
    color: #334155;
}

.calc-status-bar {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.calc-btn {
    border-radius: 8px;
    padding: 1rem 0;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.15s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.calc-btn:active {
    transform: translateY(0);
}

/* Light Theme Buttons */
[data-theme="light"] .calc-btn-num { background: #f8fafc; color: #1e293b; }
[data-theme="light"] .calc-btn-op { background: #f1f5f9; color: #3b82f6; }
[data-theme="light"] .calc-btn-func { background: #f1f5f9; color: #64748b; font-size: 0.9rem; }
[data-theme="light"] .calc-btn-action { background: #fee2e2; color: #ef4444; }
[data-theme="light"] .calc-btn-eq { background: #10b981; color: white; grid-column: span 2; }

/* Dark Theme Buttons */
[data-theme="dark"] .calc-btn-num { background: #334155; color: #f8fafc; border-color: #475569; }
[data-theme="dark"] .calc-btn-op { background: #1e293b; color: #60a5fa; border-color: #334155; }
[data-theme="dark"] .calc-btn-func { background: #1e293b; color: #94a3b8; border-color: #334155; font-size: 0.9rem; }
[data-theme="dark"] .calc-btn-action { background: #450a0a; color: #f87171; border-color: #7f1d1d; }
[data-theme="dark"] .calc-btn-eq { background: #059669; color: white; grid-column: span 2; border: none; }

.calc-history-sidebar {
    border-left: 1px solid #e2e8f0;
    padding-left: 1.5rem;
    height: 100%;
}

[data-theme="dark"] .calc-history-sidebar {
    border-left: 1px solid #334155;
}

.history-item {
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.history-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.history-expr {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.history-res {
    font-weight: 700;
    color: #3b82f6;
}

@media (max-width: 768px) {
    .calc-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .calc-history-sidebar {
        border-left: none;
        padding-left: 0;
        margin-top: 2rem;
        border-top: 1px solid #e2e8f0;
        padding-top: 1.5rem;
    }
}
