:root {
    --bg-color: #121212;
    --panel-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --accent: #bb86fc;
    --color-red: #cc0000;
    --color-yellow: #f1e300;
    --color-green: #7be300;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: var(--panel-bg);
    border-bottom: 1px solid #333;
}

main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

#left-panel {
    flex: 3;
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid #333;
}

#right-panel {
    flex: 1;
    padding: 20px;
    background-color: var(--panel-bg);
    overflow-y: auto;
}

/* Floating Buttons */
#floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

button {
    background-color: var(--accent);
    color: #000;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
}

button:hover { background-color: #9965f4; }

/* Modals */
.hidden { display: none !important; }
#modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 9;
}
.modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: var(--panel-bg); padding: 20px; border-radius: 8px;
    z-index: 10; display: flex; flex-direction: column; gap: 10px;
    min-width: 300px; border: 1px solid #444;
}
.modal input, .modal select {
    padding: 8px; background: #333; color: #fff; border: 1px solid #555;
}

/* Raid Container */
.raid-container {
    background: #2a2a2a; border-radius: 8px; padding: 15px; margin-bottom: 20px;
}
.raid-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.raid-delete {
    cursor: pointer; color: #ff5555; font-weight: bold;
}
.raid-delete:hover { color: #ff0000; }
.raid-edit { cursor: pointer; }

/* Grid Layout für Member in Raids */
.raid-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px;
    background: #444; border: 1px solid #444;
}
.grid-header {
    background: #111; font-weight: bold; padding: 8px; text-align: center;
}
.raid-slots {
    display: contents; /* Sortable container, aber optisch Teil des Grids */
}
.member-row {
    display: contents; cursor: grab;
}
.member-cell {
    padding: 8px; text-align: center; background: #333;
    border-bottom: 1px solid #444; user-select: none;
}
.member-row:active { cursor: grabbing; }

/* Farbcodierung nach Zeilen (nth-child der Rows) */
/* INAE (8 man) */
.raid-type-Inae .raid-slots .member-row:nth-child(-n+4) .member-cell {
    background-color: var(--color-red); color: white;
}
.raid-type-Inae .raid-slots .member-row:nth-child(n+5):nth-child(-n+8) .member-cell {
    background-color: var(--color-yellow); color: black;
}

/* DELEZIE (12 man) */
.raid-type-Delezie .raid-slots .member-row:nth-child(-n+4) .member-cell {
    background-color: var(--color-red); color: white;
}
.raid-type-Delezie .raid-slots .member-row:nth-child(n+5):nth-child(-n+8) .member-cell {
    background-color: var(--color-yellow); color: black;
}
.raid-type-Delezie .raid-slots .member-row:nth-child(n+9):nth-child(-n+12) .member-cell {
    background-color: var(--color-green); color: white;
}

.total-score {
    margin-top: 10px; font-weight: bold; text-align: right; color: var(--accent);
}

/* Right Panel List */
#available-members-list {
    display: flex; flex-direction: column; gap: 8px; min-height: 200px;
}
.pool-member {
    background: #333; padding: 10px; border-radius: 4px; cursor: grab;
    display: flex; justify-content: space-between; border: 1px solid #555;
}
.pool-member span { pointer-events: none; }