* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #d1dae4, #374d7e);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.calculator {
    background: #020617;
    padding: 20px;
    border-radius: 15px;
    width: 400px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

#display {
    width: 100%;
    height: 70px;
    margin-bottom: 15px;
    font-size: 28px;
    text-align: right;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background: #000;
    color: #22c55e;
}

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

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

button:hover {
    background: #334155;
}

.operator {
    background: #2563eb;
}

.operator:hover {
    background: #1d4ed8;
}

.equal {
    background: #22c55e;
    grid-row: span 2;
}

.equal:hover {
    background: #16a34a;
}

.clear {
    background: #ef4444;
}

.clear:hover {
    background: #dc2626;
}

.zero {
    grid-column: span 2;
}
button:active {
    transform: scale(0.95);
    background: #475569;
}

#themeToggle {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 12px;
    font-size: 18px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: #e5e7eb;
}
body.light {
    background: linear-gradient(135deg, #f3f4f6, #6687a2);
}

body.light .calculator {
    background: #c3c1c1;
}

body.light #display {
    background: #f9fafb;
    color: #111827;
}

body.light button {
    background: #e5e7eb;
    color: #111827;
}

body.light .operator {
    background: #60a5fa;
}

body.light .equal {
    background: #22c55e;
}

body.light .clear {
    background: #f87171;
}
