html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: monospace, Arial, sans-serif; 
    background-color: #121212; /* Dark background */
    color: white; /* Light text color */
}

.heading {
    text-align: center;
    font-size: 3.5rem;
    font-weight: bold;
}

    /* Chart background */
    canvas {
        background-color: #1e1e1e; /* Dark background for chart */
        border: 1px solid #3a3a3a; /* Lighter border for chart */
    }
    
    #resetButton {
        cursor: pointer;
        font-size: 24px;
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    #stats {
        color: #8c8c8c;
        display: inline;
        font-size: 0.8rem;
    }

    #stats span {
        color: #fff;
    }
    
    @media screen and (width <= 850px) {
        
        .heading {
            font-size: 2.5rem;   
        }
    
    
        span#stats {
            display: inline-block;
            width: 100%;
            text-align: center;
        }
    }
    
    @media screen and (width > 850px) {
        span#stats {
            position: absolute;
            top: 20px;
            right: 80px;
            max-width: 120px;
            /*border: 1px solid white;*/
        }
    }
    
    
    /* Canvas to occupy no more than 50% of the height of the display */
    #fuelChart {
        max-height: 50vh; /* 50% of the viewport height */
        width: 100%; /* Full width */
    }

    #data-table {
        max-height: 35vh; /* Set max height to 30% of viewport height */
        overflow-y: auto; /* Enables vertical scrolling */
        overflow-x: hidden; /* Disable horizontal scrolling */
        display: block; /* Make the container block */
    }
    
    #data-table .stats {
        position: sticky;
        color: #333;
        text-align: center;
    }
    
    #data-table .stats span {
        color: white;
        font-style: italic;
    }

    /* Modal Styles */
    .modal {
        display: none;
        position: fixed;
        z-index: 1;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 0, 0, 0.8); /* Dark transparent background for modals */
        padding-top: 60px;
    }

    .modal-content {
        background-color: #1e1e1e; /* Dark modal background */
        margin: 5% auto;
        padding: 20px;
        border: 1px solid #888;
        width: 300px;
        text-align: center;
        color: white; /* Light text in modal */
    }

    .close {
        color: #aaa;
        float: right;
        font-size: 28px;
        font-weight: bold;
    }

    .close:hover,
    .close:focus {
        color: red;
        cursor: pointer;
    }

    /* Input and button styles */
    input[type="date"],
    input[type="number"],
    #submitEntry,
    #openModal {
        background-color: #333333; /* Dark input backgrounds */
        color: white; /* Light input text */
        border: none; /* Remove borders */
        width: 100%; /* Full width */
        padding: 10px; /* Spacing */
        margin: 10px 0; /* Vertical spacing */
        box-sizing: border-box; /* Box model */
        font-size: 16px; /* Font size */
    }

    /* Button styles */
    #submitEntry,
    #openModal {
        background-color: #1DA1D8; /* Button background color */
        color: white; /* Button text color */
        cursor: pointer; /* Pointer on hover */
        font-size: 18px; /* Larger font */
        border-radius: 5px; /* Slightly rounded corners */
    }

    /* Change button color on hover */
    #submitEntry:hover,
    #openModal:hover {
        background-color: #27D3F5; /* Lighter shade on hover */
    }

    /* Error messages */
    #errorMsg {
        color: red; /* Error message color */
        display: none; /* Initially hidden */
    }



.canvas-container {
    flex: 1; /* Takes up half of the height */
    /*background: #f0f0f0;*/
    display: flex;
    justify-content: center;
    align-items: center;
}

#fuelChart {
    border: 1px solid #000;
    width: 100%;
    height: 100%;
}

#data-table {
    flex: 2; /* Takes up the other half of the height */
    overflow: auto; /* Allows scrolling */
}

table {
    width: 100%;
    /*margin: 0 auto;*/
    /*border-collapse: collapse;*/
}

th, td {
    padding: 8px;
     border: 1px solid #3a3a3a; /* Lighter borders */
    text-align: left;
}

thead {
    position: sticky;
    top: 0; /* Fixes the header */
    background-color: #333333;
}


