* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f0f2f5;
    padding: 2rem;
}

.back-button {
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    background: #e0e4e8;
    color: #2d3748;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 2rem;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: #d1d6db;
    transform: translateY(-2px);
}

.calculator {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 24px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.display {
    grid-column: 1 / -1;
    background: #f8fafc;
    padding: 24px;
    margin-bottom: 12px;
    border-radius: 12px;
    text-align: right;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    word-wrap: break-word;
    word-break: break-all;
}

.previous-operand {
    color: #64748b;
    font-size: 1.2rem;
    min-height: 1.5rem;
}

.current-operand {
    color: #1e293b;
    font-size: 2.5rem;
    font-weight: 500;
}

button {
    font-size: 1.25rem;
    padding: 16px;
    border: none;
    background: #f1f5f9;
    color: #334155;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

button.operator {
    background: #3b82f6;
    color: white;
}

button.operator:hover {
    background: #2563eb;
}

button.equals {
    background: #10b981;
    color: white;
}

button.equals:hover {
    background: #059669;
}

button.clear,
button.delete {
    background: #ef4444;
    color: white;
}

button.clear:hover,
button.delete:hover {
    background: #dc2626;
}

.span-two {
    grid-column: span 2;
}