		html, body {
			height: 100%;
		}
		body {
			background-color: #0d1117; /* A modern dark blue/grey, like GitHub's */
			color: #c9d1d9; /* A softer off-white for text */
		}

		/* The main container for our layout */
		.weather-container {
			max-width: 1800px;
		}

		/* Webcam styles */
		.webcam-figure {
			background-color: #010409; /* A very dark, almost black background */
			padding: 0.5rem;
			border-radius: 8px;
			border: 1px solid #30363d;
			transition: width 0.4s ease-in-out, 
                height 0.4s ease-in-out,
                top 0.4s ease-in-out, 
                right 0.4s ease-in-out,
                bottom 0.4s ease-in-out,
                box-shadow 0.4s ease-in-out;
    
                /* Prepare the element for a smooth position change */
            will-change: position, width, height, top, right;
    
        /* We'll set the initial top/right so the transition has a starting point */
        top: auto;
        right: auto;
        width: 100%; /* Start at full width of its container */
        position: relative; /* Change from static to relative */
        z-index: 10; /* Give it a default z-index */
		}
		.webcam-figure img {
			border-radius: 4px;
		}
		.webcam-figure figcaption {
			color: #8b949e; /* Muted text color for the caption */
			font-size: 0.9em;
			margin-top: 0.5rem;
			text-align: center;
		}
		
	.webcam-controls {
        position: absolute;
        top: 15px;
        left: 15px;
        z-index: 20;
    }

    .webcam-controls .btn {
        background-color: rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.5);
        /* Ensure it works with your icon font */
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0.75rem;
        border-radius: 10px;
    }
    
    .webcam-controls .btn .bi {
        /* LARGER: Increase the icon size */
        font-size: 1.25rem; /* Approx 20px, adjust as needed */
    }

		/* Weather data styles */
		.weather-data-panel {
			background-color: #161b22;
			border-radius: 8px;
			padding: 1.5rem;
			border: 1px solid #30363d;
            height: 100%; /* Make panel fill the column height */
            position: relative;
		}
		.weather-data-panel h2 {
			font-size: 1.5rem;
			color: #58a6ff; /* A bright blue for the heading */
			border-bottom: 1px solid #30363d;
			padding-bottom: 0.75rem;
			margin-bottom: 1rem;
		}
		.data-point {
			margin-bottom: 1.25rem;
		}
		.data-point .label {
			font-size: 0.9em;
			color: #8b949e;
			display: block;
			margin-bottom: 0.25rem;
		}
		.data-point .value {
			font-size: 2.10rem;
			font-weight: 300;
			color: #f0f6fc;
			line-height: 1;
		}
		.data-point .unit {
			font-size: 1.10rem;
			color: #8b949e;
			margin-left: 0.25rem;
		}
		.data-point .highlight { 
		    color: #3fb950; /* A nice green for updates */ 
		    
		}
        .secondary-data-list .list-group-item {
            background-color: transparent;
            border-color: #30363d;
            color: #c9d1d9;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .secondary-data-list .list-group-item strong {
            color: #f0f6fc;
            font-weight: 500;
        }
        .secondary-data-list .unit {
           color: #8b949e;
            font-size: 0.9em;
        }
        .secondary-data-list strong.highlight { 
		    color: #3fb950 !important; /* The same green as the primary values */
            transition: color 0.5s ease; 
		    
		}
		.highlight { 
		    color: #3fb950; /* A nice green for updates */ 
		    
		}
		
		/* NEW: Container for the status badges */
        .status-container {
            position: absolute;
            top: 1.2rem;  /* Matches the panel's padding */
            right: 1.5rem; /* Matches the panel's padding */
            font-size: 1.2rem;
            display: flex;         /* This turns on flexbox layout */
            align-items: center;   /* This vertically centers all items in the row */
            gap: 1.1rem;
        }
		
		/* NEW: Custom background colors for the badges */
        .bg-live {
            background-color: #be2736 !important; /* A strong red */
        }

        .bg-offline {
            background-color: #484f58 !important; /* A muted grey */
        }
        .bg-polling {
            background-color: #0366d6 !important; /* Bootstrap's primary blue */
        }

        /* A simple class to hide elements */
        .hidden {
            display: none !important;
        }
        
        /* NEW: Styles for the Daylight Bar component */
    .daylight-bar-container {
        margin-top: 1.5rem; /* Space below the bar */
    }

    .daylight-bar-container .label-container {
        display: flex;
        justify-content: space-between;
        font-size: 0.85em;
        color: #8b949e;
        margin-bottom: 0.4rem;
        font-weight: 500;
    }

    .progress-bar-visual {
        width: 100%;
        height: 10px;
        background-color: #010409; /* The "empty" or "night" part of the bar */
        border-radius: 5px;
        overflow: hidden; /* Ensures the fill stays within the rounded corners */
        border: 1px solid #30363d;
    }

    .progress-bar-fill {
        height: 100%;
        width: 100%;
        /* The magic is here! We use the CSS variable from our inline style. */
        background: linear-gradient(
            to right,
            #87CEEB, /* Sky blue for daylight */
            #87CEEB var(--daylight-percent), /* Stop the sky blue at the percentage */
            #010409 var(--daylight-percent), /* Start the black immediately after */
            #010409 /* Fill the rest with black */
        );
        transition: background 0.5s ease-in-out; /* Optional: smooth transition if you update it with JS */
    }
    
    @media (max-width: 679px) {
      #webcam-container {
        /* The core sticky positioning properties */
        position: -webkit-sticky; /* For Safari compatibility */
        position: sticky;
        top: 0; /* Stick to the very top of the viewport */
        z-index: 1020; /* A high z-index to ensure it stays on top of other content */

        /* Visual polish for when it's stuck */
        /* Use the body background to create a solid "panel" */
        background-color: #0d1117; 
        /* Add a subtle shadow to lift it off the page */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        /* Add a little padding so the content doesn't scroll right under the image */
        padding-bottom: 1rem;
      }
    }

.page-footer {
    padding: 2rem 1rem; /* Add some space above and below */
    text-align: center; /* Center the text horizontally */
}

.page-footer p {
    margin: 0; /* Remove the default paragraph margin */
    font-size: 0.8em; /* Make the text slightly smaller */
    color: #8b949e; /* Use the same muted color as other labels for consistency */
}

.spinner-grow-sm {
    --bs-spinner-width: 0.65rem;
    --bs-spinner-height: 0.65rem;
}

/* NEW: Custom styling for our dark toast to match the site theme */
[data-bs-theme="dark"].toast {
    background-color: #161b22; /* Matches your weather data panel color */
    border: 1px solid #30363d;   /* Matches your panel border color */
}

.toast-header {
    background-color: rgba(255, 255, 255, 0.05); /* A slightly lighter header */
    border-bottom-color: #30363d;
}

.stats-card .list-group-item {
    background-color: transparent;
    border-color: #30363d;
    color: #c9d1d9;
    padding: 0.75rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* The label for the stat */
.stats-card .list-group-item > span {
    color: #8b949e;
}

/* The container for the value and timestamp */
.stats-card .list-group-item strong {
    color: #f0f6fc;
    font-weight: 500;
    font-size: 1.1em;
    text-align: right; /* Aligns the content to the right */
}

/* The actual value */
.stats-card .list-group-item .value {
    /* It inherits its color and size from the parent strong tag */
}

/* NEW: Style for the timestamp */
.stats-card .list-group-item .timestamp {
    display: block; /* Puts the timestamp on a new line below the value */
    font-size: 0.75em; /* Smaller font size */
    font-weight: 400;  /* Lighter font weight */
    color: #8b949e;   /* Muted color, same as the label */
    margin-top: 2px;
}

.webcam-sticky {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 250px; /* Define the width of the thumbnail */
    z-index: 1050; /* Ensure it's above other content */
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); /* A nice "lift" effect */
}

/* Optional: Make the caption smaller in sticky mode */
#webcam-image.webcam-sticky figcaption,
#webcam-image.webcam-sticky .webcam-controls {
    display: none !important;
}

/* On smaller screens, make the thumbnail a bit smaller */
@media (max-width: 768px) {
    .webcam-sticky {
        width: 180px;
    }
}

@media (max-width: 991.98px) {
  /*
    We create a pseudo-element after the body's content.
    This acts like an invisible spacer block at the very end of the page.
  */
  body::after {
    content: '';      /* Pseudo-elements must have a 'content' property. */
    display: block;   /* Make it a block-level element so it takes up space. */
    height: 120px;    /* The height of our buffer. Adjust this value as needed! */
  }
}

/* --- Social Icon Styles --- */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}

.social-icons a {
  color: #8b949e; 
  transition: color 0.2s ease-in-out;
}

.social-icons a:hover,
.social-icons a:focus {
  color: #58a6ff; 
}

.social-icons svg {
  width: 24px;
  height: 24px;
  fill: currentColor; 
}

/* --- Alert Card Styles --- */
.alert-card {
    /* Base style: matches your site's dark theme */
    background-color: #161b22;
    border-radius: 0.5rem;
    border: 1px solid #30363d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #c9d1d9; /* Readable off-white text */
    width: 100%;     /* Make card take full width of its grid column */
    max-width: 550px;/* But never be wider than this */
}
.alert-card-header {
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid #30363d;
    display: flex; /* Use flexbox for the header layout */
    justify-content: space-between;
    align-items: center;
}
.alert-card-header .alert-title-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-card-body {
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}
.alert-card-body a {
    color: #ffffff;
    text-decoration: underline;
}
#alerts-dashboard-container {
    /* Use a CSS Grid to easily center a variable number of items */
    display: grid;
    grid-template-columns: 1fr; /* Default to one column */
    justify-items: center;    /* Center the items horizontally */
    gap: 1rem;                /* Space between cards if they stack */
    justify-content: center;
}
@media (min-width: 992px) {
    #alerts-dashboard-container {
        /* Create up to 2 columns, but only if there's enough space */
        /* Each column will be a max of 550px wide */
        grid-template-columns: repeat(auto-fit, minmax(400px, 550px));
    }
}
.alert-card .bi {
    color: #8b949e; /* Muted grey */
}

/* This rule targets cards with our new class */
.alert-card.alert-inactive {
    /* Reduce the opacity to make it look faded */
    opacity: 0.6;
    
    /* Optional: Apply a greyscale filter for a more dramatic effect */
    /* filter: grayscale(80%); */
    
    /* Optional: Add a transition for a smooth fade when the status changes */
    transition: opacity 0.4s ease-in-out, filter 0.4s ease-in-out;
}

/* We can also specifically mute the icon color in an inactive card */
.alert-card.alert-inactive .bi {
    color: #6e7681; /* A muted grey */
}

/* Specific colors per alert type */
.alert-type-met_office_warning .bi {
    color: #d73a49; /* Red */
}

.alert-type-intense_rain .bi {
    color: #4364F7; /* Blue */
}

.alert-type-pressure_drop .bi,
.alert-type-high_uv .bi {
    color: #f5af19; /* Amber/Yellow */
}
/* --- Alert Status Indicator Style --- */
#alert-status-link {
    position: relative; /* This is the anchor for the badge */
    font-size: 1.25rem; /* Make the icon a little bigger */
    text-decoration: none;
    /* Add a transition for a smooth appearance */
    transition: opacity 0.3s ease;
}
#alert-status-link:hover {
    opacity: 0.8;
}

.alert-card-context {
    font-size: 0.8em;
    opacity: 0.7;
    margin-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 1rem;
}