html, body {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #fff;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 60px; /* Space for footer */
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

header {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    width: 100%;
}

h1 {
    margin: 0;
}

main {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 10px;
}

#offer-container {
    background-color: #fff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 16px;
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.button-row {
    display: flex;
    justify-content: center; /* Center buttons horizontally */
    align-items: center; /* Center vertically */
    width: 100%;
    margin-top: 16px;
    gap: 16px; /* Space between buttons */
    flex-wrap: nowrap; /* Prevent wrapping to new line */
}

#prev-button,
#next-button {
    background-color: #0051ff; /* HD-style vibrant blue */
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 81, 255, 0.3);
    white-space: nowrap;
    flex: 1 1 auto;
    max-width: 160px;
    min-width: 120px;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px;
    position: fixed;
    width: 100vw;
    bottom: 0;
    left: 0;
    z-index: 10;
    font-size: 16px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #prev-button,
    #next-button {
        font-size: 14px;
        padding: 10px 16px;
        min-width: 100px;
        max-width: 120px;
    }
}

/* For iOS Safari safe area */
@supports(padding: max(0px)) {
    body {
        padding-bottom: max(60px, env(safe-area-inset-bottom));
    }

    footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Responsive tables inside offer-container */
#offer-container table {
    width: 100% !important;
    max-width: 500px;
    box-sizing: border-box;
    word-break: break-word;
}

#offer-container td, #offer-container th {
    box-sizing: border-box;
    word-break: break-word;
    padding: 8px;
    font-size: 16px;
}

@media (max-width: 600px) {
    #prev-button,
    #next-button {
        font-size: 14px;
        padding: 10px 16px;
        min-width: 100px;
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    #prev-button,
    #next-button {
        font-size: 13px;
        padding: 8px 12px;
        min-width: 110px;
    }
}