:root {
    --bg-main: #0b0b0e;        /* Tiefes Schwarz als Hauptgrundton */
    --bg-secondary: #16161c;   /* Dunkle Box-Farbe */
    --bg-tertiary: #0d0d11;    /* Noch dunkleres Schwarz für Eingabefelder */
    --accent-purple: #6d28d9;  /* Edles Dunkellila */
    --accent-purple-hover: #5b21b6; /* Satters Dunkellila beim Hover */
    --text-main: #e2e8f0;      /* Hellgrauer Text für optimale Lesbarkeit */
    --text-muted: #94a3b8;     /* Gedämpfter Text */
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column; /* Elemente untereinander anordnen */
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    overflow: auto; /* Geändert von hidden auf auto, damit größere Ansichten wie Charakterblätter nicht abgeschnitten werden */
}

/* --- NEU: Der Riesen-Panther als Hintergrund-Wasserzeichen --- */
.bg-panther {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    /* KORREKTUR: Direkter relativer Pfad, da in .css-Datei */
    background-image: url('panther.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain; /* Bild wird so groß wie möglich skaliert */
    opacity: 0.07; /* Sehr transparent, nur als dezentes Wasserzeichen */
    z-index: -1; /* Ganz nach hinten hinter alle anderen Elemente */
    pointer-events: none; /* Klicks gehen durch das Bild hindurch */
}

/* --- Längliche Logo-Box (angepasst) --- */
.logo-box {
    width: 100%;
    max-width: 450px;
    background: var(--bg-secondary);
    padding: 20px; /* Mehr Luft für den Schriftzug */
    display: flex;
    align-items: center;
    justify-content: center; /* Text ist jetzt perfekt zentriert */
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
    border: 1px solid #202028;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* Das Bild-Element in der Box wird ausgeblendet */
.logo-img {
    display: none; 
}

.logo-text {
    color: #a78bfa; /* Edles Lila für den Schriftzug */
    font-weight: bold;
    font-size: 3.5rem; /* Noch größerer Schriftzug, da er den Platz hat */
    letter-spacing: 8px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(167, 139, 250, 0.4); /* Leichter Glow-Effekt */
}

.container {
    width: 100%;
    max-width: 450px;
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    box-sizing: border-box;
    border: 1px solid #202028;
}

h2 {
    color: #ffffff;
    text-align: center;
    margin-top: 0;
}

p {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 10px;
    background: var(--bg-tertiary);
    border: 1px solid #202028;
    border-radius: 4px;
    color: var(--text-main);
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-purple);
    outline: none;
}

button {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-purple);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}

button:hover {
    background-color: var(--accent-purple-hover);
}

.links {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 0.9rem;
}

a {
    color: #a78bfa; /* Sanftes Lila für Links auf schwarzem Grund */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==========================================================
   --- SPIELFELD / GAME BOARD ERWEITERUNGEN (SCHWARZES GRID) ---
   ========================================================== */

/* Wrapper für den Zoom-Bereich der Karte */
.map-viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 80vh;
    background-color: var(--bg-tertiary);
    border: 1px solid #202028;
    border-radius: 8px;
}

/* Das eigentliche Kartenelement */
.map-container {
    position: absolute;
    transform-origin: 0 0;
}

/* Kartenbild selbst */
.map-image {
    display: block;
    max-width: none;
    pointer-events: none; /* Klicks gehen durch das Bild hindurch */
}

/* SCHWARZES GRID ALS SEPARATE EBENE (Skaliert mit Zoom & liegt über dem Bild) */
.map-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 2px dicke, tiefschwarze Rasterlinien */
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.95) 2px, transparent 2px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.95) 2px, transparent 2px);
    background-size: 50px 50px; /* Rasterfeld-Größe (bei Bedarf anpassen, z.B. 40px) */
    pointer-events: none;
    z-index: 5; /* Über dem Bild, aber unter den Tokens */
}

/* Stil für Spielsteine / Tokens auf dem Spielfeld */
.game-token {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    cursor: grab;
    transform: translate(-50%, -50%);
    z-index: 10; /* Über dem Grid, damit sie anklickbar bleiben */
}

.game-token:active {
    cursor: grabbing;
}