@font-face {
    font-family: 'freemono-webfont';
    src: url('../fonts/freemono-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
:root {
    --bg: #1a1a2e;
    --fg: #c8c8d4;
    --bright: #e8e8f0;
    --dim: #6a6a7a;
    --accent: #4fc3f7;
    --accent2: #81c784;
    --border: #3a3a4e;
    --link: #4fc3f7;
    --link-hover: #81c784;
    --dir-color: #ffd54f;
    --file-color: #c8c8d4;
    --size-color: #6a6a7a;
    --header-bg: #252540;
}

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

body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'freemono-webfont', monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 0;
    min-height: 100vh;
}

.scanlines {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
                                          rgba(0, 0, 0, 0.03) 4px
    );
    z-index: 1000;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 24px;
}

/* ── Header ── */
.header {
    border: 1px solid var(--border);
    background: var(--header-bg);

}

.header-title {
    color: var(--accent);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0px;
    line-height: 1.05;
    margin-top: 5px;
    margin-left: 20px;
    font-family: 'freemono-webfont', ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'Courier New', monospace;
    font-kerning: none;
    font-variant-ligatures: none;
    text-spacing: none;
    word-spacing: 0px;
    letter-spacing: 0px;
}

.header-sub {
    color: var(--dim);
    font-size: 12px;
    margin-top: 2px;
    margin-left: 20px;
}

/* ── Box-drawn sections ── */
.box {
    border: 1px solid var(--border);
    margin-bottom: 2px;
}

.box-title {
    background: var(--header-bg);
    padding: 6px 24px;
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.box-content {
    padding: 16px 24px;
}

/* ── Intro text ── */
.intro p {
    margin-bottom: 12px;
    color: var(--fg);
}

.intro p:last-child {
    margin-bottom: 0;
}

.intro .highlight {
    color: var(--bright);
}

/* ── Directory listing ── */
.listing-header {
    display: flex;
    padding: 6px 24px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    color: var(--dim);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.listing-header .col-name { flex: 1; }
.listing-header .col-size { width: 100px; text-align: right; }
.listing-header .col-date { width: 120px; text-align: right; }

.listing-row {
    display: flex;
    padding: 4px 24px;
    border-bottom: 1px solid rgba(58, 58, 78, 0.3);
    text-decoration: none;
    transition: background 0.1s;
}

.listing-row:hover {
    background: rgba(79, 195, 247, 0.05);
}

.listing-row .col-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.listing-row .col-size {
    width: 100px;
    text-align: right;
    color: var(--size-color);
}

.listing-row .col-date {
    width: 120px;
    text-align: right;
    color: var(--size-color);
}

.listing-row.dir .col-name {
    color: var(--dir-color);
}

.listing-row.dir .col-name::before {
    content: '[DIR] ';
    color: var(--dim);
}

.listing-row.file .col-name {
    color: var(--file-color);
}

.listing-row.file .col-name::before {
    content: '     ';
}

.listing-row.parent .col-name {
    color: var(--dim);
}

.listing-row.parent .col-name::before {
    content: ' ..  ';
    color: var(--dim);
}

a.listing-row {
    color: inherit;
}

a.listing-row:hover .col-name {
    color: var(--link-hover);
}

/* ── BBS description block ── */
.bbs-entry {
    padding: 12px 24px;
    border-bottom: 1px solid rgba(58, 58, 78, 0.3);
}

.bbs-entry:last-child {
    border-bottom: none;
}

.bbs-filename {
    color: var(--accent2);
    font-weight: 700;
}

.bbs-filename a {
    color: var(--accent2);
    text-decoration: none;
}

.bbs-filename a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.bbs-desc {
    color: var(--fg);
    margin-top: 2px;
    padding-left: 2ch;
}

.bbs-meta {
    color: var(--dim);
    font-size: 12px;
    margin-top: 2px;
    padding-left: 2ch;
}

/* ── Breadcrumb / path bar ── */
.pathbar {
    padding: 8px 24px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.pathbar span {
    color: var(--dim);
}

.pathbar a {
    color: var(--accent);
    text-decoration: none;
}

.pathbar a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.pathbar .sep {
    color: var(--dim);
    margin: 0 2px;
}

.menubar {
    border: 1px solid var(--border);
    padding: 12px 24px;
    margin-top: 2px;
    color: var(--dim);
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    background: var(--header-bg);
}

.menubar a {
    color: var(--accent);
    text-decoration: none;
}

.menubar a:hover {
    color: var(--link-hover);
}

/* ── Footer ── */
.footer {
    border: 1px solid var(--border);
    padding: 12px 24px;
    margin-top: 2px;
    color: var(--dim);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    background: var(--header-bg);
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover {
    color: var(--link-hover);
}

/* ── Divider ── */
.divider {
    color: var(--border);
    margin: 12px 0;
    font-size: 12px;
    overflow: hidden;
    white-space: nowrap;
}

/* ── Sections for intro page ── */
section {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(58, 58, 78, 0.3);
}

section section {
    padding: 16px 0px;
}

section:last-child {
    border-bottom: none;
}

section h2 {
    color: var(--accent);
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 700;
}

section h3 {
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 700;
}

section p {
    margin-bottom: 8px;
    color: var(--fg);
}

section p:last-child {
    margin-bottom: 0;
}

section ul {
    list-style: none;
    padding: 0;
}

section ul li {
    color: var(--fg);
    padding-left: 2ch;
}

section ul li::before {
    content: '· ';
    color: var(--dim);
}

section a {
    color: var(--accent);
    text-decoration: none;
}

.section-text a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.kofi-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--accent2);
    border: 1px solid var(--accent2);
    padding: 4px 12px;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.kofi-link:hover {
    background: var(--accent2);
    color: var(--bg);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    body { font-size: 13px; }
    .container { padding: 10px 8px; }
    .col-date { display: none; }
    .col-size { width: 80px; }
    .header, .box-content, .box-title,
    .listing-header, .listing-row,
    .bbs-entry, .pathbar, .footer,
    .section-text { padding-left: 12px; padding-right: 12px; }
}

.dos-viewer {
    background: #000080;
    color: #aaaaaa;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.2;
    border: 3px solid #aaaaaa;
    width: 640px;
    max-width: 100%;
    min-width: 100px;
}

.dos-viewer-titlebar {
    background: #aaaaaa;
    color: #000080;
    padding: 1px 8px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    user-select: none;
}

.dos-viewer-content {
    background: #000080;
    color: #aaaaaa;
    padding: 4px 6px;
    height: 336px;
    overflow-y: scroll;
    overflow-x: auto;
    white-space: pre;
    scrollbar-width: thin;
    scrollbar-color: #aaaaaa #000080;
}
