body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #f4f4f4;
    margin: 0;
}

.calculator {
    background: #222;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    width: 350px;
    color: white;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

#display {
    width: 100%;
    height: 60px;
    font-size: 2rem;
    text-align: right;
    margin-bottom: 15px;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #333;
    color: #fff;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

button {
    padding: 15px;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    background: #444;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #555;
}

.operator {
    background: #f9a825;
    color: #000;
}

.operator:hover {
    background: #f57f17;
}

.equal {
    background: #4caf50;
    color: white;
    grid-column: span 2;
}

.equal:hover {
    background: #43a047;
}

.clear {
    background: #e53935;
    color: white;
}

.clear:hover {
    background: #c62828;
}

.hidden {
    display: none;
}

.history {
    background: #111;
    padding: 10px;
    border-radius: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.history h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.history ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.history li {
    border-bottom: 1px solid #333;
    padding: 3px 0;
}