:root {
    --bg-dark: #0b0c10;
    --panel-bg: #14161f;
    --border-color: #242938;
    --cell-bg: #1d212c;
    --cell-hover: #2b3244;
    --accent: #3a75ff;
    --white-piece: #f2f5fb;
    --black-piece: #111217;
    --black-border: #6d788d;
    --core-glow: #00d2ff;
    --target-hint: rgba(0, 210, 255, 0.35);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    touch-action: manipulation;
}

body {
    background: var(--bg-dark);
    color: #fff;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

#app {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 8px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.header-links a {
    color: #8b94a5;
    text-decoration: none;
    font-size: 0.75rem;
}

/* Neue kompakte Konfigurationsleiste */
.config-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.config-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.config-label {
    font-size: 0.75rem;
    color: #8b94a5;
    min-width: 45px;
}

.btn-group {
    display: flex;
    gap: 4px;
    flex: 1;
}

.btn {
    flex: 1;
    padding: 6px;
    background: #1c202a;
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.btn.active, .btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-primary {
    background: #00b074;
    border-color: #00b074;
    font-weight: 700;
    width: 100%;
}

.btn-primary:hover {
    background: #02c784;
}

.game-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel-bg);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.player-panel.active-turn {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(58, 117, 255, 0.2);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.player-badge {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.white-badge { background: var(--white-piece); }
.black-badge { background: var(--black-piece); border: 2px solid var(--black-border); }

.reserve-display {
    font-size: 0.7rem;
    color: #8b94a5;
}

.clock {
    font-size: 1rem;
    font-family: monospace;
    font-weight: bold;
    background: #08090d;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.board {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 3px;
    aspect-ratio: 1 / 1;
    background: #101218;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.cell {
    background: var(--cell-bg);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
}

.cell:hover { background: var(--cell-hover); }

.cell.selected {
    background: #2f374a;
    outline: 2px solid var(--accent);
}

.cell.valid-move::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--target-hint);
    pointer-events: none;
}

.piece {
    width: 78%;
    height: 78%;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    font-weight: bold;
    user-select: none;
}

.piece.white { background: var(--white-piece); color: #000; box-shadow: 0 2px 4px rgba(255,255,255,0.2); }
.piece.black { background: var(--black-piece); color: #fff; border: 2px solid var(--black-border); box-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.piece.core { border: 2px solid var(--core-glow); box-shadow: 0 0 8px var(--core-glow); }

.action-hint {
    text-align: center;
    color: var(--core-glow);
    font-size: 0.75rem;
}

.status-bar {
    text-align: center;
    color: #8b94a5;
    font-size: 0.75rem;
}