body {
    background-color: #1e1e2f;
    color: #c8c8c8;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

#dashboard, #worker-details, #history {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    margin: 0 auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    overflow-x: auto;
}

th, td {
    padding: 10px;
    border: 1px solid #444;
    text-align: left;
    word-wrap: break-word;
}

th {
    background-color: #333;
}

tr:nth-child(even) {
    background-color: #2b2b3c;
}

button {
    padding: 10px 15px;
    background-color: #444;
    color: #c8c8c8;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
}

button:hover {
    background-color: #555;
}

h1 {
    margin: 20px 0;
    text-align: center;
}

#stats {
    margin: 20px 0;
    font-size: 18px;
    text-align: center;
}

a {
    color: #c8c8c8;
    text-decoration: none;
}

a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        width: 100%; /* Ensure full width for small screens */
    }

    th, td {
        font-size: 14px;
        padding: 8px;
    }

    h1 {
        font-size: 24px;
    }

    #stats {
        font-size: 16px;
    }
}

/* Color scale for hashrate */
.high-hashrate {
    color: #32CD32; /* Green for highest hashrate */
}

.medium-hashrate {
    color: #FFD700; /* Yellow for medium hashrate */
}

.low-hashrate {
    color: #FF6347; /* Red for low hashrate */
}

.table-container {
    width: 100%;
    overflow-x: auto; /* Allows horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
}

table {
    min-width: 1000px; /* Ensure table doesn't shrink too much */
    border-collapse: collapse;
}

th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

@media (max-width: 600px) {
    table {
        width: 100%; /* Ensure full width for small screens */
    }
}
