body {
    background-color: #2c3e50;
    color: white;
    font-family: 'Tahoma', sans-serif;
    height: 100vh; /* Ensure body takes full viewport height */
    margin: 0; /* Remove default margin */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px; /* Reduced padding */
    display: flex;
    flex-direction: column; /* Stack content vertically */
    justify-content: space-between; /* Ensure footer stays at bottom */
}

/* Table styles */
.table {
    background-color: #ecf0f1;
    color: black;
    border: 1px solid #ccc;
    width: 100%;
    table-layout: fixed;
}

.table th,
.table td {
    padding: 10px;
    word-wrap: break-word;
}

.table th {
    background-color: #ecf0f1;
    color: rgb(0, 0, 0);
}

/* Make table scrollable with increased height */
.table-responsive {
    max-height: 80vh; /* Maximum height for scrolling */
    overflow-y: auto; /* Enable vertical scrolling */
    display: block;
}

.table thead {
    position: sticky; /* Keep header fixed */
    top: 0;
    z-index: 1; /* Ensure header stays above content */
}

.form-control,
.form-select {
    background-color: #34495e;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 10px;
}

.btn {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    margin-bottom: 10px;
}

.btn-primary {
    background-color: #2980b9;
    border: none;
}

.btn-success {
    background-color: #27ae60;
    border: none;
}

.btn-danger {
    background-color: #e74c3c;
    border: none;
}

.btn-info {
    background-color: #2980b9;
    border: none;
}

.btn-secondary {
    background-color: #34495e;
    border: none;
}

.btn:disabled {
    background-color: #7f8c8d;
    cursor: not-allowed;
}

progress {
    width: 100%;
    height: 20px;
    margin-bottom: 15px;
    background-color: #34495e;
    border-radius: 5px;
}

progress::-webkit-progress-bar {
    background-color: #34495e;
    border-radius: 5px;
}

progress::-webkit-progress-value {
    background-color: #27ae60;
    border-radius: 5px;
}

progress::-moz-progress-bar {
    background-color: #27ae60;
    border-radius: 5px;
}

#progressInfo {
    font-size: 14px;
    color: #ecf0f1;
    text-align: center;
}

.alert {
    margin-bottom: 15px;
}

/* Adjust control panel position */
.sticky-controls {
    position: sticky;
    top: 30px; /* Increased top offset to move panel down slightly */
    height: fit-content;
}

/* Align table header with control buttons */
.table-title {
    margin-top: 0; /* Align with controls */
    margin-bottom: 10px; /* Reduced margin */
}

/* Footer styles */
.footer {
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    color: #ecf0f1;
    background-color: #34495e;
    border-top: 1px solid #ecf0f1;
    margin-top: auto;
}

/* Desktop-specific styles */
@media (min-width: 768px) {
    body {
        overflow: hidden; /* Disable scrolling on desktop */
    }
    .container {
        height: 100vh; /* Ensure container takes full viewport height */
        overflow: hidden; /* Disable scrolling on container */
    }
}

/* Mobile-specific styles */
@media (max-width: 767px) {
    body {
        overflow: auto; /* Enable scrolling on mobile */
    }
    .container {
        height: auto; /* Allow container to grow with content */
        overflow: visible; /* Enable scrolling on container */
    }
    .sticky-controls {
        position: static;
        margin-bottom: 20px;
        top: 20px; /* Adjusted for mobile */
    }
    .table th,
    .table td {
        font-size: 12px;
        padding: 5px;
    }
    .btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    .form-control,
    .form-select {
        padding: 6px;
        font-size: 12px;
    }
    #progressInfo {
        font-size: 12px;
    }
    .table-title {
        margin-top: 20px; /* Restore margin on mobile */
    }
    .table-responsive {
        max-height: 60vh; /* Adjusted height for mobile */
    }
    .footer {
        font-size: 12px;
        padding: 8px 0;
    }
}