* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-image: url('../images/Backgrounds/bg1.jpg');
    background-attachment: fixed;
    background-size: cover;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 16px;
}

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

a:hover {
    text-decoration: underline;
}

/* ---- Header ---- */
#site-header {
    background-color: rgba(0, 0, 0, 0.55);
    padding: 10px 20px;
    border-bottom: 2px solid #444;
}

#header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

#header-logo img {
    display: block;
}

#header-code-form {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

#header-code-form input[type="text"] {
    padding: 4px 6px;
    font-size: 14px;
    width: 100px;
    background: #222;
    color: #fff;
    border: 1px solid #888;
}

#header-code-form input[type="submit"] {
    padding: 4px 10px;
    font-size: 14px;
    cursor: pointer;
    background: #555;
    color: #fff;
    border: 1px solid #888;
}

#header-code-form input[type="submit"]:hover {
    background: #777;
}

/* ---- Navigation ---- */
#site-nav {
    margin-top: 8px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

#site-nav a {
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 2px 0;
    border-bottom: 2px solid transparent;
}

#site-nav a:hover {
    border-bottom: 2px solid #ffffff;
    text-decoration: none;
}

/* ---- Main Content ---- */
#site-content {
    padding: 30px 40px;
}

/* ---- Gallery list (ListGals) ---- */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.gallery-card {
    width: 220px;
    text-align: center;
}

.gallery-card img {
    box-shadow: 5px 5px 5px #000;
    max-width: 200px;
    display: block;
    margin: 0 auto 8px auto;
}

.gallery-card .gal-title {
    font-size: 17px;
    font-weight: bold;
}

.gallery-card .gal-meta {
    font-size: 14px;
    color: #ccc;
    margin-top: 4px;
}

/* ---- Photo grid (CodedPics) ---- */
.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.photo-cell {
    text-align: center;
    width: 220px;
}

.photo-cell .pic-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
}

.photo-cell img.thumb {
    box-shadow: 5px 5px 5px #000;
    cursor: pointer;
    max-width: 200px;
}

.photo-cell .pic-actions {
    margin-top: 6px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* ---- Pagination ---- */
.pagination {
    margin: 16px 0;
    font-size: 16px;
    font-weight: bold;
}

.pagination a {
    color: #ffffff;
    margin: 0 12px;
}

/* ---- Code entry form (ListGals error state) ---- */
.code-form-box {
    margin-top: 20px;
    font-size: 17px;
    font-weight: bold;
}

.code-form-box input[type="text"] {
    padding: 4px 6px;
    font-size: 15px;
    width: 120px;
    background: #222;
    color: #fff;
    border: 1px solid #888;
    margin: 0 6px;
}

.code-form-box input[type="submit"] {
    padding: 4px 12px;
    font-size: 15px;
    cursor: pointer;
    background: #555;
    color: #fff;
    border: 1px solid #888;
}

/* ---- Lightbox overlay ---- */
#mw-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.88);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

#mw-overlay.active {
    display: flex;
}

#mw-overlay-inner {
    position: relative;
    text-align: center;
    max-width: 95vw;
    max-height: 95vh;
}

#mw-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    box-shadow: 0 0 30px #000;
}

#mw-overlay-caption {
    color: #fff;
    font-size: 14px;
    margin-top: 8px;
}

#mw-overlay-close {
    position: absolute;
    top: -36px;
    right: 0;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
}

#mw-overlay-prev,
#mw-overlay-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 48px;
    cursor: pointer;
    user-select: none;
    padding: 0 16px;
    background: rgba(0,0,0,0.3);
    z-index: 1001;
}

#mw-overlay-prev { left: 0; }
#mw-overlay-next { right: 0; }

#mw-overlay-prev:hover,
#mw-overlay-next:hover {
    background: rgba(0,0,0,0.6);
}

/* ---- Home page bio ---- */
.bio-section {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 20px;
}

.bio-section img {
    max-width: 280px;
}

.bio-text {
    font-size: 18px;
    font-weight: bold;
    max-width: 500px;
    line-height: 1.5em;
}

/* ---- Placeholder (under construction) ---- */
.uc-page {
    text-align: center;
    margin-top: 40px;
}
