@font-face {
    font-family: 'myCalculator';
    src: url('../fonts/Calculator.ttf');
  }

body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image: linear-gradient(to bottom, #30cfd0 0%, #330867 100%);
}

#calculator {
    font-family: 'Roboto', sans-serif; /* More modern font */
    background-color: #1e1e1e; /* Dark background for calculator */
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    max-width: 400px; /* Fixed max-width for modern feel */
    box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
}

#calculatorName {
    text-align: center; /* Center the text */
    color: #ffffff; /* Light color for modern look */
    font-size: 1.5rem; /* Adjust size as needed */
    margin: 10px 0; /* Add some spacing above and below */
    font-weight: bold; /* Make it bold */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); /* Optional: adds a subtle shadow for depth */
}

#display {
    width: calc(100% - 30px); /* Reduce width for margins */
    height: 150px;
    font-size: 5.5rem;
    text-align: right;
    margin: 15px; /* Add margin for spacing */
    font-family: 'myCalculator';
    border: 2px solid #cccccc; /* Light gray border */
    background-color: #ffffff; /* White background */
    color: #000000; /* Black text for contrast */
    border-radius: 10px; /* Optional: keep rounded corners */
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-right: 20px;
    box-sizing: border-box;
}

#keys {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Maintain 5 equal columns */
    gap: 15px; /* Space between buttons */
    padding: 15px; /* Padding around the grid */
}

button {
    border-radius: 10px; /* Rounded corners for buttons */
    border: none;
    background-color: #3c3c3c; /* Neutral button background */
    color: white;
    font-weight: bold;
    font-size: 1.7rem; /* Font size */
    transition: background-color 0.3s, transform 0.1s; /* Smooth transition for hover effects */
    cursor: pointer;
    height: 70px; /* Fixed height for all buttons */
    width: 100%; /* Full width to fill the grid cell */
    box-sizing: border-box; /* Include padding and border in total width and height */
}

.equal {
    grid-column: span 2; /* Make the equal button span two columns */
}

/* Add this rule to prevent stretching */
#keys > button {
    min-width: 0; /* Allow buttons to shrink equally if needed */
    flex: 1 1 auto; /* Allow buttons to grow and shrink equally */
}

button:hover {
    background-color: #505050; /* Slightly lighter on hover */
}

button:active {
    background-color: #707070; /* Even lighter on click */
    transform: scale(0.95); /* Button press effect */
}

.operator-btn {
    background-color: hsl(199, 98%, 48%); /* Distinctive color for operators */
}

.operator-btn:hover {
    background-color: hsl(199, 98%, 68%); /* Lighter blue on hover */
}

.operator-btn:active {
    background-color: hsl(197, 36%, 12%); /* Light blue on click */
}

/* Media query for smaller screens */
@media (max-width: 600px) {
    button {
        font-size: 1.5rem; /* Smaller font size on mobile */
    }

    #display {
        font-size: 2rem; /* Adjusted display font size */
    }
}
