body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #222;
    flex-direction: column;
}

.container {
    text-align: center;
}

#toggle-theme {
    background: #ffcc00;
    color: black;
    border: none;
    padding: 10px 20px;
    margin-bottom: 10px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}

.calculator {
    width: 350px;
    background: #111;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(0,255,255,0.5);
    text-align: center;
}

#display {
    width: 100%;
    height: 60px;
    font-size: 1.8em;
    text-align: right;
    margin-bottom: 10px;
    padding: 10px;
    border: none;
    background: #222;
    color: cyan;
    border-radius: 5px;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

button {
    padding: 15px;
    font-size: 1.2em;
    border: none;
    cursor: pointer;
    background: #444;
    color: white;
    border-radius: 5px;
    box-shadow: 0px 3px 5px rgba(0,255,255,0.3);
}

button:hover {
    background: #555;
}

.equal {
    grid-column: span 2;
    background: #ff6600;
    color: white;
}

.equal:hover {
    background: #cc5200;
}

.clear {
    background: #ff0000;
    color: white;
}

.clear:hover {
    background: #cc0000;
}

.history-container {
    margin-top: 20px;
    background: #333;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0px 0px 10px rgba(0,255,255,0.3);
    color: white;
    width: 350px;
}

#history {
    list-style: none;
    padding: 0;
    text-align: left;
}

.history-container button {
    margin-top: 10px;
    background: #ff3300;
}

.clear-history:hover {
    background: #cc2900;
}

.dark-mode {
    background-color: #fff;
    color: black;
}

.dark-mode .calculator {
    background: #ddd;
    box-shadow: 0px 0px 15px rgba(0, 0, 255, 0.5);
}

.dark-mode .history-container {
    background: #ccc;
}

.dark-mode button {
    background: #888;
    color: black;
}

.dark-mode #display {
    background: #ccc;
    color: black;
}
