body {
    color: #fff5ee;
    background-color: #000000;
    overflow-y: scroll;
    margin: 0;
    padding: 40px 0;
    font-family: Helvetica, Arial, sans-serif;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/background.gif');
    background-repeat: repeat;
    /*background-size: 100% auto;*/
    z-index: -1;
}

.main {
    display: table;
    margin: 0 auto;
    background-color: #000000;
    border: 2px solid #555;
    box-shadow: 5px 5px 0px #222;
}

.center-table {
    width: 800px;
    max-width: 90%;
    margin: 0 40px;
    table-layout: fixed;
}

.center-table td {
    vertical-align: top;
}

h1 {
    font-family: Terminus, sans-serif;
    color: #fff;
    text-shadow: 2px 2px #000;
}

a {
    color: #00ffff;
    text-decoration: none;
}

a:hover {
    color: #ffff00;
    background-color: transparent;
    text-decoration: underline;
}

hr {
    border: 0;
    border-top: 1px dashed #555;
    margin: 15px 0;
}

table {
    border-collapse: collapse;
}

pre {
    font-family: 'Courier New', Courier, monospace;
    color: #ffffff;
}

pre.ascii-logo {
    font-size: clamp(5px, 2.5vw, 14px);
    overflow: hidden;
}

article {
    text-align: left;
    padding: 20px;
}

article img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
    border: 2px inset #555;
    cursor: pointer;
}

article pre {
    background: #1a1a1a;
    padding: 15px;
    overflow-x: auto;
    border: 2px inset #555;
}

article code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #ffff00;
}

article p {
    margin: 15px 0;
}

ul {
    padding: 0;
    margin: 10px 0;
    list-style-type: square;
    list-style-color: #ffffff;
}

li {
    margin: 5px 0;
}

@keyframes flicker {
  0% {filter: invert(0%);}
  50% {filter: invert(100%);}
  100% {filter: invert(0%);}
}

img.button8831:hover {
    animation-name: flicker;
    animation-duration: 0.2s;
    animation-iteration-count: infinite;
}

a.button8831 {
    color: rgba(0, 0, 0, 0);
}

.footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #888;
    border-top: 1px dashed #555;
    margin-top: 20px;
}

.counter {
    font-family: 'Courier New', Courier, monospace;
    color: #ffffff;
    background: #000;
    border: 2px inset #555;
    padding: 2px 8px;
}

.bevel-box {
    border: 2px outset #555;
    background: #111;
    padding: 0px 10px;
    margin: 0;
    display: inline-block;
    text-decoration: none;
}

.bevel-box:hover {
    border-style: inset;
    background: #333;
}

.bevel-list {
    display: inline-flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.bevel-box a {
    color: #888;
    text-decoration: none;
    display: block;
    margin: 0;
    line-height: 1.5;
}

marquee {
    background: #000;
    color: #ffffff;
    border-top: 1px solid #00ffff;
    border-bottom: 1px solid #00ffff;
    padding: 5px;
    font-family: 'Courier New', Courier, monospace;
}

@media (max-width: 900px) {
    body {
        padding: 20px 10px;
    }
    
    .center-table {
        width: 100%;
        margin: 0;
        max-width: 100%;
    }
    
    .main {
        width: 100%;
        box-shadow: none;
        border: 1px solid #555;
    }
    
    pre {
        font-size: 8px;
        overflow-x: auto;
    }
    
    .footer {
        font-size: 10px;
        padding: 10px;
    }
    
    .counter {
        font-size: 10px;
    }
    
    article {
        padding: 10px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px 5px;
    }
    
    a {
        display: inline-block;
        margin: 5px;
    }
    
    h1 {
        font-size: 18px;
    }
    
    pre {
        font-size: 10px;
        overflow-x: auto;
    }
    
    .gallery-row img {
        max-width: 80px !important;
        max-height: 60px !important;
    }
    
    .gallery-row td:first-child {
        width: 90px;
    }
}

#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

#lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border: 2px solid #fff;
}

#lightbox-close {
    position: absolute;
    top: -30px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

#lightbox-close:hover {
    color: #ffff00;
}

.lang-indicator,
.lang-link {
    color: #888;
    text-decoration: none;
}

.lang-link:hover {
    text-decoration: underline;
}

.lang-avail {
    color: #00ff00;
}

.lang-missing {
    color: #555;
}

.secondary-btn {
    color: #d633ff;
}

.secondary-btn:hover {
    color: #ffff00;
}
