/* TrainOS Modern Design Language */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent: #00e070; /* TrainOS Green */
    --accent-hover: #00b359;
    --danger: #ff4444;
    --border: #333;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* HEADER (Index Dashboard) */
.uni-.uni-header {
    background-color: #000;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #222;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.uni-header .nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.uni-header .nav-links a:hover, .uni-header .nav-links a.active {
    color: var(--accent);
}

/* NAVBAR (Standardized) */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 5%;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    z-index: 1000; border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.5s ease, padding 0.5s ease;
    box-sizing: border-box;
}
.navbar:hover { background: rgba(5, 5, 5, 0.3); }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.nav-logo { height: 45px; transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); filter: drop-shadow(0 0 5px rgba(255,255,255,0.2)); }
.nav-logo:hover { transform: scale(1.08) rotate(-2deg); filter: drop-shadow(0 0 15px rgba(255,255,255,0.6)); }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: 600; transition: all 0.4s ease; display: inline-flex; align-items: center; }
.nav-links a:hover { color: var(--accent); text-shadow: 0 0 10px rgba(0, 224, 112, 0.4); transform: translateY(-2px); }

.nav-divider { display: inline-block; width: 1px; height: 24px; background: rgba(255,255,255,0.15); vertical-align: middle; margin: 0 15px; }

/* PREMIUM BUTTONS MIT SHINE EFFEKT FOR NAVBAR & GLOBAL */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #00e070 0%, #00a8cc 100%); color: #000; padding: 10px 24px; border-radius: 25px;
    font-weight: 800; box-shadow: 0 4px 15px rgba(0, 224, 112, 0.3); border: none; text-decoration: none;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); cursor: pointer;
    position: relative; overflow: hidden; font-family: 'Montserrat', sans-serif;
}
.btn-primary:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 25px rgba(0, 224, 112, 0.6); color: #fff; }

.btn-login {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); 
    color: #fff; padding: 10px 24px; border-radius: 25px; text-decoration: none; 
    font-weight: 600; transition: all 0.3s ease; 
    backdrop-filter: blur(10px); cursor: pointer; text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    margin-right: 15px; font-family: 'Montserrat', sans-serif;
}
.btn-login:hover {
    background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* LAYOUT */
.container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border: 1px solid #2a2a2a;
}

h1, h2, h3 {
    margin-top: 0;
    color: #fff;
    font-weight: 700;
}

h1 { font-size: 2rem; margin-bottom: 10px; }
h2 { font-size: 1.5rem; color: var(--accent); margin-bottom: 20px; }

p { color: var(--text-muted); }

/* FORMS & INPUTS */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input[type="text"], input[type="password"], input[type="number"], select {
    width: 100%;
    padding: 12px;
    background-color: #2a2a2a;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
}

/* BUTTONS */
button, .btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--accent);
    color: #000;
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

button:hover, .btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background-color: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn-danger:hover {
    background-color: var(--danger);
    color: #fff;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* TABLES */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background-color: #252525; }

/* UTILS */
.flex-row { display: flex; gap: 15px; align-items: flex-end; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.badge {
    background: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* =========================================
   TRAINOS SPEZIAL: MENTIONS & KEYBINDS
   ========================================= */

/* --- USER MENTIONS (@Nutzername) --- */
.user-mention {
    display: inline-flex;
    align-items: center;
    height: 20px;
    background: rgba(0, 224, 112, 0.15);
    color: #00e070 !important;
    padding: 0 4px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    vertical-align: baseline; 
    border: none;
    transition: background 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.user-mention:hover {
    background: rgba(0, 224, 112, 0.3);
}

.user-mention img {
    width: 14px;
    height: 14px;
    border-radius: 0 !important; 
    image-rendering: pixelated; 
    display: block; 
    margin-right: 4px;
}

/* --- MODERN MECHANISCHE TASTEN (Keybinds) --- */
kbd {
    display: inline-block;
    background-color: #1a1a1a;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85em;
    font-weight: 700;
    padding: 4px 10px;
    margin: 0px 0px; /* Horizontales Margin auf 0px gesetzt */
    border: 1px solid var(--accent, #00e070); /* Klare grüne Umrandung */
    border-radius: 6px;
    text-transform: uppercase;
    white-space: nowrap;

    /* Perfekte Textausrichtung in der Zeile */
    vertical-align: baseline; /* Ausrichtung auf der Grundlinie */
    line-height: 1.2;

    /* Kein starker Glow mehr, sondern saubere Schatten für die 3D-Tiefe */
    box-shadow:
        0 3px 0 #000, /* Physische 3D-Tiefe */
        0 4px 6px rgba(0, 0, 0, 0.5); /* Leichter Schlagschatten für Tiefe */

    transform: none; /* Keine Anfangstransformation */

    /* Sanfte Übergänge für die Licht-Shifts */
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s ease;
    cursor: default;
}

/* Hover: Sehr dezent glühen, umrandung bleibt grün */
kbd:hover {
    background-color: #222;
    box-shadow:
        0 3px 0 #000,
        0 4px 8px rgba(0, 224, 112, 0.25); /* Dezenter Glow statt grellem Leuchten */
}

/* Klick/Aktiv: Die Taste wird eingedrückt */
kbd:active {
    transform: translateY(1px); /* Taste schiebt sich physisch nach unten */
    box-shadow:
        0 0px 0 #000, /* 3D-Tiefe verschwindet */
        0 1px 2px rgba(0, 224, 112, 0.15);
    background-color: #1a1a1a;
}

/* =========================================
   📱 MOBILE DASHBOARD OPTIMIERUNG
   (Wird auf Desktops zu 100% ignoriert)
   ========================================= */
@media (max-width: 768px) {
    /* 1. Platz sparen: Container & Cards schmaler machen */
    .container {
        padding: 0 10px;
        margin: 20px auto;
    }
    .card {
        padding: 15px; /* Weniger Rand innen, mehr Platz für Inhalte */
        margin-bottom: 20px;
    }

    /* 2. Header & Navigation daumenfreundlich stapeln */
    .uni-header {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
        text-align: center;
    }
    .uni-header .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px; /* Mehr Platz zwischen den Links */
    }
    .uni-header .nav-links a {
        margin-left: 0;
        padding: 8px 12px; /* Klickbare Fläche (Touch Target) vergrößern */
        background: rgba(255, 255, 255, 0.05); /* Leichter Button-Look für Mobile */
        border-radius: 8px;
    }

    /* 3. Grids auflösen (Alles sauber untereinander) */
    .dashboard-grid, .grid-2 {
        grid-template-columns: 1fr !important; /* Erzwingt 1-Spalten-Layout */
        gap: 15px;
    }

    /* 4. Tabellen Wischbar machen (Der Gamechanger!) 
       Ohne HTML zu ändern, machen wir die Tabelle selbst zum Scroll-Container */
    table {
        display: block;
        width: 100%;
        overflow-x: auto; /* Erlaubt das seitliche Wischen */
        -webkit-overflow-scrolling: touch; /* Sanftes Wischen auf iOS */
        white-space: nowrap; /* Verhindert, dass Text hässlich umbricht */
        border-radius: 6px;
    }
    /* Schicke mobile Scrollbar für Tabellen, damit der Nutzer weiß, dass er wischen kann */
    table::-webkit-scrollbar {
        height: 6px;
    }
    table::-webkit-scrollbar-thumb {
        background: var(--accent);
        border-radius: 3px;
    }
    table::-webkit-scrollbar-track {
        background: #1a1a1a;
    }

    /* 5. Buttons für dicke Daumen optimieren */
    button, .btn {
        width: 100%; /* Buttons nehmen die volle Breite ein */
        padding: 15px;
        text-align: center;
        margin-bottom: 10px;
    }
    
    /* Input-Gruppen (z.B. Suche + Button) untereinander stapeln */
    .flex-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}

/* =========================================
   TEXT-UMBRUCH & LESE-OPTIMIERUNG
   (Ignoriert EBuLa, Funk und Stellwerk)
   ========================================= */

/* 1. Saubere Silbentrennung & Wortumbruch für Dashboard/Landing-Boxen */
p, .card, .feature-card, .mission-text, .team-card, td, .stat-box {
    /* Verhindert, dass ultralange Wörter (wie Links) die Box in die Breite ziehen */
    overflow-wrap: break-word;
    word-wrap: break-word;
    
    /* Automatische deutsche Silbentrennung mit Bindestrich (-) */
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

/* =========================================
   📱 MOBILE LANDING OPTIMIERUNG
   (Ersetzt den alten @media Block)
   ========================================= */
@media (max-width: 768px) {
    /* 1. Navbar & Navigation (Modernes Wisch-Menü statt ausblenden) */
    .navbar {
        flex-direction: column;
        padding: 15px 5% 10px;
        gap: 15px;
    }
    .nav-links {
        display: flex !important; /* Holt die Links zurück! */
        width: 100%;
        overflow-x: auto; /* Erlaubt seitliches Wischen mit dem Daumen */
        -webkit-overflow-scrolling: touch; /* Sanftes Wischen auf iOS */
        padding-bottom: 5px;
        justify-content: flex-start;
        gap: 20px;
    }
    /* Versteckt den Scrollbalken für einen cleanen Look */
    .nav-links::-webkit-scrollbar { display: none; } 
    .nav-divider { display: none; } /* Nimmt auf dem Handy nur unnötig Platz weg */

    /* 2. Platzfresser (Riesige Paddings) reduzieren */
    .page-.uni-header { padding: 130px 5% 30px; } /* Vorher 180px! */
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    
    .mission-text { padding: 25px; margin-bottom: 50px; }

    /* 3. Grids (Karten) reparieren - Verhindert horizontales Wackeln */
    .grid, .team-grid {
        grid-template-columns: 1fr !important; /* Zwingt alles sauber in eine Spalte */
        gap: 20px;
    }
    
    /* 4. Karten & Boxen anpassen */
    .feature-card, .team-card, .stat-box { 
        padding: 25px 20px; 
    }
    
    .stats-grid { grid-template-columns: 1fr; }
    
    /* 5. Buttons für dicke Daumen (Volle Breite) */
    .btn-discord, .btn-hero, .btn-secondary, .btn-curseforge {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
        text-align: center;
    }

    /* 6. Footer aufräumen & stapeln */
    .main-footer { padding: 40px 0 20px; }
    .footer-container { gap: 30px; flex-direction: column; align-items: center; text-align: center; }
    .footer-links { gap: 30px; justify-content: center; width: 100%; }
    .link-group { text-align: center; } /* Links im Footer mittig setzen */
    .footer-bottom { margin-top: 30px; flex-direction: column; gap: 15px; text-align: center; }
}

