/* Core BIOS Blueprint Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 1.25rem;
    letter-spacing: 1px;
}

html {
    overflow-y: auto;
}

body {
    background-color: #000000;
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    position: relative;
}

body.admin-mode {
    overflow-y: auto;
    color: #000000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.dev-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    background: #ffff55;
    color: #0000aa;
    overflow: hidden;
    white-space: nowrap;
    font-size: 1rem;
    padding: 6px 0;
    box-shadow: 0 2px 0 #ffffff;
}

.dev-banner span {
    display: inline-block;
    padding-left: 100%;
    animation: devScroll 10s linear infinite;
}

@keyframes devScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.bios-wrapper {
    background-color: #0000aa;
    width: 100%;
    max-width: 960px;
    min-height: 620px;
    margin: 20px auto;
    border: 4px double #ffffff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 0, 170, 0.45);
    position: relative;
    z-index: 1;
}

#background-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
}

.bios-header,
.bios-footer {
    background-color: #ffffff;
    color: #0000aa;
    display: flex;
    justify-content: space-between;
    padding: 8px 18px;
    font-weight: bold;
}

.bios-footer {
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.bios-main {
    flex: 1;
    display: flex;
    padding: 18px;
    overflow: hidden;
}

.left-panel {
    flex: 2;
    padding-right: 18px;
    border-right: 2px solid #ffffff;
}

.right-panel {
    flex: 1;
    padding-left: 18px;
}

.admin-mode {
    min-height: 100vh;
    background: #f4f6fb;
    color: #111827;
    padding: 36px 24px 48px;
}

.admin-container {
    max-width: 980px;
    margin: 0 auto;
    overflow: visible;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 36px 80px rgba(15, 23, 42, 0.12);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.admin-header,
.admin-footer {
    background: #f8fafc;
    color: #000000;
    padding: 26px 30px;
}

.admin-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 18px;
}

.admin-header h1 {
    font-size: 1.6rem;
    margin: 0;
    line-height: 1.2;
}

.admin-subtitle {
    margin: 8px 0 0;
    color: #000000;
    max-width: 620px;
    font-size: 0.98rem;
    line-height: 1.6;
}

.admin-main {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
    gap: 26px;
    padding: 28px 30px 32px;
}

.admin-panel,
.admin-help {
    border-radius: 22px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.admin-panel {
    padding: 30px;
}

.admin-help {
    padding: 24px;
    background: #f8fafc;
}

.admin-field,
.admin-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.admin-field label {
    color: #000000;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.admin-field input,
.admin-field textarea,
.admin-select {
    font-family: inherit;
    font-size: 1rem;
    background: #ffffff;
    color: #000000;
    border: 1px solid #d2dce8;
    border-radius: 14px;
    padding: 14px 16px;
    outline: none;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-select:focus {
    border-color: #7c93ff;
    box-shadow: 0 0 0 4px rgba(124, 147, 255, 0.14);
}

.admin-field textarea {
    min-height: 140px;
    resize: vertical;
}

.admin-controls {
    display: flex;
    gap: 12px;
}

.admin-message {
    margin-top: 14px;
    color: #000000;
    min-height: 1.5rem;
}

.admin-success,
.admin-error {
    color: #000000;
}

.admin-login,
.admin-editor {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-button {
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    background: #e2e8f0;
    color: #000000;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.admin-button:hover {
    background: #d1d5db;
    transform: translateY(-1px);
}

.admin-help-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px;
    color: #000000;
}

.admin-container .help-box {
    color: #000000;
}

.admin-container .content-item-title {
    color: #000000;
}

.admin-container .content-item-body {
    color: #000000;
}

.help-title {
    color: #000000;
    margin-bottom: 12px;
    font-size: 1rem;
}

.admin-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.95rem;
    color: #475569;
}

@media (max-width: 860px) {
    .admin-main {
        grid-template-columns: 1fr;
    }

    .admin-header,
    .admin-footer {
        padding: 22px;
    }
}

.external-link {
    color: #ffff55;
    text-decoration: underline;
}


.section-title {
    color: #ffff55;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.info-row {
    display: flex;
    margin-bottom: 8px;
    color: #ffffff;
}

.label {
    width: 150px;
    color: #aaaaaa;
}

.value {
    color: #ffffff;
}

.status-online {
    color: #55ff55;
    font-weight: bold;
}

.divider {
    height: 2px;
    background-color: #ffffff;
    margin: 24px 0;
}

.bios-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Inline nav modifier: display multiple back links side-by-side */
.bios-nav.inline-nav {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.bios-nav.inline-nav .bios-link {
    width: auto;
    display: inline-flex;
    justify-content: center;
    padding: 10px 14px;
    min-width: 160px;
}

@media (max-width: 860px) {
    .bios-nav.inline-nav {
        flex-direction: column;
        gap: 8px;
    }
    .bios-nav.inline-nav .bios-link {
        min-width: 0;
        width: 100%;
        padding: 12px 16px;
    }
}

.bios-link {
    color: #ffffff;
    text-decoration: none;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    border: 1px solid #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out, transform 0.1s ease-in-out;
    cursor: pointer;
}

.bios-link:hover {
    transform: translateX(2px);
}

.bios-link .arrow {
    visibility: hidden;
}

.bios-link.active,
.bios-link:hover {
    background-color: #ffffff;
    color: #0000aa;
    border-color: #ffffff;
}

.bios-link.active .arrow,
.bios-link:hover .arrow {
    visibility: visible;
}

.bios-nav .bios-link[href="index.html"] {
    font-size: 0.95rem;
    padding: 10px 12px;
    min-height: 36px;
    border-width: 1px;
    letter-spacing: 0.5px;
}

.bios-button {
    width: 100%;
    text-align: left;
    border: 3px solid #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    margin-bottom: 12px;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 4px 4px 0 0 #000066;
    border-radius: 10px;
    position: relative;
    transition: transform 0.12s ease-in-out, background-color 0.12s ease-in-out, box-shadow 0.12s ease-in-out;
}

.bios-button:hover,
.bios-button:focus {
    background-color: rgba(255, 255, 255, 0.14);
    outline: none;
    transform: translate(2px, -1px);
    box-shadow: 6px 6px 0 0 #000044, inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.bios-button .content-item-title {
    color: #ffff55;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.bios-button .content-item-body {
    line-height: 1.6;
}

.help-box {
    border: 1px solid #ffffff;
    height: 100%;
    padding: 14px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.help-title {
    color: #ffff55;
    margin-bottom: 12px;
    text-align: center;
    border-bottom: 1px dashed #ffffff;
    padding-bottom: 6px;
}

#help-text {
    font-size: 1rem;
    line-height: 1.55;
}

.content-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.content-item {
    border: 1px dashed #ffffff;
    padding: 12px;
}

.content-item-title {
    color: #ffff55;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.content-item-body {
    color: #ffffff;
    line-height: 1.6;
}

.bios-footer span {
    white-space: nowrap;
}

@media (max-width: 860px) {
    .bios-wrapper {
        min-height: auto;
    }
    .bios-main {
        flex-direction: column;
    }
    .left-panel,
    .right-panel {
        padding: 0;
        border: none;
    }
    .left-panel {
        margin-bottom: 18px;
    }
}
