.scientific-calculator {
    width: 400px;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #ffffff;
}

.calculator-display {
    margin-bottom: 20px;
}

.calculator-display input {
    width: 100%;
    height: 70px;
    border: none;
    background: #333333;
    color: #ffffff;
    font-size: 28px;
    text-align: right;
    padding: 0 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.calc-mode {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-bottom: 15px;
}

.calc-mode label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #cccccc;
    font-size: 14px;
    cursor: pointer;
}

.calc-mode input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.calc-btn {
    height: 55px;
    border: none;
    background: #404040;
    color: #ffffff;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.calc-btn:hover {
    background: #4a4a4a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.calc-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.calc-btn.number {
    background: #505050;
    font-weight: 500;
}

.calc-btn.operator {
    background: #666666;
    font-weight: bold;
    font-size: 20px;
}

.calc-btn.function {
    background: #404040;
    font-size: 16px;
    font-family: 'Courier New', monospace;
}

.calc-btn.equals {
    background: linear-gradient(135deg, #00a8ff, #0097e6);
    grid-column: span 4;
    font-size: 24px;
    font-weight: bold;
}

.calc-btn.equals:hover {
    background: linear-gradient(135deg, #0097e6, #0088cc);
}

.calc-btn.clear {
    background: #e74c3c;
    font-weight: bold;
}

.calc-btn.clear:hover {
    background: #c0392b;
}

.calc-btn.parenthesis {
    background: #666666;
    font-weight: bold;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .scientific-calculator {
        width: 100%;
        max-width: 400px;
        padding: 15px;
    }

    .calculator-display input {
        height: 60px;
        font-size: 24px;
    }

    .calc-btn {
        height: 45px;
        font-size: 16px;
    }

    .calc-btn.function {
        font-size: 14px;
    }
}

/* Animation for button press */
@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.calc-btn:active {
    animation: buttonPress 0.1s ease-in-out;
} 