/* src/css/style.css */
:root {
    --bg-dark: #1e1e24;
    --sidebar-bg: #2b2b36;
    --text-light: #e0e0e0;
    --accent: #ff4757; /* Warhammer Red */
    --grid-line: rgba(255, 255, 255, 0.1);
    --scale: 20px; /* 1 inch = 20px */
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    height: 100vh;
    overflow: hidden;
}

#app-container {
    display: flex;
    height: 100vh;
}

/* --- SIDEBAR --- */
#sidebar {
    width: 300px;
    background: var(--sidebar-bg);
    padding: 20px;
    border-right: 1px solid #444;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

#sidebar h2 { margin-top: 0; color: var(--accent); }
#sidebar input, #sidebar select, #sidebar button {
    background: #444;
    border: 1px solid #666;
    color: white;
    padding: 5px;
    margin: 5px 0;
    width: 100%;
}
#sidebar button:hover { background: var(--accent); cursor: pointer; }

/* --- VIEWPORT & STAGING --- */
#viewport {
    flex-grow: 1;
    display: flex;
    background: #111;
    overflow: auto; /* Allow scrolling for large maps */
    position: relative;
    padding: 20px;
    align-items: flex-start;
    justify-content: center;
}

.staging-area {
    width: 150px;
    min-height: 500px;
    border: 2px dashed #444;
    margin: 0 10px;
    background: rgba(0,0,0,0.3);
    position: relative;
}

/* --- THE MAP --- */
#map-container {
    position: relative;
    border: 5px solid #333;
    background-size: cover;
    background-position: center;
    background-color: #222;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Map Sizes (1 inch = 20px) */
.map-colluseum { width: 720px; height: 720px; }   /* 36x36 */
.map-battlefield { width: 1200px; height: 880px; } /* 60x44 (Horizontal) */
.map-warzone { width: 1440px; height: 960px; }    /* 72x48 */

#overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to units unless measuring */
    z-index: 100;
}

/* --- UNITS --- */
.unit {
    position: absolute;
    border-radius: 50%;
    background: cadetblue;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    cursor: grab;
    user-select: none;
    z-index: 50;
    color: white;
    text-shadow: 0 0 2px black;
}

.unit:active { cursor: grabbing; border-color: var(--accent); }

/* Wounds Counter Badge */
.wound-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- MODAL --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 200;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
}
.modal-content {
    background-color: var(--sidebar-bg);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 300px;
    text-align: center;
}
