body {
    font-family: 'Special Elite', cursive;
    background-color: #0A0E1A;
    color: #E6E6FA;
    margin: 0;
    padding: 0;
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    overflow-y: auto; /* Allow vertical scrolling for the entire page */
}

.scheduler-container {
    max-width: 1200px;
    margin: 20px auto; /* Reduced top/bottom margin for better spacing */
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Add spacing between sections */
}

.scheduler-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
}

.scheduler-status {
    margin-bottom: 20px; /* Reduced margin to save space */
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.scheduler-status h2 {
    font-size: 1.8em;
    color: #00D4FF;
    margin: 0 20px 10px 0;
}

.scheduler-table-wrapper {
    margin-bottom: 20px; /* Reduced margin to save space */
}

.table-container {
    max-height: 400px; /* Keep table scrollable */
    overflow-y: auto;
    background-color: #1A1F33;
    border-radius: 8px;
    padding: 10px;
}

.scheduler-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1A1F33;
}

.scheduler-table th,
.scheduler-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #2A2F44;
}

.scheduler-table th {
    background-color: #2A2F44;
    color: #00D4FF;
    position: sticky;
    top: 0;
    z-index: 1;
}

.scheduler-table td {
    color: #E6E6FA;
}

.no-data {
    text-align: center;
    padding: 20px;
}

.add-schedule-form {
    background-color: #1A1F33;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 80px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}

.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 8px;
    font-size: 1em;
    border: none;
    border-radius: 4px;
    background-color: #2A2F44;
    color: #E6E6FA;
    box-sizing: border-box;
}

.days-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.days-checkboxes label {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1 1 30%;
}

.button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.button-run,
.button-test {
    background-color: #00D4FF;
    color: #000;
}

.button-submit {
    background-color: #FFD700;
    color: #000;
    width: 100%;
    margin-top: 10px;
}

.button-delete {
    background-color: #FF4500;
    color: #FFF;
}

.button-start {
    background-color: #00FF00;
    color: #000;
}

.button-stop {
    background-color: #FF0000;
    color: #FFF;
}

.button:hover {
    opacity: 0.9;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .scheduler-container {
        padding: 10px;
        margin: 10px auto; /* Reduced margin for mobile */
    }

    .scheduler-status {
        flex-direction: column;
        align-items: stretch;
    }

    .scheduler-status button {
        width: 100%;
        margin-bottom: 10px;
    }

    .scheduler-table {
        display: block;
        overflow-x: auto;
    }

    .scheduler-table thead {
        display: none;
    }

    .scheduler-table tbody,
    .scheduler-table tr {
        display: block;
    }

    .scheduler-table tr {
        margin-bottom: 15px;
        border-bottom: 1px solid #2A2F44;
    }

    .scheduler-table td {
        display: block;
        text-align: right;
        padding: 8px;
        position: relative;
        border-bottom: none;
    }

    .scheduler-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        color: #00D4FF;
    }

    .scheduler-table td[data-label="Actions"] {
        text-align: center;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .days-checkboxes label {
        flex: 1 1 45%;
    }

    .add-schedule-form {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .scheduler-title {
        font-size: 1.8em;
    }

    .scheduler-status h2 {
        font-size: 1.4em;
    }

    .days-checkboxes label {
        flex: 1 1 100%;
    }

    .form-group input[type="number"],
    .form-group select {
        font-size: 0.9em;
    }

    .button {
        font-size: 0.9em;
        padding: 8px 16px;
    }
}