/* =========================================================
   SYSTEM RESET & VARIABLES
   ========================================================= */
:root {
    --bg-void: #121212;
    --bg-paper: #e3e1db;
    --bg-paper-dark: #d1cfc9;

    --ink-primary: #1a1a1a;
    --ink-secondary: #555;
    --ink-red: #b32d2d;

    --font-type: "Courier New", Courier, monospace;
    --font-serif: "Georgia", serif;
    --font-ui: "Helvetica Neue", Helvetica, Arial, sans-serif;

    --spacing-unit: 24px;
    --border-thick: 2px solid var(--ink-primary);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-void);
    color: var(--ink-primary);
    font-family: var(--font-type);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* =========================================================
   THE WRAPPER
   ========================================================= */
.system-wrapper {
    width: 97.5vw;
    height: 97.5vh;
    background: var(--bg-paper);
    display: flex;
    /* Wechsel zu Flex für stabilere Sidebar-Animation */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border: var(--border-thick);
    overflow: hidden;
}

/* =========================================================
   SIDEBAR (FIXED WIDTH + ANIMATION)
   ========================================================= */
.system-sidebar {
    width: 300px;
    min-width: 300px;
    background: var(--bg-paper-dark);
    border-right: var(--border-thick);
    padding: var(--spacing-unit);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100;

    /* Sanftes Heraussliden */
    transition: margin-left 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.meta-block h1 {
    font-size: 1.2rem;
    text-transform: uppercase;
    border-bottom: var(--border-thick);
    padding-bottom: 10px;
    margin: 0 0 20px 0;
}

.nav-index {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-index li {
    margin-bottom: 8px;
}

.nav-index a {
    text-decoration: none;
    color: var(--ink-primary);
    display: block;
    padding: 5px 10px;
    transition: 0.2s;
}

.nav-index a:hover {
    background: var(--ink-primary);
    color: var(--bg-paper);
}

.stamp-area {
    border: 3px double var(--ink-red);
    color: var(--ink-red);
    padding: 10px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    transform: rotate(-2deg);
}

/* =========================================================
   CONTENT STREAM (SCROLL-CONTAINER)
   ========================================================= */
.system-content {
    flex-grow: 1;
    overflow-y: scroll;
    scroll-behavior: smooth;
    padding: 40px;
    position: relative;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;

    /* Verhindert das "Springen" der Karten */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Custom Scrollbar */
.system-content::-webkit-scrollbar {
    width: 8px;
}

.system-content::-webkit-scrollbar-track {
    background: var(--bg-paper);
}

.system-content::-webkit-scrollbar-thumb {
    background: var(--ink-primary);
}

/* =========================================================
   DATA CARDS
   ========================================================= */
.data-card {
    background: #fff;
    border: 1px solid var(--ink-primary);
    margin-bottom: 40px;
    width: 100%;
    max-width: 900px;
    /* Begrenzung für bessere Lesbarkeit */
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);

    /* Reveal Animation */
    animation: cardReveal 0.6s ease-out backwards;
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.data-card:nth-child(1) {
    animation-delay: 0.1s;
}

.data-card:nth-child(2) {
    animation-delay: 0.2s;
}

.data-card:nth-child(3) {
    animation-delay: 0.3s;
}

.card-body {
    padding: 30px;
}

.card-body h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    border-bottom: 2px solid var(--ink-red);
    display: inline-block;
    margin-bottom: 15px;
}

.card-body p {
    font-family: var(--font-serif);
    line-height: 1.6;
    text-align: justify;
}

/* =========================================================
   MECHANICAL STICKY BUTTON (FINALE KORREKTUR)
   ========================================================= */
.btn-mech {
    /* Sticky bleibt im Viewport des Scroll-Containers kleben */
    position: sticky;
    bottom: 20px;
    /* Exakter Abstand zum unteren Rand des Sichtbereichs */
    padding: 20px 50px;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 350px;
    max-width: 90%;

    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;

    border: 2px solid #333;
    background: #222;
    color: #ccc;
    box-shadow: 0 4px 0 #000, 0 8px 15px rgba(0, 0, 0, 0.4);

    transition: transform 0.1s, box-shadow 0.1s, width 0.3s ease;
}

.btn-mech:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #000, 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* =========================================================
   RESPONSIVE (STABILE ANIMATION)
   ========================================================= */
@media (max-width: 1000px) {
    .system-sidebar {
        margin-left: -300px;
        /* Sidebar schiebt sich nach links raus */
        opacity: 0;
    }

    .system-content {
        padding: 20px;
        max-width: 100vw;
    }

    .btn-mech {
        width: 100%;
        /* Button verbreitert sich auf Mobile */
    }


}

@media (max-width: 500px) {
    .btn-mech {
        bottom: 60px;
    }
}