/* =========================================================
STRICT MONOCHROME TERMINAL STYLE (BLACK & WHITE ONLY)
========================================================= */

:root {
--bg: #000000;
--fg: #ffffff;
--fg-dim: #888888;
--border: #ffffff;
--border-dim: #333333;
--term-green: #00ff66;
--term-red: #ff3333;
}

{
box-sizing: border-box;
}

html, body {
margin: 0;
padding: 0;
background-color: var(--bg);
color: var(--fg);
font-family: Consolas, 'Courier New', monospace;
font-size: 13px;
line-height: 1.4;
overflow-x: hidden;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: flex-start;
}

.header-section {
    height: 200px;
    max-height: 200px;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border-bottom: none;


    background-image: url("../images/header.png");
    background-size: 816px 200px;
    background-position: center top;
    background-repeat: no-repeat;
}

/* Serverstatus oben rechts */
.header-status-top {
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: bold;
    z-index: 2;
}

/* Custom Terminal Scrollbars */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}

::-webkit-scrollbar-track {
background: var(--bg);
}

::-webkit-scrollbar-thumb {
background: #444444;
}

::-webkit-scrollbar-thumb:hover {
background: var(--fg);
}

/* Background CRT Scanlines Effect */
body::after {
content: "";
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
background-size: 100% 4px;
z-index: 99999;
pointer-events: none;
}

/* --- MAIN LAYOUT CONTAINER (816px STRICT TOTAL) --- */
.terminal-wrapper {
    width: 816px;
    max-width: 816px;
    margin: 10px 0 0 0;
    border: none;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    box-shadow: none;
    position: relative;
}

.terminal-section {
width: 100%;
position: relative;
box-sizing: border-box;
}

/* --- HEADER SECTION (MAX HEIGHT 200px) --- */
.header-section {
height: 200px;
max-height: 200px;
padding: 10px 16px;
display: flex;
flex-direction: column;
justify-content: space-between;
overflow: hidden;
border-bottom: none;
}

.header-top {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
padding-bottom: 4px;
font-size: 11px;
color: var(--fg-dim);
text-transform: uppercase;
width: 100%;
}

.header-top-title {
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.header-top-node {
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

/* Server Status Live Indicator */
.header-status-top {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
font-size: 11px;
font-weight: bold;
}

.status-dot {
width: 8px;
height: 8px;
display: inline-block;
border-radius: 50%;
}

.status-dot.online {
background-color: var(--term-green) !important;
box-shadow: 0 0 6px var(--term-green);
animation: pulse-green 1.8s infinite;
}

.status-dot.offline {
background-color: var(--term-red) !important;
box-shadow: 0 0 6px var(--term-red);
animation: pulse-red 1.8s infinite;
}

.status-text.online {
color: var(--term-green) !important;
}

.status-text.offline {
color: var(--term-red) !important;
}

@keyframes pulse-green {
0% { opacity: 1; }
50% { opacity: 0.4; }
100% { opacity: 1; }
}

@keyframes pulse-red {
0% { opacity: 1; }
50% { opacity: 0.4; }
100% { opacity: 1; }
}

/* Header Branding Logo */
.header-title-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 2px 0;
width: 100%;
}

.ascii-frame-top,
.ascii-frame-bottom {
font-size: 11px;
color: var(--fg-dim);
letter-spacing: 0px;
white-space: nowrap;
overflow: hidden;
user-select: none;
text-align: center;
width: 100%;
}

.header-title {
font-size: 21px;
font-weight: bold;
letter-spacing: 2px;
padding-left: 2px; /* Balances letter spacing for exact center */
margin: 2px 0;
text-transform: uppercase;
text-align: center;
white-space: nowrap;
}

.header-subtitle {
font-size: 11px;
letter-spacing: 2px;
padding-left: 2px; /* Balances letter spacing for exact center */
color: var(--fg-dim);
text-transform: uppercase;
text-align: center;
white-space: nowrap;
}

/* Header Controls & Action Buttons */
.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: none;
    padding-top: 6px;
    gap: 10px;
    width: 100%;
}

.btn {
background: var(--bg);
color: var(--fg);
border: 1px solid var(--border);
padding: 4px 12px;
font-family: inherit;
font-size: 11px;
text-transform: uppercase;
cursor: pointer;
transition: all 0.15s ease;
}

.btn:hover {
background: var(--fg);
color: var(--bg);
border-color: var(--fg);
}

.preview-btn {
    color: var(--term-red);
    border-color: var(--term-red);
}

.preview-btn:hover {
    background: var(--term-red);
    color: #000000;
    border-color: var(--term-red);
}

/* --- MAIN SECTION & GAME IFRAME (812px INNER x 624px HEIGHT) --- */
.main-section {
width: 100%;
height: 624px;
position: relative;
background: var(--bg);
overflow: hidden;
}

.game-iframe {
width: 100%;
height: 100%;
border: none;
background: var(--bg);
display: block;
}

/* Overlay Panels (How To Play & Legal Docs) */
.overlay-panel {
display: none;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--bg);
z-index: 100;
flex-direction: column;
border: none;
}

.overlay-panel.active {
display: flex;
}

.overlay-header {
background: #111111;
border-bottom: 1px solid var(--border);
padding: 6px 12px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
font-weight: bold;
color: var(--fg);
}

.overlay-close-btn {
padding: 2px 8px;
font-size: 11px;
}

.overlay-frame {
flex: 1;
width: 100%;
height: 100%;
border: none;
background: var(--bg);
}

/* Maintenance Screen Alert Overlay */
.maintenance-screen {
display: none;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--bg);
z-index: 90;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 20px;
border: 2px solid var(--term-red);
}

.maintenance-screen.active {
display: flex;
}

.maintenance-screen h2 {
color: var(--term-red);
font-size: 18px;
margin-bottom: 10px;
}

.maintenance-screen p {
color: var(--fg-dim);
margin: 4px 0;
}

/* --- FOOTER SECTION --- */
.footer-section {
padding: 10px;
text-align: center;
background: var(--bg);
font-size: 11px;
color: var(--fg-dim);
}

.footer-links {
display: flex;
justify-content: center;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}

.footer-links .sep {
color: var(--border-dim);
}

.footer-links a {
color: var(--fg-dim);
text-decoration: none;
transition: color 0.15s ease;
}

.footer-links a:hover {
color: var(--fg);
text-decoration: underline;
}

/* --- DOS COOKIE BANNER --- */
.cookie-banner {
position: fixed;
bottom: 15px;
left: 50%;
transform: translateX(-50%);
width: min(816px, calc(100% - 20px));
background: var(--bg);
border: 2px solid var(--border);
padding: 12px 16px;
z-index: 9999;
display: flex;
justify-content: space-between;
align-items: center;
gap: 15px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.9);
}

.cookie-banner.hidden {
display: none !important;
}

.cookie-text {
font-size: 11px;
color: var(--fg-dim);
flex: 1;
line-height: 1.4;
}

.cookie-text strong {
display: block;
color: var(--fg);
margin-bottom: 4px;
}

.cookie-actions {
display: flex;
gap: 8px;
}

.cookie-btn-essential {
border-color: var(--border-dim);
color: var(--fg-dim);
}

.cookie-btn-accept {
border-color: var(--border);
color: var(--fg);
}

/* Cursor Blink Utility */
.cursor-blink {
display: inline-block;
width: 6px;
height: 12px;
background: var(--fg);
vertical-align: middle;
animation: blink 1s infinite;
}

@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}