/* Global Styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Calibri', sans-serif;
    background-color: #f0f0f0;
    color: #333;
}

/* Header */
header {
    background-color: #111;
    color: #fff;
    text-align: center;
    padding: 10px;
}

header img {
    max-width: 150px; /* Adjusted for better mobile display */
    width: 35%;
    height: auto;
    margin-bottom: 10px;
}

header h1 {
    font-size: 1.5em;
    margin: 0;
}

/* Main Content */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

section {
    width: 100%;
    max-width: 500px;
    margin-bottom: 20px;
}

section p {
    font-size: 1em;
    margin-bottom: 10px;
    text-align: center;
}

section input {
    width: 80%;           /* Changed from 100% to 80% */
    max-width: 300px;     /* Added max-width for larger screens */
    padding: 10px;
    font-size: 1em;
    margin: 0 auto 10px;  /* Centered using margin */
    display: block;       /* Ensure it's treated as a block element */
}

section button {
    width: 80%;           /* Changed from 100% to 80% */
    max-width: 300px;     /* Added max-width for larger screens */
    padding: 10px;
    font-size: 1em;
    cursor: pointer;
    margin: 0 auto 10px;  /* Centered using margin */
    display: block;       /* Ensure it's treated as a block element */
}

#loginMessage {
    color: red;
    text-align: center;
}

/* Calculator Section */
.calculator-section, .qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#codeOutput {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 10px;
}

/* QR Code Section */
.qr-section {
    margin-top: 20px;
}

#qrCodeContainer {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
}

.hour-input {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.hour-input label {
    margin-right: 10px;
}

.hour-input input {
    width: 60px;
    padding: 5px;
    text-align: center;
}

/* Footer */
footer {
    background-color: #333;
    color: #d1d1d1;
    text-align: center;
    padding: 10px;
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* Media Queries for Responsiveness */
@media (min-width: 600px) {
    header h1 {
        font-size: 2em;
    }

    section input, section button {
        width: 60%;          /* Reduced width for larger screens */
    }

    #qrCodeContainer {
        width: 250px;
        height: 250px;
    }
}
