* {
    font-family: "Berlin Sans FB";
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* Container for button + calculator */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Back to Home button */
.back-home {
    margin-bottom: 20px; /* space between button and calculator */
}

.back-home button {
    background-color: #808080; /* gray */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.back-home button:hover {
    background-color: #5a5a5a; /* darker gray on hover */
}

.back-home button a {
    color: white;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}


body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
}

/* Calculator container */
.parent {
    width: 95%;
    max-width: 350px;
    background-color: #a3d3ff;  /* light blue background */
    border-radius: 20px;
    padding: 20px;
    display: grid;
    grid-template-rows: auto repeat(5, auto);
    gap: 15px;
}

/* Display */
.backgroundscreen {
    width: 100%;
    height: 70px;
    border-radius: 10px;
    border: none;
    font-size: 1.8rem;
    padding: 10px;
    text-align: right;
    box-shadow: inset 2px 2px 8px rgba(0,0,0,0.2);
}

/* Buttons */
input[type="button"] {
    font-size: 1.5rem;
    color: white;
    background-color: #6ebcff; /* blue buttons */
    border: none;
    cursor: pointer;
    box-shadow: 3px 3px 6px rgba(0,0,0,0.2);
    border-radius: 50px;  /* pill shape */
    padding: 15px;
    transition: transform 0.1s;
}

input[type="button"]:active {
    transform: scale(0.95);
}

/* Grid rows */
.row1, .row2, .row3, .row4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.row5 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .backgroundscreen {
        height: 60px;
        font-size: 1.5rem;
    }

    input[type="button"] {
        font-size: 1.2rem;
        padding: 12px;
    }
}

@media (max-width: 320px) {
    .backgroundscreen {
        height: 50px;
        font-size: 1.2rem;
    }

    input[type="button"] {
        font-size: 1rem;
        padding: 10px;
    }
}
