/* Base styling */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    /* Modern soft gradient background */
    background: linear-gradient(180deg, #f0f4f8 0%, #d9e4f5 100%);
    color: #222;
    transition: background 0.3s ease, color 0.3s ease;
    padding-bottom: 60px; /* space for footer */
}
body.dark {
    /* Deep, rich gradient for dark mode */
    background: linear-gradient(180deg, #0d1b2a 0%, #1b263b 100%);
    color: #eee;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    /* Use a vibrant gradient for the header */
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.header-btns button {
    margin-left: 8px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.header-btns button:hover {
    opacity: 0.85;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

section {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
}
body.dark section {
    background: rgba(20, 28, 40, 0.85);
}
section h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}
section .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

button.button {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    transition: opacity 0.2s ease;
}
button.button:hover {
    opacity: 0.85;
}

input[type="number"],
input[type="text"],
input[type="password"] {
    padding: 8px 10px;
    border: 1px solid #ccd1d9;
    border-radius: 8px;
    width: 80px;
    background: #fff;
    transition: border-color 0.2s ease;
}
input[type="number"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #6a11cb;
}
input.regular-text {
    width: 100%;
    max-width: 400px;
}

/* Log styling */
pre.log {
    background: #111;
    color: #0f0;
    font-family: Consolas, monospace;
    padding: 10px;
    height: 250px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid #222;
}
body.dark pre.log {
    background: #000;
    color: #0f0;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 10px;
    background: #0077b6;
    color: #fff;
    font-size: 14px;
    z-index: 1000;
}
body.dark footer {
    background: #003b5e;
}

/* Progress bar */
#progressBarContainer {
    position: fixed;
    bottom: 30px;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.2);
    z-index: 999;
}
#progressBar {
    height: 6px;
    width: 0;
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    transition: width 1s linear;
}
#progressText {
    position: fixed;
    bottom: 40px;
    right: 10px;
    color: #6a11cb;
    font-weight: bold;
    z-index: 1000;
}

/* Login page styles */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(180deg, #f9f9fb, #e9f3f9);
}
.login-card {
    background: #fff;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.login-card h1 {
    margin-bottom: 20px;
    color: #00a8e8;
}
.login-card label {
    display: block;
    margin-top: 10px;
}
.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 5px;
}
.login-card .remember {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.login-card button {
    margin-top: 15px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: #00a8e8;
    color: #fff;
    cursor: pointer;
    width: 100%;
}
.login-card button:hover {
    background: #0077b6;
}
.login-card .error {
    color: #f55;
    margin-top: 10px;
}