Spaces:
Sleeping
Sleeping
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
height: 100vh; | |
background-color: #f0f0f0; | |
margin: 0; | |
font-family: Arial, sans-serif; | |
} | |
.calculator { | |
background-color: #fff; | |
padding: 20px; | |
border-radius: 8px; | |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); | |
max-width: 400px; | |
width: 100%; | |
} | |
.display { | |
background-color: #333; | |
color: #fff; | |
font-size: 2em; | |
text-align: right; | |
padding: 10px; | |
border-radius: 5px; | |
margin-bottom: 10px; | |
word-wrap: break-word; | |
} | |
.buttons { | |
display: grid; | |
grid-template-columns: repeat(4, 1fr); | |
gap: 10px; | |
} | |
.btn { | |
background-color: #f0f0f0; | |
border: none; | |
padding: 20px; | |
font-size: 1.5em; | |
border-radius: 5px; | |
cursor: pointer; | |
transition: background-color 0.3s ease; | |
} | |
.btn:active { | |
background-color: #ddd; | |
} | |
.operator { | |
background-color: #ff9500; | |
color: #fff; | |
} | |
.operator:active { | |
background-color: #cc7a00; | |
} | |
.equals { | |
grid-column: span 2; | |
background-color: #007aff; | |
color: #fff; | |
} | |
.equals:active { | |
background-color: #005bb5; | |
} | |
.zero { | |
grid-column: span 2; | |
} | |
@media (max-width: 400px) { | |
.btn { | |
padding: 15px; | |
font-size: 1.2em; | |
} | |
.display { | |
font-size: 1.5em; | |
} | |
} | |