:root {
    --bg-color: #2982cf; /* Hauptblau, ähnlich dem Screenshot */
    --grid-main: rgba(255, 255, 255, 0.15);
    --grid-sub: rgba(255, 255, 255, 0.05);
    
    --text-primary: #ffffff;
    --text-highlight: #c0df35; /* Vista Nova Grün/Gelb */
    
    --table-header-bg: #63a4fa; /* Hellblauer Tabellenkopf */
    --table-row-odd: #ffffff;
    --table-row-even: #f8fafc;
    --table-text: #334155;
    --table-border: #e2e8f0;
    
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-color);
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Blueprint Grid Background */
.blueprint-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(var(--grid-main) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-main) 1px, transparent 1px),
        linear-gradient(var(--grid-sub) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-sub) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px 40px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    overflow: visible;
}

.header-text {
    flex: 1 1 auto;
    min-width: 0;
}

.header-visual {
    flex: 0 0 auto;
    line-height: 0;
    align-self: flex-start;
}

.header-img {
    display: block;
    height: auto;
    width: auto;
    max-width: 100%;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 400;
    margin: 0 0 10px 0;
    white-space: nowrap;
}

.subtitle {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 300;
}

.highlight {
    color: var(--text-highlight);
    font-weight: 500;
}

/* Intro */
.intro {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 60px;
    font-weight: 300;
}

/* Table Section */
.table-header-container h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.table-responsive {
    width: 100%;
    border-radius: 2px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* For smooth borders */
    background: var(--table-row-odd);
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ffffff;
    color: var(--table-text);
    text-align: left;
    font-size: 0.95rem;
}

th, td {
    padding: 8px 15px;
    border-bottom: 1px solid var(--table-border);
}

td a {
    color: inherit;
    text-decoration: underline;
}

th {
    background-color: var(--table-header-bg);
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    border-color: rgba(255,255,255,0.2);
}

th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

th.sortable:hover {
    background-color: rgba(255,255,255,0.1) inset;
    filter: brightness(0.95);
}

.sort-icon {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

th.asc .sort-icon {
    border-bottom: 4px solid white;
}

th.desc .sort-icon {
    border-top: 4px solid white;
}

tbody tr:nth-child(even) {
    background-color: var(--table-row-even);
}

tbody tr:hover {
    background-color: #f1f5f9;
}

/* Footer */
footer {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--text-highlight);
}

/* Responsive Design */
@media (max-width: 915px) {
    header {
        flex-direction: column;
        margin-bottom: 20px;
    }

    .header-visual {
        order: 1;
        width: 100%;
        text-align: center;
    }

    .header-text {
        order: 0;
    }

    .header-img {
        max-width: 100%;
        height: auto;
        margin: 0 auto;
    }

    header h1 {
        font-size: 2rem;
        white-space: normal;
    }
    
    .intro {
        font-size: 1.1rem;
    }

    /* Cards view for small screens */
    .table-responsive {
        box-shadow: none;
        background: transparent;
        overflow: visible;
    }

    table {
        background: transparent;
        border: none;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tr {
        background: var(--table-row-odd) !important;
        border: 1px solid var(--table-border);
        border-radius: 8px;
        margin-bottom: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        overflow: hidden;
    }
    
    td {
        border: none;
        border-bottom: 1px solid var(--table-border);
        position: relative;
        padding-left: 45%;
        text-align: right;
        min-height: 50px;
    }
    
    td:last-child {
        border-bottom: 0;
    }
    
    td::before {
        content: attr(data-label);
        position: absolute;
        left: 20px;
        width: 40%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: #64748b;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }
    
    .container {
        padding: 40px 15px 30px;
    }

    td {
        padding-left: 15px;
        padding-top: 40px;
        text-align: left;
    }
    
    td::before {
        top: 15px;
        left: 15px;
        width: auto;
    }
}
