/* =======================================================
   LEGACY RP PANEL – CLEAN APPLE-STYLE UI (LIGHT)
   Hauptfarbe: #063157
======================================================= */

/* ------------ Design Tokens ------------ */
:root {
    --bg-page: #f3f4f6;          /* heller Seitenhintergrund */
    --bg-header: #020617;        /* dunkler Header (wie bisher) */
    --bg-surface: #ffffff;       /* Karten / Flächen */
    --bg-soft: #f9fafb;

    --accent: #063157;
    --accent-soft: #0b4c81;
    --accent-strong: #1d7ed0;

    --text-main: #111827;
    --text-muted: #6b7280;
    --text-invert: #f9fafb;

    --border-subtle: #e5e7eb;

    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-pill: 999px;

    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.06);
    --shadow-subtle: 0 10px 24px rgba(15, 23, 42, 0.04);

    --transition-fast: 0.14s ease-out;
    --transition-med: 0.2s ease-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

/* =======================================================
   BODY
======================================================= */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =======================================================
   HEADER & NAV (Mitte-Navi)
======================================================= */

header {
    position: sticky;
    top: 0;
    z-index: 40;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    padding: 12px 40px;

    background: var(--bg-header);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(31, 41, 55, 0.8);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: flex-start;
}

.logo img {
    height: 36px;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}

.logo span {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-invert);
}

/* mittige Navi */

nav {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: center;
}

nav a {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;

    padding: 6px 12px;
    border-radius: var(--radius-pill);

    color: #9ca3af;
    border: 1px solid transparent;
    background: transparent;

    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast);
}

nav a:hover {
    color: var(--text-invert);
    background: rgba(55,65,81,0.55);
    border-color: rgba(75,85,99,0.9);
    transform: translateY(-1px);
}

nav a.active {
    color: var(--text-invert);
    background: linear-gradient(135deg, var(--accent-soft), var(--accent-strong));
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.55);
}

/* rechts: Login / Admin */

.nav-right {
    justify-self: flex-end;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-right a {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;

    padding: 5px 10px;
    border-radius: var(--radius-pill);

    color: #d1d5db;
    border: 1px solid transparent;
    background: rgba(15,23,42,0.9);

    transition: var(--transition-fast);
}

.nav-right a:hover {
    border-color: rgba(75,85,99,0.9);
    background: rgba(15,23,42,1);
}

/* =======================================================
   LAYOUT / CONTAINER
======================================================= */

.container,
.container-article {
    max-width: 1100px;
    margin: 32px auto 40px;
    padding: 0 24px;
}

.container-article {
    max-width: 820px;
}

.page-headline {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 18px;
}

h1,
.title-big {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 4px;
    color: #111827;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* =======================================================
   GENERISCHE CARDS / FLÄCHEN
======================================================= */

.card,
.article-card,
.rule-info-box,
.rule-warning-box {
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
}

.card {
    margin: 16px 0;
    padding: 20px 22px;
}

.card h2 {
    font-size: 18px;
    margin-bottom: 6px;
    color: #111827;
}

.card p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 4px;
    color: #374151;
}

/* =======================================================
   BUTTONS
======================================================= */

.btn,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    margin-top: 10px;
    padding: 8px 16px;

    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;

    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    cursor: pointer;

    transition:
        background var(--transition-med),
        color var(--transition-med),
        box-shadow var(--transition-med),
        transform var(--transition-fast),
        border-color var(--transition-fast);
}

.btn {
    background: linear-gradient(135deg, var(--accent-soft), var(--accent-strong));
    color: #f9fafb;
    border-color: rgba(255,255,255,0.6);
    box-shadow: var(--shadow-subtle);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(37,99,235,0.5);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: rgba(148,163,184,0.9);
}

.btn-outline:hover {
    background: var(--bg-soft);
}

/* =======================================================
   FORMS & SUCHE
======================================================= */

.form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
}

.form input {
    margin-top: 2px;
    padding: 9px 11px;
    border-radius: var(--radius-md);
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: var(--text-main);
    font-size: 14px;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.form input:focus {
    outline: none;
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 1px rgba(37,99,235,0.4);
}

/* Regel-Suche */

.rule-search {
    margin-bottom: 18px;
    max-width: 360px;
}

.rule-search label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.rule-search input {
    width: 100%;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    font-size: 14px;
}

.rule-search input:focus {
    outline: none;
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 1px rgba(37,99,235,0.4);
}

[id^="noResults"] {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
    display: none;
}

/* =======================================================
   INFO / WARN BOXEN
======================================================= */

.rule-info-box {
    margin-bottom: 22px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-soft);
}

.info-icon {
    font-size: 18px;
}

.rule-warning-box {
    margin-top: 30px;
    padding: 14px 16px;
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
    display: flex;
    gap: 10px;
}

.warn-icon {
    font-size: 18px;
}

/* =======================================================
   RP KACHEL-GRID
======================================================= */

.rule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.rule-tile {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 11px 13px;
    border-radius: 12px;

    border: 1px solid var(--border-subtle);
    background: #ffffff;
    box-shadow: var(--shadow-subtle);

    font-size: 14px;
    color: #111827;

    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast);
}

.rule-tile:hover {
    transform: translateY(-1px);
    border-color: rgba(37,99,235,0.4);
    box-shadow: 0 12px 30px rgba(15,23,42,0.12);
    background: #f9fafb;
}

.tile-icon {
    font-size: 16px;
    opacity: 0.9;
}

.tile-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =======================================================
   ARTICLE VIEW (Präambel & Co.)
======================================================= */

.breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.breadcrumb a {
    color: #4b5563;
}

.breadcrumb .current {
    color: var(--text-muted);
}

.article-card {
    padding: 22px 24px;
    margin-bottom: 22px;
}

/* schöner Fließtext */
.article-card p {
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: 12px;
    color: #374151;
}

/* §-Überschriften */
.article-card h2 {
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    margin-top: 24px;
    margin-bottom: 6px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

/* erste Überschrift ohne Linie oben */
.article-card h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Nummerierte Listen */
.article-card ol {
    margin: 4px 0 0 1.4rem;
    padding-left: 0;
}

.article-card ol li {
    margin-bottom: 4px;
    line-height: 1.6;
    color: #374151;
}

/* etwas mehr Luft zwischen Info-/Warnbox und Artikel */
.rule-warning-box {
    margin-bottom: 14px;
}

/* Navigation unten */

.article-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.article-nav-btn {
    flex: 1 1 260px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

.article-nav-btn:hover {
    background: #f9fafb;
    border-color: rgba(37,99,235,0.4);
    box-shadow: var(--shadow-subtle);
    transform: translateY(-1px);
}

.nav-label-top {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.nav-label-main {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.nav-arrow {
    font-size: 18px;
}

.article-updated {
    font-size: 12px;
    color: var(--text-muted);
}


/* Nummern & Aufzählungen hübsch einrücken */
.article-card ol,
.article-card ul,
.rule-section ol,
.rule-section ul {
    margin-top: 8px;
    margin-bottom: 12px;
    margin-left: 1.5rem;   /* Abstand vom Rand */
    padding-left: 0.75rem; /* Abstand der Zahlen/Text */
    list-style-position: outside;
}

.article-card li,
.rule-section li {
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
    margin-bottom: 4px;
}

/* =======================================================
   FOOTER
======================================================= */

footer {
    text-align: center;
    padding: 16px 10px 24px;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* =======================================================
   RESPONSIVE
======================================================= */

@media (max-width: 900px) {
    header {
        grid-template-columns: 1fr;
        row-gap: 8px;
        padding: 10px 16px;
    }

    nav {
        justify-self: flex-start;
        flex-wrap: wrap;
    }

    .nav-right {
        justify-self: flex-start;
    }

    .container,
    .container-article {
        margin-top: 24px;
        padding: 0 16px 32px;
    }

    h1,
    .title-big {
        font-size: 24px;
    }

    .rule-grid {
        grid-template-columns: 1fr;
    }
}
/* =======================================================
   ALLGEMEINES – KACHELN (JEDE § ALS CARD)
======================================================= */

.general-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.general-tile {
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-subtle);
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast);
}

.general-tile:hover {
    transform: translateY(-1px);
    border-color: rgba(37,99,235,0.35);
    box-shadow: var(--shadow-soft);
    background: #f9fafb;
}

.general-tile h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
}

.general-tile p {
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
    margin-bottom: 6px;
}

.general-tile ol {
    margin: 4px 0 0 1.4rem;
    padding-left: 0;
}

.general-tile ol li {
    margin-bottom: 4px;
    line-height: 1.6;
    color: #374151;
}
/* =======================================================
   RP-SUCHE – INPUT MIT X & ERGEBNISSE
======================================================= */

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper input {
    width: 100%;
    padding-right: 28px; /* Platz für das X */
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    display: none;
}

.search-clear-btn.visible {
    display: block;
}

/* Ergebnis-Bereich unter den Kacheln */

.rp-results {
    margin-top: 24px;
    display: none; /* wird via JS angezeigt, wenn gesucht wird */
}

.rp-results-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #111827;
}

.rp-result {
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-subtle);
    margin-bottom: 10px;
}

.rp-result h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
}

.rp-result p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 6px;
    color: #374151;
}

.rp-result-link {
    margin-top: 4px;
    font-size: 11px;
}
/* =======================================================
   DISCORD-REGELWERK – SEKTIONS-CARDS
======================================================= */

.rule-section-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.rule-section {
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-subtle);
}

.rule-section h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
}

.rule-section p {
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
}


/* -------------------------------------------------------
   ADMIN PANEL – BLOCK CARDS
------------------------------------------------------- */

.admin-block {
    padding: 28px 30px;
    margin-bottom: 30px;

    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.8);

    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);

    box-shadow: var(--shadow-soft);
    transition: var(--transition-fast);
}

.admin-block:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.75);
    box-shadow: 0 12px 36px rgba(15,23,42,0.12);
}

.admin-block h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}

.admin-block p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* -------------------------------------------------------
   ADMIN BUTTONS (Öffnen →)
------------------------------------------------------- */

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;

    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;

    background: linear-gradient(135deg, var(--accent-soft), var(--accent-strong));
    color: #fff;

    border-radius: var(--radius-pill);
    border: 1px solid rgba(255,255,255,0.7);

    transition: var(--transition-fast);
    box-shadow: var(--shadow-subtle);
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(37,99,235,0.5);
}

/* -------------------------------------------------------
   ADMIN GRID (falls benötigt)
------------------------------------------------------- */

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 20px;
}

/* -------------------------------------------------------
   TABLES – für Spielerregister, Bannliste, Streamer
------------------------------------------------------- */

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;

    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-shadow: var(--shadow-subtle);
}

.styled-table thead {
    background: var(--accent);
    color: #fff;
}

.styled-table th,
.styled-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.styled-table tbody tr:hover {
    background: rgba(255,255,255,0.95);
}

/* -------------------------------------------------------
   INPUTS IN TABLES (für Strafenkatalog)
------------------------------------------------------- */

.styled-table input[type="text"],
.styled-table input[type="number"] {
    width: 100%;
    padding: 8px 10px;

    border-radius: var(--radius-md);
    border: 1px solid #d1d5db;

    font-size: 14px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);

    transition: border-color var(--transition-fast),
                background var(--transition-fast);
}

.styled-table input:focus {
    outline: none;
    border-color: var(--accent-strong);
    background: #fff;
}

/* -------------------------------------------------------
   SMALL BUTTONS (💾 Speichern)
------------------------------------------------------- */

.btn-small {
    padding: 8px 14px;
    font-size: 12px;

    background: var(--accent);
    color: #fff;

    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;

    transition: var(--transition-fast);
}

.btn-small:hover {
    background: var(--accent-strong);
    transform: translateY(-2px);
}

/* -------------------------------------------------------
   ADMIN PAGE HEADLINE
------------------------------------------------------- */

.admin-title {
    font-size: 30px;
    font-weight: 700;
    text-align: center;

    color: var(--accent);
    margin-bottom: 10px;
}

.admin-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* -------------------------------------------------------
   GLASS SUB PANELS (kleinere modulare Karten)
------------------------------------------------------- */

.glass-sub {
    background: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.75);

    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);

    border-radius: 18px;
    padding: 22px;

    transition: var(--transition-fast);
}

.glass-sub:hover {
    background: rgba(255,255,255,0.65);
    transform: translateY(-2px);
}

/* -------------------------------------------------------
   RESPONSIVE ADMIN
------------------------------------------------------- */

@media (max-width: 780px) {

    .admin-block {
        padding: 22px;
    }

    .admin-block h2 {
        font-size: 18px;
    }

    .styled-table th,
    .styled-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .admin-btn {
        font-size: 11px;
        padding: 8px 16px;
    }
}

.job-badge {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    background: #e5e7eb;
    color: #111827;
}

.job-badge.blue { background:#063157; color:white; }
.job-badge.green { background:#16a34a; color:white; }
.job-badge.red { background:#dc2626; color:white; }

.btn-outline-small {
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    color: #4a5568;
    text-decoration: none;
    font-size: 13px;
    background: #fff;
    transition: 0.2s;
    white-space: nowrap;
}
.btn-outline-small:hover {
    border-color: #1f73b7;
    color: #1f73b7;
}
