body {
    /* background: linear-gradient(135deg, #353b37 0%, #1a1e1c 50%, #0f1110 100%); */
    background: rgb(29, 29, 29);
    color: white;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-attachment: fixed;
}

h1 {
    font-size: 2.2rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
    padding: 0.3rem 0.3rem;
    color: white;
    background: linear-gradient(90deg, transparent 0%, #2b2f2c 20%, #1a1e1c 50%, #2b2f2c 80%, transparent 100%);
    border-bottom: 3px solid;
    border-top: 3px solid;
    border-image: linear-gradient(90deg, transparent 0%, rgba(205, 155, 250, 0.7) 20%, rgba(205, 155, 250, 1) 50%, rgba(205, 155, 250, 0.7) 80%, transparent 100%) 1;
    /* text-shadow: 2px 2px 4px rgb(0, 0, 0); */
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.rem;
        padding: 0.3rem 0.3rem;
    }
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.title {
    margin-left: 15px;
    font-size: 24px;
    margin-right: 12px;
    font-weight: bold;
    text-align: center;
}

.tooltip {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 25px;
    display: block;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10;
    max-width: 300px;
    min-width: 200px;
    box-sizing: border-box;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .tooltip::after {
        display: none !important;
    }
}

.totalM {
    font-size: 21px;
    color: rgb(255, 255, 255);
    border: 2px solid white;
    border-radius: 25px;
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: 2px;
    padding-top: 2px;
    margin-right: 7px;
    text-align: center;
}

.totalB {
    font-size: 21px;
    color: rgb(255, 255, 255);
    border: 2px solid white;
    border-radius: 25px;
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: 2px;
    padding-top: 2px;
    margin-right: 20px;
    text-align: center;
}

#migrantChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #migrantChart {
        height: 330px;
    }
}

#boatChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #boatChart {
        height: 330px;
    }
}

.monthly-totals,
.yearly-totals,
.migrantarrival-xdays,
.migrantarrival-xdays-average,
.migrantarrival-labour,
.yearly-boats-totals {
    margin: 10px auto;
    width: 83.2%;
    background: #2b2f2c;
    padding: 5px;
    color: white;
    font-size: 18px;
    border-radius: 25px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
        url('bgimage.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    box-shadow: 0 0 15px 3px rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    transition: all 0.3s ease-in-out;
    border: 4px solid rgb(255, 255, 255);
}

.yearly-totals {
    border: 4px solid rgb(255, 239, 14) !important;
}

.migrantarrival-xdays {
    border: 4px solid rgb(0, 234, 255);
}

.migrantarrival-xdays-average {
    border: 4px solid rgb(0, 255, 60);
}

.migrantarrival-labour {
    border: 4px solid rgb(219, 36, 30);
}

.yearly-boats-totals {
    border: 4px solid white;
}

.yearly-totals:hover,
.migrantarrival-xdays:hover,
.migrantarrival-xdays-average:hover,
.migrantarrival-labour:hover,
.yearly-boats-totals:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.2);
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('bgimage.jpg');
}

.monthly-totals:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.2);
}

.year-total,
.year-boats-total,
#migrantsCount7,
#migrantsCount14,
#migrantsCount30,
#migrantsCount180,
#migrantsCount365,
#totalBoats7,
#totalBoats14,
#totalBoats30,
#totalBoats180,
#totalBoats365,
#totalMigrant7Average,
#totalMigrant14Average,
#totalMigrant30Average,
#totalMigrant180Average,
#totalMigrant365Average,
#totalBoat7Average,
#totalBoat14Average,
#totalBoat30Average,
#totalBoat180Average,
#totalBoat365Average,
#totalMigrantsLabour,
#totalBoatsLabour,
#totalMigrantCostSinceLabour {
    transition: all 0.2s ease-in-out;
}

.year-total:hover,
.year-boats-total:hover,
#migrantsCount7:hover,
#migrantsCount14:hover,
#migrantsCount30:hover,
#migrantsCount180:hover,
#migrantsCount365:hover,
#totalBoats7:hover,
#totalBoats14:hover,
#totalBoats30:hover,
#totalBoats180:hover,
#totalBoats365:hover,
#totalMigrant7Average:hover,
#totalMigrant14Average:hover,
#totalMigrant30Average:hover,
#totalMigrant180Average:hover,
#totalMigrant365Average:hover,
#totalBoat7Average:hover,
#totalBoat14Average:hover,
#totalBoat30Average:hover,
#totalBoat180Average:hover,
#totalBoat365Average:hover,
#totalMigrantsLabour:hover,
#totalBoatsLabour:hover,
#totalMigrantCostSinceLabour:hover {
    transform: scale(1.03);
    background-color: rgba(34, 32, 32, 0.9);
}

.totalM:hover,
.totalB:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.monthly-totals h2 {
    text-align: center;
    margin-top: 3px;
    margin-bottom: 0px;
    font-size: 24px;
}

.yearly-totals h2 {
    text-align: center;
    margin-top: 3px;
    margin-bottom: 3px;
    font-size: 24px;
}

.year-total {
    display: inline-block;
    margin: 7px;
    padding: 7px;
    margin-bottom: 10px;
    margin-top: 10px;
    border: 2px solid rgb(255, 239, 14);
    border-radius: 25px;
    background-color: rgba(34, 32, 32, 0.8);
    width: 150px;
    text-align: center;
    box-shadow: 0 0 8px rgb(255, 239, 14);
}

.yearly-boats-totals {
    margin: 10px auto;
    width: 83.2%;
    background: #2b2f2c;
    padding: 5px;
    border-radius: 25px;
    color: white;
    font-size: 18px;
    border: 4px solid white;
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
        url('bgimage.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    box-shadow: 0 0 15px 3px rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    transition: all 0.2s ease-in-out;
}

.yearly-totals h3 {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 3px;
    font-size: 24px;
}

.year-boats-total {
    display: inline-block;
    margin: 7px;
    padding: 7px;
    margin-bottom: 10px;
    margin-top: 10px;
    border: 2px solid rgb(255, 187, 14);
    border-radius: 25px;
    background-color: rgba(34, 32, 32, 0.8);
    width: 150px;
    text-align: center;
    box-shadow: 0 0 8px rgb(255, 187, 14);
}

#yearlyTotals {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0px;
}

#yearlyBoatsTotals {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.colour-text {
    color: rgb(205, 155, 250);
    font-weight: bold;
    text-shadow: 1px 1px 2px rgb(0, 0, 0), 0 0 1em rgb(0, 0, 0), 0 0 0.2em rgb(0, 0, 0);
}

.colour-text-two {
    color: rgb(207, 176, 234);
    font-weight: normal;
    text-shadow: 1px 1px 2px rgb(0, 0, 0), 0 0 1em rgb(0, 0, 0), 0 0 0.2em rgb(0, 0, 0);
}

.spaced {
    margin-top: 8px;
    font-size: 16px;
}

.migrantarrival-xdays {
    margin: 10px auto;
    width: 83.2%;
    background: #2b2f2c;
    padding: 5px;
    color: white;
    font-size: 18px;
    border: 4px solid rgb(0, 234, 255);
    border-radius: 25px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
        url('bgimage.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    box-shadow: 0 0 15px 3px rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    transition: all 0.2s ease-in-out;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.migrantarrival-xdays h2 {
    text-align: center;
    margin-top: 3px;
    margin-bottom: 3px;
    font-size: 24px;
}

.migrantarrival-xdays h3 {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 3px;
    font-size: 24px;
}

.migrantarrival-xdays-average {
    margin: 10px auto;
    width: 83.2%;
    background: #2b2f2c;
    padding: 5px;
    color: white;
    font-size: 18px;
    border: 4px solid rgb(0, 255, 60);
    border-radius: 25px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
        url('bgimage.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    box-shadow: 0 0 15px 3px rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    transition: all 0.2s ease-in-out;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.migrantarrival-xdays-average h2 {
    text-align: center;
    margin-top: 3px;
    margin-bottom: 3px;
    font-size: 24px;
}

.migrantarrival-xdays-average h3 {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 3px;
    font-size: 24px;
}

#migrantsCount7,
#migrantsCount14,
#migrantsCount30,
#migrantsCount180,
#migrantsCount365 {
    display: inline-block;
    margin: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border: 2px solid rgb(0, 234, 255);
    border-radius: 25px;
    background-color: rgba(34, 32, 32, 0.8);
    width: 175px;
    text-align: center;
    box-shadow: 0 0 8px rgb(0, 234, 255);
}

#totalBoats7,
#totalBoats14,
#totalBoats30,
#totalBoats180,
#totalBoats365 {
    display: inline-block;
    margin: 10px;
    padding: 10px;
    border: 2px solid rgb(23, 108, 255);
    border-radius: 25px;
    background-color: rgba(34, 32, 32, 0.8);
    width: 175px;
    text-align: center;
    box-shadow: 0 0 8px rgb(23, 108, 255);
}

#totalMigrant7Average,
#totalMigrant14Average,
#totalMigrant30Average,
#totalMigrant180Average,
#totalMigrant365Average {
    display: inline-block;
    margin: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border: 2px solid rgb(0, 255, 60);
    border-radius: 25px;
    background-color: rgba(34, 32, 32, 0.8);
    width: 148px;
    text-align: center;
    box-shadow: 0 0 8px rgb(0, 255, 60);
}

#totalBoat7Average,
#totalBoat14Average,
#totalBoat30Average,
#totalBoat180Average,
#totalBoat365Average {
    display: inline-block;
    margin: 10px;
    padding: 10px;
    border: 2px solid rgb(34, 224, 138);
    border-radius: 25px;
    background-color: rgba(34, 32, 32, 0.8);
    width: 148px;
    text-align: center;
    box-shadow: 0 0 8px rgb(34, 224, 138);
}

.migrantarrival-labour {
    margin: 10px auto;
    width: 83.2%;
    background: #2b2f2c;
    padding: 5px;
    color: white;
    font-size: 18px;
    border: 4px solid rgb(219, 36, 30);
    border-radius: 25px;
    background-image: linear-gradient(rgba(22, 2, 1, 0.8), rgba(0, 0, 0, 0.8)),
        url('bgimage.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    box-shadow: 0 0 15px 3px rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    transition: all 0.2s ease-in-out;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.migrantarrival-labour h2 {
    text-align: center;
    margin-top: 3px;
    margin-bottom: 3px;
    font-size: 24px;
}

#totalMigrantsLabour,
#totalBoatsLabour,
#totalMigrantCostSinceLabour {
    display: inline-block;
    margin: 10px;
    padding: 10px;
    border: 2px solid rgb(219, 36, 30);
    border-radius: 25px;
    background-color: rgba(34, 32, 32, 0.8);
    width: 200px;
    text-align: center;
    box-shadow: 0 0 8px rgb(219, 36, 30);
    color: white;
}

#totalMigrantsLabour .colour-text,
#totalBoatsLabour .colour-text {
    font-size: 3em;
    font-weight: bold;
    color: white;
}

#totalMigrantCostSinceLabour .colour-text {
    font-size: 1.4em;
    font-weight: bold;
    color: white;
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(29, 29, 29);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.rowing-boat {
    width: 100px;
    height: 60px;
    position: relative;
    animation: rowing 2s infinite ease-in-out;
}

.boat {
    width: 80px;
    height: 30px;
    background: #6b4423;
    border-radius: 0 0 40px 40px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.rower {
    width: 20px;
    height: 30px;
    background: #555555;
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    animation: rowing-body 1s infinite ease-in-out;
}

.oars {
    width: 100px;
    height: 10px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.oar-left,
.oar-right {
    width: 40px;
    height: 4px;
    background: #888;
    position: absolute;
    top: 50%;
    transform-origin: center;
}

.oar-left {
    left: 0;
    animation: row-left 1s infinite ease-in-out;
}

.oar-right {
    right: 0;
    animation: row-right 1s infinite ease-in-out;
}

.water {
    width: 200px;
    height: 10px;
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

.wave {
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: wave 2s infinite linear;
}

@keyframes rowing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes rowing-body {

    0%,
    100% {
        transform: translateX(-50%) rotate(-10deg);
    }

    50% {
        transform: translateX(-50%) rotate(10deg);
    }
}

@keyframes row-left {

    0%,
    100% {
        transform: rotate(-45deg);
    }

    50% {
        transform: rotate(0deg);
    }
}

@keyframes row-right {

    0%,
    100% {
        transform: rotate(45deg);
    }

    50% {
        transform: rotate(0deg);
    }
}

@keyframes wave {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

#monthlyOverlayMigrantsChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 520px !important;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #monthlyOverlayMigrantsChart {
        height: 330px !important;
    }
}

#annualRunRateChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 520px !important;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #annualRunRateChartContainer {
        height: 350px !important;
    }

    #annualRunRateChart {
        height: 100% !important;
    }
}

.site-footer {
    margin-top: 40px;
    padding: 20px;
    background: #2b2f2c;
    color: white;
    border-top: 4px solid rgb(255, 255, 255);
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
        url('bgimage.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content p {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.5;
}

.footer-content a {
    color: #00eaff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: #00ff3c;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 15px;
    }

    .footer-content p {
        font-size: 12px;
    }
}

.top-arrivals {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    margin: 1rem 0;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.top-entry {
    display: inline-block;
    margin: 10px;
    padding: 10px;
    border: 2px solid rgb(205, 155, 250);
    border-radius: 25px;
    background-color: rgba(34, 32, 32, 0.8);
    width: 300px;
    text-align: center;
    box-shadow: 0 0 8px rgb(255, 143, 244);
    transition: all 0.2s ease-in-out;
}

.top-entry:hover {
    transform: scale(1.03);
    background-color: rgba(34, 32, 32, 0.9);
    margin-right: 10px;
    margin-left: 10px;
}

.top-entry .rank {
    font-weight: bold;
    font-size: 1.9rem;
    color: rgb(255, 239, 14);
    margin-right: 10px;
}

.top-entry .migrants {
    font-weight: bold;
    font-size: 1.5rem;
    color: rgb(205, 155, 250);
    margin: 0 10px;
}

.top-entry .date {
    color: white;
    margin-left: 10px;
    display: inline-block;
}

@media (max-width: 768px) {
    .top-arrivals {
        padding: 1rem;
    }

    .top-entry {
        width: 90%;
        margin: 10px 0;
    }
}

.monthly-totals.top-migrant-arrivals {
    border: 4px solid rgb(205, 155, 250) !important;
}

.monthly-totals.top-migrant-arrivals:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.2);
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('bgimage.jpg');
}

#ytdMigrantCount {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #chartContainer {
        height: 330px !important;
    }

    #ytdMigrantCount {
        height: 100% !important;
    }
}

#currentMonthMigrantsChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #currentMonthMigrantsChartContainer {
        height: 330px !important;
    }

    #currentMonthMigrantsChart {
        height: 100% !important;
    }
}

#totalMigrantsByYearChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #totalMigrantsByYearChartContainer {
        height: 330px !important;
    }

    #totalMigrantsByYearChart {
        height: 100% !important;
    }
}

#averageMigrantsPerBoatChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #averageMigrantsPerBoatChart {
        height: 330px;
    }
}

#weeklyBoatChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #weeklyBoatChartContainer {
        height: 330px;
    }

    #weeklyBoatChart {
        height: 330px;
    }
}

.percentage-change-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    table-layout: fixed;
}

.percentage-change-table th {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 15px 10px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    width: 20%;
}

.percentage-change-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    width: 20%;
}

.percentage-change-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.percentage-change-table tr:last-child td {
    border-bottom: none;
}

.positive-change {
    color: #7fe97d;
    font-weight: bold;
}

.negative-change {
    color: #e97d7d;
    font-weight: bold;
}

.amber-warning {
    color: #ffc107;
    font-weight: bold;
}

@media (max-width: 768px) {
    .percentage-change-table {
        font-size: 12px;
        table-layout: auto;
    }

    .percentage-change-table th,
    .percentage-change-table td {
        padding: 8px 5px;
        font-size: 12px;
        width: auto;
    }
}

#ytdPercentChange {
    font-size: 1.35em;
    font-weight: bold;
    padding: 8px 0 2px 0;
}

#ytdMigrantsTable th {
    font-size: 1.25em;
    font-weight: bold;
    padding: 16px 10px;
}

#ytdMigrantsTable td {
    font-size: 1.25em;
    padding: 14px 10px;
}

#ytdInfo {
    font-style: italic;
}

#monthlyCalendarSection {
    margin: 0 auto;
    max-width: 420px;
    background: rgba(34, 32, 32, 0.01);
    border-radius: 12px;
    padding: 20px 10px 30px 10px;
    color: #fff;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calendar-arrow {
    cursor: pointer;
    font-size: 1.5em !important;
    user-select: none;
    padding: 0 0;
    color: #FFFFFF;
    transition: color 0.2s;
    min-width: 2.5em;
    width: 2.5em !important;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
}

.calendar-arrow:hover {
    color: #CD9BFA;
}

.calendar-title {
    font-size: 1.2em;
    font-weight: bold;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 8px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    color: #FFFFFF;
    padding-bottom: 4px;
}

.calendar-day {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    min-height: 48px;
    text-align: center;
    padding: 2px 0 0 0;
    font-size: 1em;
    position: relative;
    transition: background 0.2s;
    border: 1px solid rgba(0, 234, 255, 0.15);
}

.calendar-day.today {
    background: #ce9bfa13;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 0 8px #CD9BFA;
}

.calendar-day .migrants {
    display: block;
    font-size: 0.95em;
    color: #CD9BFA;
    margin-top: 2px;
}

.calendar-day.empty {
    background: transparent;
    border: none;
    box-shadow: none;
}

.calendar-day[data-migrants="0"] .migrants {
    color: #aaa;
    opacity: 0.6;
}

.monthly-totals>h2+#monthlyCalendarSection {
    margin-top: 10px;
}

.ytd-section {
    border: 4px solid rgb(205, 155, 250) !important;
}

.ytd-section:hover {
    box-shadow: 0 0 20px 5px rgba(205, 155, 250, 0.2);
}

/* Global Grid Layout for Desktop (3 Columns) */
@media (min-width: 1024px) {
    .main-content-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        width: 100% !important;
        max-width: 1920px !important;
        margin: 20px auto -15% auto;
        /* Reduce scale of all content except header/footer */
        transform: scale(0.95);
        transform-origin: top center;
    }

    .main-content-grid>h1,
    .main-content-grid>.header-row {
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .main-content-grid>div:not(.header-row):not(h1) {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    .main-content-grid canvas {
        width: 100% !important;
        height: auto !important;
        max-height: 400px;
    }

    /* Top Section */
    #section-annual-run-rate {
        order: 1;
    }

    #section-past-7-days {
        order: 2;
    }

    #section-calendar {
        order: 3;
    }

    #section-today-prediction {
        order: 4;
    }

    #section-labour-stats {
        order: 5;
    }

    #section-monthly-overlay {
        order: 6;
    }

    #section-yesterday {
        order: 7;
    }

    #section-ytd-arrival {
        order: 8;
    }

    #section-avg-weekly {
        order: 9;
    }

    /* Tools Header */
    #header-tools {
        order: 20;
    }

    /* Tools Section */
    #section-calculator {
        order: 21;
    }

    #section-tomorrow-prediction {
        order: 22;
    }

    #section-yearly-arrivals {
        order: 23;
    }

    #section-ytd-comparison {
        order: 24;
    }

    #section-zero-days {
        order: 25;
    }

    #section-ytd-chart {
        order: 26;
    }

    /* More Charts Header */
    #header-more-charts {
        order: 40;
    }

    /* More Charts Section */
    #section-boat-totals {
        order: 41;
    }

    #section-total-migrants-year {
        order: 42;
    }

    #section-avg-per-boat {
        order: 43;
    }

    #section-current-month {
        order: 44;
    }

    #section-weekly-boat {
        order: 45;
    }

    #section-monthly-totals {
        order: 46;
    }

    /* Just Numbers Header */
    #header-just-numbers {
        order: 60;
    }

    /* Just Numbers Section */
    #section-xdays-totals {
        order: 61;
    }

    #section-yearly-totals {
        order: 62;
    }

    #section-daily-averages {
        order: 63;
    }

    #topMigrantArrivals {
        order: 70;
    }
}

.top-header {
    background-color: #1a1e1c;
    border-bottom: 1px solid #333;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    width: 100%;
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.header-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    font-family: Arial, sans-serif;
}

.header-right {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.channel-conditions-label {
    color: #aaa;
    margin-left: 15px;
    margin-right: 15px;
    font-weight: bold;
}

.header-weather {
    display: flex;
    gap: 15px;
}

.weather-item {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .header-right {
        flex-direction: column;
        gap: 5px;
    }

    .channel-conditions-label {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

.sync-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 15px;
    margin-right: -5px;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.sync-indicator.tooltip::after {
    bottom: auto;
    top: 150%;
}

.sync-indicator.pending {
    background-color: #ffa500;
    box-shadow: 0 0 10px #ffa500;
    animation: sync-pulse 1.5s infinite ease-in-out;
}

.sync-indicator.synced {
    background-color: #00ff3c;
    box-shadow: 0 0 8px #00ff3c;
}

@keyframes sync-pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
        box-shadow: 0 0 5px #ffa500;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
        box-shadow: 0 0 15px #ffa500;
    }

    100% {
        transform: scale(0.9);
        opacity: 0.7;
        box-shadow: 0 0 5px #ffa500;
    }
}