:root {
    --bg-color: #4faee0; /* Helles Blau als Platzhalter für deinen Hintergrund */
    --box-bg: rgba(25, 40, 55, 0.85); /* Dunkle, leicht transparente Boxen */
    --accent-cyan: #00e5ff;
    --accent-orange: #ff9900;
    --text-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    /* Hier kannst du später dein Circuit-Hintergrundbild einbinden: */
    /* background-image: url('../img/circuit-bg.jpg'); */
    /* background-size: cover; */
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--box-bg);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border-right: 2px solid var(--accent-cyan);
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .nav-links li a span {
    display: none;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    color: var(--accent-orange);
    font-size: 1.2rem;
    white-space: nowrap;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Ersetze ab .nav-links li a diesen Bereich: */

.nav-links li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: 0.2s;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.nav-links li a .icon {
    min-width: 30px; /* Hält die Icons gleichmäßig auf Abstand zum Text */
    font-style: normal;
}

.nav-links li a:hover {
    background-color: rgba(0, 229, 255, 0.1);
}

/* Aktiver Status (Highlighting) */
.nav-links li a.active {
    background-color: rgba(0, 229, 255, 0.2);
    border-left: 3px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-weight: bold;
}

/* Das Verstecken beim Einklappen der Sidebar fixen */
.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .nav-links li a span,
.sidebar.collapsed .nav-links li a .arrow {
    display: none;
}

/* --- Untermenü Styling --- */
.has-submenu .submenu {
    display: none;
    list-style: none;
    background-color: rgba(0, 0, 0, 0.25); /* Etwas dunkler zur Abhebung */
}

/* Wenn das Submenü offen ist, zeige es an */
.has-submenu.submenu-open .submenu {
    display: block;
}

.has-submenu .submenu li a {
    padding: 10px 20px 10px 50px; /* Eingerückt */
    font-size: 0.9rem;
    border-left: none;
}

.has-submenu .submenu li a:hover,
.has-submenu .submenu li a.active {
    background-color: transparent;
    color: var(--accent-cyan);
    border-left: none; /* Kein Rand für Untermenüs */
}

/* Kleiner Pfeil für die Dropdowns */
.arrow {
    margin-left: auto;
    font-style: normal;
    font-size: 0.8rem;
    transition: transform 0.3s;
}

/* Pfeil drehen, wenn Menü offen */
.submenu-open .arrow {
    transform: rotate(180deg);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: 60px;
    background-color: var(--box-bg);
    display: flex;
    justify-content: flex-end; /* Inhalt nach rechts schieben */
    align-items: center;
    padding: 0 20px;
    border-bottom: 2px solid var(--accent-cyan);
}

.twitch-login-btn {
    background-color: #9146FF; /* Twitch Logo Farbe */
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: 0.2s;
}

.twitch-login-btn:hover {
    background-color: #772ce8;
}

/* Content Area */
.content {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.glass-box {
    background-color: var(--box-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.glass-box h1 {
    color: var(--accent-orange);
    margin-bottom: 15px;
}

/* Versteckt offene Untermenüs, wenn die Sidebar eingeklappt ist */
.sidebar.collapsed .has-submenu.submenu-open .submenu {
    display: none;
}

/* Optional: Entfernt das Padding für die Icons in eingeklappten Menüpunkten mit Untermenü, 
   damit sie bündig mit den anderen Icons bleiben */
.sidebar.collapsed .has-submenu > a {
    justify-content: center;
}


/* --- Tabellen Styling --- */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    color: var(--accent-orange);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.data-table tbody tr:hover {
    background-color: rgba(0, 229, 255, 0.05);
}

/* --- Formular & Badges --- */
.form-select {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    border: 1px solid var(--accent-cyan);
    padding: 5px 10px;
    border-radius: 4px;
    outline: none;
}

.form-select:focus {
    box-shadow: 0 0 5px var(--accent-cyan);
}

/* --- Suchleiste & Inputs --- */
.search-bar {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 3px solid var(--accent-orange);
}

.search-bar form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap; /* Bricht um, falls das Fenster zu klein ist */
}

.form-input {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    border: 1px solid var(--accent-cyan);
    padding: 8px 12px;
    border-radius: 4px;
    outline: none;
    min-width: 250px;
}

.form-input:focus {
    box-shadow: 0 0 5px var(--accent-cyan);
}

.btn-clear {
    background-color: transparent;
    border: 1px solid var(--accent-orange);
    color: var(--accent-orange);
    text-decoration: none;
    display: inline-block;
}

.btn-clear:hover {
    background-color: rgba(255, 153, 0, 0.2);
}

.btn-small {
    background-color: var(--accent-cyan);
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn-small:hover {
    background-color: #00b8cc;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}
.role-user { background-color: rgba(255, 255, 255, 0.1); color: #ccc; }
.role-mod { background-color: rgba(46, 204, 113, 0.2); color: #2ecc71; border: 1px solid #2ecc71; }
.role-admin { background-color: rgba(231, 76, 60, 0.2); color: #e74c3c; border: 1px solid #e74c3c; }

/* Modal Hintergrund */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* Initial versteckt */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    width: 450px;
    max-width: 90%;
    border: 2px solid var(--accent-cyan);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.form-group {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Rarity Farben in der Tabelle */
.role-common { border: 1px solid #ccc; color: #ccc; }
.role-rare { border: 1px solid #3498db; color: #3498db; }
.role-epic { border: 1px solid #9b59b6; color: #9b59b6; }
.role-legendary { border: 1px solid #f1c40f; color: #f1c40f; }