/* 🌐 Allgemeines Layout */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f5f5f5;
    color: #222;
}

/* 🔝 Kopfzeile mit Trainer-Navigation */
header {
    background: #0077cc;
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 15px;
}

header h1 {
    font-size: 22px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 🧠 Klickbarer Logo-Link */
.logo-link {
    text-decoration: none;
    color: white;
    font-size: 26px;
    margin-right: 4px;
    transition: transform 0.2s;
}

.logo-link:hover {
    transform: scale(1.1);
}

/* 🎓 Exam-Button rechts */
header button {
    background: white;
    color: #0077cc;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    padding: 8px 18px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
header button:hover {
    background: #e5e5e5;
    transform: scale(1.05);
}

/* 🔹 Navigationsleiste (Java / HTML / SQL) */
nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    position: relative;
    transition: opacity 0.2s;
}

nav a:hover {
    opacity: 0.8;
}

nav a.active::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* 🔹 Dunkelgraue Toolbar */
.top-bar {
    position: sticky;
    top: 0;
    background: #333;
    padding: 10px 40px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 20;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex-wrap: wrap;
}

.top-bar button {
    background: #0077cc;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.top-bar button:hover {
    background: #005fa3;
}

/* Diese Regel passt die Größe von <a>-Tags an (Desktop) */
.top-bar a {
    display: flex;
    text-decoration: none;
    color: inherit;
}

/* 🔽 Kategorie-Dropdown */
.category-select {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    background: #555;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

/* 🔸 Hauptbereich */
main {
    padding: 40px;
}

/* 🧾 SQL-Eingabe */
textarea {
    width: 100%;
    height: 320px;
    font-family: monospace;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    background: #fff;
    resize: vertical;
}

pre {
    background: #222;
    color: #0f0;
    padding: 10px;
    border-radius: 6px;
    white-space: pre-wrap;
    margin-top: 20px;
    overflow-x: auto;
}

/* 💡 Lösungsausgabe */
.solution {
    background: #fff;
    border: 1px dashed #aaa;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
    display: none;
    font-family: monospace;
    white-space: pre;
}

/* 📘 Beschreibung */
.description {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

/* ✅ Ergebnisfarben */
.correct {
    color: limegreen;
    font-weight: bold;
}

.incorrect {
    color: red;
    font-weight: bold;
}

/* 📊 Fortschrittsanzeige */
.progress {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
}

.progressbar {
    background: #ddd;
    border-radius: 6px;
    overflow: hidden;
    height: 10px;
    margin-bottom: 8px;
}

.progressbar-fill {
    background: #0077cc;
    height: 10px;
}

/* 🏠 Startseite - Trainer-Auswahl */
.menu {
    text-align: center;
    padding: 60px 20px;
}

.menu h2 {
    font-size: 26px;
    margin-bottom: 40px;
    color: #333;
}

.trainer-selection {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.trainer-card {
    display: block;
    width: 260px;
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: #222;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 6px solid #ddd;
}

.trainer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.trainer-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

.trainer-card p {
    font-size: 14px;
    color: #555;
}

/* Farbliche Unterscheidung */
.trainer-card.java { border-top: 6px solid #f89820; } /* Java Orange */
.trainer-card.html { border-top: 6px solid #e34f26; } /* HTML Rot/Orange */
.trainer-card.sql  { border-top: 6px solid #0077cc; } /* SQL Blau */
.trainer-card.cards { border-top: 6px solid #8e44ad; } /* Kartenquiz Lila (neu) */
.trainer-card.fisi  { border-top: 6px solid #34495e; } /* FISI Dunkelgrau/Blau (neu) */


/* 🧩 Tabellenanzeige (SQL) */
.table-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    overflow-x: auto;
}

.table-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0077cc;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

table th, table td {
    border: 1px solid #ccc;
    padding: 6px 10px;
    text-align: left;
    font-size: 14px;
}

table th {
    background: #f0f0f0;
    font-weight: bold;
}

.sql-result table {
    margin-top: 10px;
}

/* 🏁 Abschlussseite */
.center {
    text-align: center;
    margin-top: 80px;
}

.center .btn {
    background: #0077cc;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    margin: 10px;
    display: inline-block;
    transition: background 0.2s;
}

.center .btn:hover {
    background: #005fa3;
}

.buttons {
    margin-top: 25px;
}

/* 🖥️ Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        flex-wrap: wrap;
        gap: 15px;
    }

    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    /* NEU FÜR MOBILE:
      Diese Regel sorgt dafür, dass der "Next"-Button (der
      in einem <a>-Tag ist) auch 100% breit wird,
      genau wie die "Check" und "Solution" Buttons.
    */
    .top-bar a button {
        width: 100%;
    }

    .category-select {
        margin-left: 0;
        width: 100%;
    }

    main {
        padding: 20px;
    }

    .trainer-selection {
        flex-direction: column;
        align-items: center;
    }

    .trainer-card {
        width: 90%;
    }
}
.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
iframe {
    width: 100%;
    min-height: 150px; /* <-- Mindesthöhe ist OK */
    height: auto;       /* Höhe automatisch anpassen (wird von JS überschrieben) */
    border: 1px solid #ccc;
    background: white;
}