
:root {
    --green: #54ff9f;
    --green-dim: #238b59;
    --screen: #020907;
    --panel: #202426;
    --panel-edge: #414749;
    --text: #d2ffe4;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background:
        radial-gradient(ellipse at center,
            #30383b 0%, #15191b 65%, #080a0b 100%);
    color: var(--green);
    font-family: Consolas, "Courier New", monospace;
}

/* Cockpit-Rahmen: 80 % der Fensterbreite */
.cockpit {
    position: relative;
    width: 80vw;
    max-width: 1400px;
    min-width: 320px;
    aspect-ratio: 1.45;
    background: linear-gradient(145deg, #34393b, #111415 65%);
    border: 5px solid #414749;
    border-radius: 22px;
    box-shadow:
        0 0 0 5px #101314,
        0 18px 50px #000c,
        inset 0 0 20px #000;
}

/* Bildschirm mit breitem MFD-Rand */
.display {
    position: absolute;
    left: 13%;
    right: 13%;
    top: 15%;
    bottom: 15%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--screen);
    border: 3px solid #080d0b;
    border-radius: 8px;
    box-shadow:
        0 0 0 2px #52605a,
        inset 0 0 30px #0c3d25;
}


.display-header,
.display-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    font-size: clamp(9px, 1vw, 14px);
    flex-shrink: 0;
}

.display-header {
    border-bottom: 1px solid var(--green-dim);
    font-size: clamp(12px, 1.4vw, 20px);
}

.display-footer {
    border-top: 1px solid var(--green-dim);
    color: var(--green-dim);
}

/* Hintergrundbild mit Farbverlauf*/
.screen-content {
    position: relative;
    min-height: 100%;
    height: 100%;
    overflow: auto;

    display: flex;
    align-items: center;
	
	--page-background: none;
	
    background-image:
        linear-gradient(
            90deg,
            #020907 0%,
            rgba(2, 9, 7, 0.98) 24%,
            rgba(2, 9, 7, 0.82) 42%,
            rgba(2, 9, 7, 0.30) 63%,
            rgba(2, 9, 7, 0.02) 82%
        ),
		var(--page-background);
		
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Textinhalt der jeweiligen Seite*/
.screen-text {
	position: relative;
    z-index: 1;

    width: 48%;
    max-width: 430px;
    padding: 24px 0 24px 3%;

    color: #e0e8e5;
}

.screen-text h1 {
    margin-top: 0;
    color: var(--green);
    font-size: clamp(20px, 3vw, 42px);
}

.screen-text h2 {
    color: var(--green);
    font-size: clamp(15px, 2vw, 25px);
}

.screen-text p,
.screen-text li {
    font-size: clamp(11px, 1.3vw, 17px);
    line-height: 1.6;
}

.screen-text a {
    color: var(--green);
}

.screen-text button {
    color: var(--green);
    background: #07150d;
    border: 1px solid var(--green);
    padding: 8px 12px;
    cursor: pointer;
}

/* Beschriftung liegt außerhalb der Taste */
.key::after {
    content: attr(data-label);
    position: absolute;

    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;

    color: #54ff9f;
    font: 11px Consolas, monospace;
    white-space: nowrap;
    text-shadow: 0 0 5px #238b59;
    pointer-events: none;
}

/* MFD-Tasten*/
.key {
    appearance: none;
    position: relative;
    width: 96px;
    height: 96px;
    padding: 0;
    border: none;
    border-radius: 5px;

    background-image: url("images/MFD-Button_normal.png");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;

    cursor: pointer;
    transition: transform 70ms ease, filter 70ms ease;
}

/* Taste wird gedrückt */
.key:hover:active {
    background-image: url("images/MFD-Button_pressed.png");
    /*transform: translateY(3px);*/
    filter: brightness(0.8);
}

/* Tastaturbedienung */
.key:focus-visible {
    outline: 2px solid #54ff9f;
    outline-offset: 3px;
}

.key:hover::before {
    border-color: var(--green-dim);
}
.key:hover {
    background-image: url("images/MFD_Button_highlight.png");
    /*transform: translateY(3px);*/
    filter: brightness(0.8);
}




/* Linke Tasten: Text links neben der Taste */
.left-keys .key::after {
    right: calc(100% + 8px);
    text-align: right;
}

/* Rechte Tasten: Text rechts neben der Taste */
.right-keys .key::after {
    left: calc(100% + 8px);
    text-align: left;
}
.top-keys .key::after {
    top: calc(100% + 5px);
}

.bottom-keys .key::after {
    bottom: calc(100% + 5px);
}

.top-keys .key::after,
.bottom-keys .key::after {
    left: 0;
    right: 0;
    width: 100%;
    text-align: center;
}


/* Gemeinsame Eigenschaften der fünf Tasten pro Seite */
.top-keys,
.bottom-keys,
.left-keys,
.right-keys {
    position: absolute;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2;
}

.top-keys,
.bottom-keys {
    left: 13%;
    right: 13%;
    height: 12%;
    flex-direction: row;
}

.top-keys {
    top: 1%;
}

.bottom-keys {
    bottom: 1%;
}

.left-keys,
.right-keys {
    top: 15%;
    bottom: 15%;
    width: 12%;
    flex-direction: column;
}

.left-keys {
    left: 0.5%;
}

.right-keys {
    right: 0.5%;
}


/* Auf kleineren Bildschirmen */
@media (max-width: 600px) {
    .cockpit {
        width: 96vw;
        min-width: 0;
        aspect-ratio: 1.05;
        border-width: 3px;
    }

    .display {
        left: 17%;
        right: 17%;
        top: 17%;
        bottom: 17%;
    }

    .top-keys,
    .bottom-keys {
        left: 14%;
        right: 14%;
    }

    .left-keys,
    .right-keys {
        width: 15%;
        top: 17%;
        bottom: 17%;
    }

    .key {
        width: clamp(17px, 4.5vw, 28px);
        height: clamp(17px, 4.5vw, 28px);
    }

    .key::before {
        inset: 3px;
    }

    .key::after {
        font-size: clamp(6px, 1.5vw, 9px);
    }

    .screen-content {
        padding: 5%;
    }

    .display-header,
    .display-footer {
        padding: 5px;
        font-size: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .key {
        transition: none;
    }
}