/* --- General & Typography --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
    color: #333;
    background-color: #fdfdfd;
}

h1, h2, h3 {
    color: #111;
    line-height: 1.2;
}

a {
    color: #0056b3;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2em 0;
}

/* --- Accessibility: Skip Link --- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: -999;
}

.skip-link:focus {
    left: 10px;
    top: 10px;
    width: auto;
    height: auto;
    padding: 10px;
    background-color: #0056b3;
    color: #fff;
    border-radius: 4px;
    z-index: 999;
    text-decoration: none;
}

/* --- Layout & Navigation --- */
.site-header {
    padding: 1em 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 2em;
}

.main-nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    justify-content: center;
}

#main-content {
    padding-top: 1em;
}

/* --- Image & Content Specific --- */
img.main-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

blockquote {
    border-left: 4px solid #ccc;
    padding-left: 1em;
    margin: 1.5em 0;
    font-style: italic;
    color: #555;
}

.stats {
    font-size: 0.85em;
    color: #666;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}
/* --- images.php Specific Styles --- */
.filter-form {
    margin-bottom: 2em;
    padding: 1em;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-form label {
    font-weight: bold;
}

.filter-form select, .filter-form button {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.filter-form button {
    background-color: #0056b3;
    color: white;
    cursor: pointer;
    border-color: #0056b3;
}

.image-listing {
    margin-bottom: 2em;
}

.thumbnail {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1em;
}
/* Add a separator between image listings */
.image-listing + .image-listing {
    border-top: 1px solid #ddd;
    margin-top: 2em;
    padding-top: 2em;
}
/* --- Figure & Figcaption Styles --- */
.main-figure {
    margin: 0 0 1em 0; /* Resets default figure margins */
}

figcaption {
    padding: 0.8em;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    font-style: italic;
    color: #555;
    font-size: 0.95em;
}
/* --- Admin Page Styles --- */
#status-message {
    padding: 1em;
    margin-bottom: 1em;
    border-radius: 4px;
    font-weight: bold;
    display: none; /* Hidden by default, shown by JS */
}

#status-message:not(:empty) {
    display: block;
}

fieldset {
    border: 1px solid #ccc;
    padding: 1em;
    margin-bottom: 1em;
}

.button-group {
    display: flex;
    gap: 10px;
    margin: 1em 0;
}

.discard {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}