@media (orientation: portrait) {

    body, html {
        overflow: hidden;
        height: 100%;
    }

    body {
        background-color: #f0f2f5; /* Lighter, neutral background for a fresh look */
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        width: 100%;
        margin: 0;
        padding: 0;
        font-family: 'Helvetica Neue', Arial, sans-serif; /* Modern, clean font */
    }

    #login {
        background-color: #ffffff; /* Clean white background */
        width: 95%; /* Full width with slight margin */
        max-width: 400px; /* Optimal width for readability */
        border: none;
        padding: 5% 10%; /* Proportional padding */
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
        border-radius: 15px; /* Rounded corners for a softer look */
        margin: 5% auto; /* Ensure some margin from the top */
    }

    #head {
        font-size: 2.5em; /* Adjusted for emphasis but not too large */
        color: #333333; /* Darker color for contrast */
        margin-bottom: 2rem; /* Logical spacing */
        text-align: center;
    }

    #username, #password {
        width: 100%; /* Full width of the form */
        font-size: 1em; /* Standard size, keeping inputs clean and functional */
        padding: 15px; /* Comfortable padding */
        margin: 10px 0; /* Space between elements */
        border: 1px solid #cccccc; /* Subtle border */
        border-radius: 8px; /* Slightly rounded corners */
        background-color: #f7f7f7; /* Slightly off-white for depth */
    }

    button {
        width: 100%;
        padding: 15px;
        font-size: 1em;
        background-color: #007bff; /* Modern blue */
        color: #ffffff; /* Clean white text */
        border: none;
        border-radius: 8px; /* Consistency in rounding */
        cursor: pointer;
        margin: 20px 0;
        transition: background-color 0.3s; /* Smooth transition for interactive feedback */
    }

    button:hover {
        background-color: #0056b3; /* Darker shade on hover */
    }

    #noacc, #register {
        font-size: 1em; /* Keeping it simple and readable */
        color: #606060; /* Soft color for a modern look */
        margin-top: 20px;
        text-align: center;
    }

    #register {
        color: #007bff; /* Link color matches button for consistency */
        text-decoration: none; /* Opting for a clean look */
        font-weight: bold; /* Emphasis on actionable items */
    }

    #register:hover {
        text-decoration: underline; /* Underline on hover for a classic indication */
    }
}


/* Additional styles for landscape orientation if needed */
@media (orientation: landscape) {
    body {
        background-color: #8b8b8b;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        margin: 0;
        font-family: 'Arial', sans-serif;
    }
    
    #login {
        background-color: #b4b4b4;
        width: 20%;
        min-width: 300px;
        border: none;
        padding: 40px;
        box-sizing: border-box;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
        border-radius: 8px;
        position: relative; /* Ensure this is positioned relatively for absolute children positioning */
    }
    
    #usrlogin, #passlogin {
        display: block;
        margin-bottom: 5px;
        color: #606060;
        font-weight: normal;
    }
    
    #username, #password {
        width: calc(100% - 20px);
        padding: 10px;
        margin-bottom: 20px;
        border: 1px solid #9a9a9a;
        border-radius: 4px;
        background-color: #d6d6d6;
    }
    
    #username:focus, #password:focus {
        border-color: #4A90E2;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(74, 144, 226, 0.3);
        outline: none;
    }
    
    button {
        width: 100%;
        padding: 10px;
        background-color: #005f56;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
    }
    
    button:hover {
        background-color: #00796b;
    }
    
    #noacc, #register {
        text-align: center;
        color: #757575;
        font-size: 14px;
        width: 100%; /* Ensure full width to center text properly */
        display: block; /* Display as block for stacking */
    }
    
    #noacc {
        margin-top: 20px; /* Adjusted spacing */
    }
    
    #register {
        color: #4A90E2;
        font-weight: bold;
        text-decoration: none;
        transition: color 0.3s;
        margin-top: 10px; /* Reduced space to bring it closer to #noacc */
    }
    
    #register:hover {
        color: #3b82f6;
    }
    
}
