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

/* --- Retro Color Palette --- */
body {
    font-family: "Verdana", "Tahoma", sans-serif;
    background: #181b22;
    color: #d7dbe3;
}

/* --- Layout --- */
.page-wrapper {
    max-width: 900px;
    margin: 20px auto;
    background: #262b36;
    border: 2px solid #6f7788;
}

/* --- Header --- */
.site-header {
    background: #1a2450;
    color: #eef2ff;
    padding: 10px;
    border-bottom: 2px solid #6f7788;
}

.logo {
    font-size: 1.5rem;
    text-shadow: 1px 1px #000;
}

/* --- Nav --- */
.nav {
    margin-top: 8px;
}

.nav a {
    color: #8cd6ff;
    margin-right: 10px;
    text-decoration: none;
    font-weight: bold;
}

.nav a:hover {
    text-decoration: underline;
}

/* --- Content --- */
.content {
    padding: 15px;
}

.content a {
    color: #9cc9ff;
}

.content a:hover {
    color: #c1dcff;
}

/* --- Window Panels (Classic UI Feel) --- */
.window {
    background: #2f3542;
    border: 2px solid #818aa0;
    margin-bottom: 15px;
    padding: 10px;
    box-shadow: 3px 3px 0 #1a1d24;
}

.window-flexrow {
    background: #2f3542;
    border: 2px solid #818aa0;
    margin-bottom: 15px;
    padding: 10px;
    box-shadow: 3px 3px 0 #1a1d24;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}

.window h2 {
    background: #243066;
    color: #eef2ff;
    padding: 5px;
    font-size: 1rem;
    margin-bottom: 10px;
}

.window-flexrow h2 {
    background: #243066;
    color: #eef2ff;
    padding: 5px;
    font-size: 1rem;
    margin-bottom: 10px;
    flex: 0 0 100%;
}

.window-flexrow img {
    flex: 1 1 calc(50% - 5px);
    max-width: calc(50% - 5px);
    height: auto;
    border: 1px solid #818aa0;
    background: #1a1d24;
}

.window-flexrow .img-clickable-wrap {
    position: relative;
    display: block;
    flex: 1 1 calc(50% - 5px);
    max-width: calc(50% - 5px);
    border: 1px solid #818aa0;
    background: #1a1d24;
    overflow: hidden;
}

.window-flexrow .img-clickable-wrap img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 0;
    background: transparent;
}

.img-clickable-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 5px 7px;
    font-size: 0.78rem;
    color: #eef2ff;
    background: rgba(26, 36, 80, 0.9);
    border-top: 1px solid #818aa0;
    opacity: 0;
    transition: opacity 0.05s linear;
    pointer-events: none;
}

.img-clickable-wrap:hover .img-clickable-caption,
.img-clickable-wrap:focus-within .img-clickable-caption {
    opacity: 1;
}

img.img-clickable {
    cursor: zoom-in;
    transition: transform 0.05s linear, box-shadow 0.05s linear;
}

img.img-clickable:hover,
img.img-clickable:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px #243066;
    outline: none;
}

.image-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(32, 36, 46, 0.72);
    z-index: 9999;
}

.image-modal-overlay.open {
    display: flex;
}

.image-modal {
    position: relative;
    max-width: min(96vw, 1200px);
    max-height: 92vh;
    border: 2px solid #818aa0;
    box-shadow: 4px 4px 0 #1a1d24;
    background: #2f3542;
    padding: 8px;
}

.image-modal img {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 46px);
    width: auto;
    height: auto;
    border: 1px solid #818aa0;
    background: #11151d;
}

.image-modal-caption {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #d7dbe3;
    background: #1a2450;
    border: 1px solid #818aa0;
    padding: 4px 6px;
}

.image-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px;
    height: 28px;
    border: 2px solid #818aa0;
    background: #1a2450;
    color: #eef2ff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.image-modal-close:hover {
    background: #243066;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .window-flexrow img,
    .window-flexrow .img-clickable-wrap {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* --- Footer --- */
.site-footer {
    background: #1a2450;
    color: #eef2ff;
    text-align: center;
    padding: 10px;
    border-top: 2px solid #6f7788;
}

.retro-note {
    font-size: 0.8rem;
    color: #a7afbf;
}

/* --- Fun Retro Touches --- */
blink {
    animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
    to {
        visibility: hidden;
    }
}

label {
    font-size: 0.9rem;
    color: #9cc9ff;
}

input {
    background: #1a1d24;
    border: 2px solid #818aa0;
    color: #d7dbe3;
    padding: 5px;
    margin-top: 5px;
}

input[type="submit"]:hover {
    cursor: pointer;
    background: #243066;
}

textarea {
    background: #1a1d24;
    border: 2px solid #818aa0;
    color: #d7dbe3;
    padding: 5px;
    margin-top: 5px;
    width: 100%;
    height: 100px;
}

/* --- Lists --- */
ul {
    width: 100%;
    padding-left: 20px;
}

li {
    word-wrap: break-word;
    overflow-wrap: break-word;
}