* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 500;
}

.anycoder-link {
    color: #ffcc00;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.anycoder-link:hover {
    color: #ffdd44;
    text-decoration: underline;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.calculator-container {
    width: 100%;
    max-width: 400px;
}

.calculator {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.display {
    margin-bottom: 1.5rem;
}

#display {
    width: 100%;
    height: 80px;
    font-size: 2rem;
    text-align: right;
    padding: 0 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background-color: #f8f9fa;
    outline: none;
    font-family: 'Roboto', monospace;
}

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

.btn {
    height: 60px;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.number {
    background-color: #f0f0f0;
    color: #333;
}

.number:hover {
    background-color: #e0e0e0;
}

.operator {
    background-color: #4CAF50;
    color: white;
}

.operator:hover {
    background-color: #45a049;
}

.equals {
    background-color: #2196F3;
    color: white;
    grid-row: span 2;
}

.equals:hover {
    background-color: #1976D2;
}

.clear {
    background-color: #f44336;
    color: white;
}

.clear:hover {
    background-color: #d32f2f;
}

.zero {
    grid-column: span 2;
}

footer {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    text-align: center;
    color: white;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .calculator {
        padding: 1.5rem;
    }
    
    .btn {
        height: 50px;
        font-size: 1rem;
    }
    
    #display {
        height: 60px;
        font-size: 1.5rem;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 400px) {
    .buttons {
        gap: 0.5rem;
    }
    
    .btn {
        height: 45px;
        font-size: 0.9rem;
    }
    
    .zero {
        font-size: 1.1rem;
    }
}

================
File: assets/js/script.js
================
let display = document.getElementById('display');
let currentInput = '';
let operator = '';
let previousInput = '';

function appendToDisplay(value) {
    if (value === '.' && currentInput.includes('.')) {
        return; // Prevent multiple decimal points
    }
    
    if (['+', '-', '*', '/'].includes(value)) {
        if (currentInput === '' && previousInput !== '') {
            operator = value;
            display.value = previousInput + ' ' + getOperatorSymbol(value);
            return;
        } else if (currentInput !== '') {
            if (previousInput !== '' && operator !== '') {
                calculate();
            }
            operator = value;
            previousInput = currentInput;
            currentInput = '';
            display.value = previousInput + ' ' + getOperatorSymbol(value);
            return;
        }
    }
    
    currentInput += value;
    display.value = currentInput;
}

function getOperatorSymbol(op) {
    switch(op) {
        case '*': return '×';
        case '/': return '÷';
        default: return op;
    }
}

function calculate() {
    if (currentInput === '' || previousInput === '' || operator === '') {
        return;
    }
    
    let result;
    const prev = parseFloat(previousInput);
    const current = parseFloat(currentInput);
    
    if (isNaN(prev) || isNaN(current)) {
        display.value = 'Error';
        return;
    }
    
    switch (operator) {
        case '+':
            result = prev + current;
            break;
        case '-':
            result = prev - current;
            break;
        case '*':
            result = prev * current;
            break;
        case '/':
            if (current === 0) {
                display.value = 'Error';
                return;
            }
            result = prev / current;
            break;
        default:
            return;
    }
    
    // Round to handle floating point precision issues
    result = Math.round(result * 1000000) / 1000000;
    
    display.value = result;
    currentInput = result.toString();
    operator = '';
    previousInput = '';
}

function clearDisplay() {
    currentInput = '';
    operator = '';
    previousInput = '';
    display.value = '';
}

function backspace() {
    if (currentInput.length > 0) {
        currentInput = currentInput.slice(0, -1);
        display.value = currentInput;
    } else if (operator !== '') {
        operator = '';
        currentInput = previousInput;
        previousInput = '';
        display.value = currentInput;
    }
}

// Keyboard support
document.addEventListener('keydown', function(event) {
    if (event.key >= '0' && event.key <= '9') {
        appendToDisplay(event.key);
    } else if (event.key === '.') {
        appendToDisplay('.');
    } else if (event.key === '+') {
        appendToDisplay('+');
    } else if (event.key === '-') {
        appendToDisplay('-');
    } else if (event.key === '*') {
        appendToDisplay('*');
    } else if (event.key === '/') {
        event.preventDefault(); // Prevent browser search
        appendToDisplay('/');
    } else if (event.key === 'Enter' || event.key === '=') {
        calculate();
    } else if (event.key === 'Escape') {
        clearDisplay();
    } else if (event.key === 'Backspace') {
        backspace();
    }
});