/* Resetting some default styles */
body, h1, p, label, input, button, table {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', 'Arial', 'Arial';
    letter-spacing: 0.3px; /* Subtle spacing for smoother look */
    font-weight: 400; /* Slightly lighter default weight for a modern feel */
}

h1 {
    color: #333;
}

body {
    display: flex;
    font-family: Arial, sans-serif;
    text-align: center;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #000000; /* Light background to emphasize the 3D effect */
    margin: 0;
}

.phone-frame {
    width: 360px;
    height: 640px;
    background: #fff;
    border: 8px solid #333;
    border-radius: 36px;
    position: relative;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), /* Large shadow for depth */
                0 4px 8px rgba(0, 0, 0, 0.2);  /* Smaller shadow for more depth */
    transform: rotateX(2deg) rotateY(-2deg); /* Subtle tilt for 3D effect */
    overflow: hidden; /* Ensures that the internal content doesn't overflow outside the phone frame */
    background: linear-gradient(180deg, #000000, #f0f0f0); /* Gradient for glossy effect */
}

.phone-footer {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 5px;
    background: #333;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* Slight shadow for a subtle 3D effect */
}

.phone-header {
    text-align: center;
    padding: 2px;
    background-color: #333;
    color: #fff;
    overflow: hidden; /* Hide overflow to prevent any part of the image from showing outside */
}

.phone-header img {
    width: 80%; /* Make the image take the full width of the container */
    height: auto; /* Keep the height auto to maintain aspect ratio */
    object-fit: contain; /* Scale the image to cover the container */
    object-position: center; /* Center the image */
}

.phone-screen {
    padding: 10px; /* Adjust padding for a better fit */
    height: calc(100% - 50px - 50px); /* Adjust height to ensure space for footer and button */
    overflow-y: auto;
    text-align: center;
    background: #ffffff; /* Light background color for the screen */
    border-radius: 20px; /* Match the frame’s border radius for a smooth look */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2); /* Inner shadow for a recessed effect */
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px; /* Smaller font size to fit better */
}

.phone-screen h1 {
    margin-bottom: 10px;
    font-size: 16px; /* Adjust font size for better fit */
    color: #000000; /* Black text for the title */
}

.phone-image {
    max-width: 100%; /* Ensures image scales with screen size */
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 10px; /* Reduced space between the image and the form */
    border-radius: 10px; /* Optional: rounded corners for a smoother look */
}

/* Form container */
form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 320px; /* Max width to fit inside phone */
}

.date-container {
    margin-bottom: 8px;
}

select, input[type="number"] {
    width: 100%;
    padding: 6px; /* Smaller padding */
    font-size: 12px; /* Smaller font size */
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

input[type="number"] {
    -moz-appearance: textfield; /* Hide spinners for Firefox, Chrome, Safari, Edge */
}

button {
    padding: 6px 12px; /* Reduced padding */
    border: solid 2px #009900; /* Border for visibility */
    border-radius: 5px;
    background: linear-gradient(145deg, #008000, #009900); /* Glossy gradient */
    color: #009900;
    font-size: 12px; /* Smaller font size */
    cursor: pointer;
    align-self: center;
    margin-top: 8px;
    position: relative; /* More predictable positioning */
}

/* Add flex to the container for the buttons */
.button-container {
    display: flex;
    gap: 8px; /* Space between buttons */
    justify-content: center; /* Align buttons horizontally */
}

/* Remove centering from buttons */
button {
    padding: 6px 12px;
    border: solid 2px #009900; /* Border for visibility */
    border-radius: 5px;
    background-color: #008000;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    margin-top: 2px;
    margin-bottom: 2px; /* Added bottom margin to ensure it is visible */
    width: auto; /* Ensure buttons only take up their natural width */
}

button:hover {
    background: linear-gradient(145deg, #009900, #00FF00); /* Reversed gradient for hover effect */
}

/* Grid container for hourly input fields */
.grid-container {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduced space between rows of fields */
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 8px; /* Reduced space between fields in a row */
    flex-wrap: wrap; /* Allow columns to wrap if needed */
}

.field {
    width: 30%; /* Adjust width of input fields */
    text-align: left;
}

@media (max-width: 400px) {
    .phone-frame {
        max-width: 100%;
        max-height: 100vh; /* Limit maximum height to viewport height */
    }

    /* Ensure button is visible on smaller screens */
    button {
        margin-top: 10px; /* Increased margin for better visibility */
        width: 40%; /*
    }

    .grid-container {
        flex-direction: column;
    }

    .row {
        flex-direction: column;
        align-items: stretch;
    }

    .field {
        width: 100%; /* Full width for small screens */
    }
}
