/* ============================
   GLOBAL PAGE STYLING
   ============================ */

body.dark.page-tut-liveries {
    background: radial-gradient(circle at top, #5a4c3b 0%, #2b2626 55%, #211d1d 100%) no-repeat fixed;
}

body.light.page-tut-liveries {
    background: #f5f5f5; /* oder var(--bg-light) */
}

body.page-tut-liveries {
    color: #f3f3f3;
    padding: 40px 0;
}

/* ============================
   UPLOAD BOX
   ============================ */

.fl-upload-wrapper {
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
    border-radius: 8px;
    border: 2px solid #f5a623;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    background: linear-gradient(to bottom right,
        rgba(50, 45, 45, 0.98),
        rgba(30, 26, 26, 0.98)
    );
}

.fl-upload-header {
    background: #f5a623;
    padding: 12px 20px;
    font-weight: 700;
    color: #000;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.fl-upload-body {
    padding: 20px;
}

/* ============================
   LOG-AUSGABE IN DER KARTE
   ============================ */

.fl-upload-body pre {
    margin: 0;
    width: 100%;
    box-sizing: border-box;

    background: #2b2626;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #555;

    /* WICHTIG: Text umbrechen, damit nichts aus der Karte rausläuft */
    white-space: pre-wrap;   /* Zeilenumbrüche + Wrap */
    word-wrap: break-word;   /* lange Wörter / URLs umbrechen */
}

/* ============================
   FORM ELEMENTE
   ============================ */

.fl-form-row {
    margin-bottom: 18px;
}

.fl-form-row label {
    display: block;
    margin-bottom: 6px;
    color: #ffb84d; /* ähnlich wie deine Labels im Screenshot */
    font-weight: 600;
}

/* Text-Input */
.fl-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 6px;
    border: 2px solid #555;
    background: #2b2626;
    color: #eee;
    font-size: 0.95rem;
}

/* File-Input (Basis – Browser-Standard, aber im CI-Rahmen) */
.fl-file-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 6px;
    border-radius: 6px;
    border: 2px solid #555;
    background: #2b2626;
    color: #eee;
    font-size: 0.9rem;
}

.fl-input:focus,
.fl-file-input:focus {
    outline: none;
    border-color: #f5a623;
    box-shadow: 0 0 6px rgba(245, 166, 35, 0.7);
}

/* Kleine Hilfstexte */
.fl-hint {
    font-size: 0.8rem;
    color: #bbb;
    margin-top: 4px;
}

/* ============================
   BUTTONS – CI STYLE
   ============================ */

.fl-button-row {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

/* Basis-Button (Form, Schatten, etc.) */
.fl-btn {
    border-radius: 20px;
    border: 2px solid rgba(0, 0, 0, 0.4);
    padding: 8px 18px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    transition:
        background 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.2s ease;
    text-align: center;
    text-decoration: none;
}

/* Orange Primary (für Upload starten) – angelehnt an dein CI */
.fl-btn-primary {
    background: #f5a623;
    color: #000;
}

.fl-btn-primary:hover {
    background: #ffb845;
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.fl-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}

/* Sekundärer Button (z.B. Fenster schließen) */
.fl-btn-secondary {
    background: #444;
    color: #eee;
}

.fl-btn-secondary:hover {
    background: #666;
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.fl-btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}

/* Status-Buttons im Stil von SELECT / SELECTED (falls du sie später brauchst) */
.fl-btn-status-select {
    background: #d62828;   /* rot */
    color: #fff;
}

.fl-btn-status-selected {
    background: #2aaa2a;   /* grün, wie dein SELECTED */
    color: #fff;
}

/* ============================
   ERROR BOX
   ============================ */

.fl-error {
    margin: 0 auto 20px auto;
    width: 90%;
    max-width: 700px;
    border-radius: 6px;
    padding: 10px 15px;
    background: #8b1e1e;
    border: 2px solid #ff4d4d;
    color: #ffecec;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

/* =========================================
   TUTORIAL SEITE: tut_liveries.php
   ========================================= */

/* Grundfarbgebung für diese Seite (Text hell auf dunklem Hintergrund) */
body.page-tut-liveries {
    color: #f3f3f3;
}

/* Header-Bereich oben */
.page-header {
    padding: 0 20px 20px;
}

.page-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.6);
}

.page-title {
    margin: 0 0 4px;
    font-size: clamp(1.7rem, 2.3vw, 2.2rem);
    color: #ffe0a6;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.page-subtitle {
    margin: 0;
    opacity: 0.85;
}

/* Hauptbereich / Layout */
.page-main {
    padding: 20px;
}

.layout-tutorial {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 20px;
}

/* Sidebar-Navigation (Inhaltsverzeichnis) */
.tutorial-nav {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    padding: 12px 14px;
    border-radius: 8px;
    background: #2b2626;
    border: 1px solid #555;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
    font-size: 0.95rem;
}

.tutorial-nav-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #ffb84d;
}

.tutorial-nav ol {
    margin: 0;
    padding-left: 18px;
}

.tutorial-nav li {
    margin-bottom: 6px;
}

.tutorial-nav a {
    text-decoration: none;
    color: #f3f3f3;
}

.tutorial-nav a:hover,
.tutorial-nav a:focus {
    color: #ffb84d;
    text-decoration: underline;
}

/* Content-Card im gleichen Stil wie Upload-Box */
.tutorial-content {
    padding: 16px 18px 22px;
    border-radius: 8px;
    border: 2px solid #f5a623;
    background: linear-gradient(to bottom right,
        rgba(50, 45, 45, 0.98),
        rgba(30, 26, 26, 0.98)
    );
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.6);
}

/* Abschnittsabstände */
.tutorial-section + .tutorial-section {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tutorial-section h2 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 1.35rem;
    color: #ffb84d;
}

.tutorial-section h3 {
    margin-top: 18px;
    margin-bottom: 4px;
    font-size: 1.1rem;
    color: #ffd28c;
}

.tutorial-section h4 {
    margin-top: 12px;
    margin-bottom: 3px;
    font-size: 1rem;
    color: #ffe0a6;
}

.tutorial-section p {
    margin-top: 4px;
    margin-bottom: 8px;
    line-height: 1.6;
}

.tutorial-section ul,
.tutorial-section ol {
    margin-top: 4px;
    margin-bottom: 10px;
    padding-left: 18px;
}

.tutorial-section li {
    margin-bottom: 4px;
}

/* Nummerierte Listen extra klassisch */
.tutorial-list-numbered {
    list-style: decimal;
}

/* Subboxen im Content (z.B. Variante A/B) */
.tutorial-subsection {
    padding: 10px 12px;
    margin: 8px 0;
    border-radius: 6px;
    background: #2b2626;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Hinweis-/Info-Boxen */
.note {
    padding: 8px 10px;
    border-radius: 6px;
    background: #3a3328;
    border: 1px solid #f5a623;
    font-size: 0.95rem;
}

/* Inline-Code / Dateinamen */
code {
    font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
    font-size: .9em;
    background: rgba(0, 0, 0, 0.4);
    padding: 0 .25em;
    border-radius: .2em;
}

/* Footer unten */
.page-footer {
    margin-top: 24px;
    padding: 16px 20px 0;
    text-align: center;
    font-size: .9rem;
    opacity: .75;
    color: #e0e0e0;
}

/* Mobile-Optimierung */
@media (max-width: 800px) {
    .layout-tutorial {
        grid-template-columns: 1fr;
    }

    .tutorial-nav {
        position: static;
        order: -1;
        margin-bottom: 6px;
    }

    .page-main {
        padding: 16px;
    }

    .tutorial-content {
        padding: 14px 14px 20px;
    }
}

/* =========================================
   Link-Styling für tut_liveries.php
   ========================================= */

/* Nur Links im Tutorialbereich */
.page-tut-liveries .tutorial-content a,
.page-tut-liveries .tutorial-nav a {
    color: #f3f3f3;
    text-decoration: none;
}

.page-tut-liveries .tutorial-content a:hover,
.page-tut-liveries .tutorial-content a:focus,
.page-tut-liveries .tutorial-nav a:hover,
.page-tut-liveries .tutorial-nav a:focus {
    color: #ffb84d;
    text-decoration: none;
}

/* Anker-Sprung korrigieren, damit nichts unter Header+Divider verschwindet */
body.page-tut-liveries .tutorial-section {
    scroll-margin-top: calc(var(--header-height) + 10px);
    /* evtl.  var(--header-height) + 20px, je nach Geschmack */
}

html {
    scroll-behavior: smooth;
}
