/*
Theme Name: Midnight Harbor BBS
Theme URI: https://example.com/
Author: OpenAI
Description: A retro BBS-style WordPress theme with a boot sequence, real WordPress login, terminal commands, and dynamic bulletins/projects output.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: midnight-harbor-bbs
*/

html, body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at top, #15345f 0%, #0a1830 30%, #050d18 65%, #02060c 100%);
    color: #8fd3ff;
    font-family: "Courier New", Courier, monospace;
    min-height: 100%;
}

* {
    box-sizing: border-box;
}

a {
    color: #59b7ff;
}

a:hover {
    color: #8fd3ff;
}

.site-wrap {
    min-height: 100vh;
    padding: 24px 16px 40px;
}

.site-title-row {
    max-width: 1040px;
    margin: 0 auto 16px;
    color: #d7f0ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    text-align: center;
}

.entry-shell {
    max-width: 1040px;
    margin: 0 auto;
}

.entry-content {
    color: #d7f0ff;
}

.jh-bbs-wrap {
    max-width: 1040px;
    margin: 0 auto;
    border: 3px solid #38628d;
    background: linear-gradient(to bottom, #0b1d35, #081424);
    color: #8fd3ff;
    font-family: "Courier New", Courier, monospace;
    box-shadow: 0 0 40px rgba(0,0,0,.6), inset 0 0 80px rgba(120,180,255,.05);
    overflow: hidden;
    position: relative;
}

.jh-bbs-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.025) 0,
        rgba(255,255,255,0.025) 1px,
        transparent 2px,
        transparent 4px
    );
    opacity: .25;
    pointer-events: none;
}

.jh-bbs-topbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(to bottom, #1e4671, #123055);
    border-bottom: 2px solid #4e7fad;
    color: #d7f0ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.jh-bbs-topbar-right {
    font-size: 13px;
}

.jh-bbs-screen {
    min-height: 68vh;
    max-height: 76vh;
    overflow: auto;
    padding: 18px;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
}

.jh-bbs-hidden {
    display: none !important;
}

.jh-bbs-boot {
    min-height: 60vh;
    color: #d7f0ff;
    font-size: 18px;
    line-height: 1.45;
}

.jh-bbs-boot-line {
    margin-bottom: 6px;
    min-height: 1.4em;
}

.jh-bbs-panel {
    border: 2px solid #38628d;
    background: rgba(5, 16, 31, .8);
    padding: 12px 14px;
    margin-bottom: 14px;
    box-shadow: inset 0 0 20px rgba(120,180,255,.03);
}

.jh-bbs-title {
    color: #ffd86b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.jh-bbs-ascii {
    color: #d7f0ff;
    white-space: pre;
    overflow-x: auto;
    margin: 0 0 12px;
    line-height: 1.2;
    font-size: 14px;
}

.jh-bbs-bright {
    color: #d7f0ff;
}

.jh-bbs-muted {
    color: #6fa2d6;
}

.jh-bbs-gold {
    color: #ffd86b;
}

.jh-bbs-danger {
    color: #ff8c8c;
}

.jh-bbs-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.jh-bbs-button {
    display: block;
    border: 1px solid #2b78c5;
    background: linear-gradient(to bottom, #112745, #0c1d34);
    color: #d7f0ff;
    padding: 10px 12px;
    font: inherit;
    text-decoration: none;
    box-shadow: inset 1px 1px 0 rgba(255,255,255,.06), inset -1px -1px 0 rgba(0,0,0,.35);
}

.jh-bbs-button:hover,
.jh-bbs-button:focus {
    outline: none;
    background: linear-gradient(to bottom, #163458, #0d2240);
    border-color: #59b7ff;
}

.jh-bbs-output {
    line-height: 1.55;
    font-size: 18px;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 140px;
    max-height: 320px;
    overflow: auto;
    padding-bottom: 6px;
}

.jh-bbs-output-line {
    margin-bottom: 6px;
}

.jh-bbs-linkline a {
    color: #59b7ff;
    text-decoration: underline;
}

.jh-bbs-linkline a:hover {
    color: #8fd3ff;
}

.jh-bbs-prompt-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    border-top: 1px dashed rgba(143,211,255,.25);
    padding-top: 12px;
}

.jh-bbs-prompt {
    color: #ffd86b;
    font-weight: bold;
}

.jh-bbs-command-input {
    background: transparent;
    border: 0;
    outline: none;
    color: #d7f0ff;
    font: inherit;
    width: min(420px, 90%);
    caret-color: #d7f0ff;
}

.jh-bbs-cursor::after {
    content: "_";
    animation: jh-bbs-blink .8s step-end infinite;
    margin-left: 2px;
}

.jh-bbs-login form p {
    margin-bottom: 12px;
}

.jh-bbs-login label {
    display: block;
    margin-bottom: 6px;
    color: #ffd86b;
    font-weight: bold;
}

.jh-bbs-login input[type="text"],
.jh-bbs-login input[type="password"] {
    width: 100%;
    max-width: 420px;
    background: #04101e;
    color: #d7f0ff;
    border: 1px solid #2b78c5;
    padding: 10px 12px;
    font-family: inherit;
}

.jh-bbs-login input[type="text"]:focus,
.jh-bbs-login input[type="password"]:focus {
    border-color: #59b7ff;
    box-shadow: 0 0 0 1px rgba(89,183,255,.25);
}

.jh-bbs-login input[type="submit"] {
    background: linear-gradient(to bottom, #112745, #0c1d34);
    color: #d7f0ff;
    border: 1px solid #2b78c5;
    padding: 10px 16px;
    font-family: inherit;
    cursor: pointer;
}

.jh-bbs-login input[type="submit"]:hover {
    border-color: #59b7ff;
}

.jh-bbs-statusbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 14px;
    border-top: 2px solid #234262;
    background: #081321;
    color: #6fa2d6;
    font-size: 13px;
    position: relative;
    z-index: 2;
}

.bbs-notice {
    max-width: 1040px;
    margin: 18px auto 0;
    padding: 12px 14px;
    border: 1px solid #2b78c5;
    background: rgba(5, 16, 31, .65);
    color: #d7f0ff;
}

.bbs-notice code {
    color: #ffd86b;
    font-family: inherit;
}

@keyframes jh-bbs-blink {
    50% { opacity: 0; }
}

@media (max-width: 700px) {
    .jh-bbs-screen,
    .jh-bbs-boot,
    .jh-bbs-output {
        font-size: 15px;
    }

    .jh-bbs-ascii {
        font-size: 10px;
    }

    .jh-bbs-topbar {
        font-size: 14px;
    }

    .jh-bbs-statusbar {
        font-size: 12px;
    }
}
