/* =============================== */
/*        ГЛОБАЛЬНІ СТИЛІ          */
/* =============================== */

body {
    margin: 0;
    padding: 0;
    background: #0d0d0f;
    color: #e6e6e6;
    font-family: "Segoe UI", sans-serif;
    overflow: hidden;
}

#app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* =============================== */
/*        ЛІВА ПАНЕЛЬ (КАРТА)      */
/* =============================== */

#canvas-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;
}

#pixel-canvas {
    width: 1000px;
    height: 1000px;
    display: block;
    image-rendering: pixelated;
}

/* PREVIEW CANVAS */
#preview-canvas {
    position: absolute;
    width: 1000px;
    height: 1000px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    image-rendering: pixelated;
}

/* =============================== */
/*        ПРАВА ПАНЕЛЬ (МЕНЮ)      */
/* =============================== */

#side-panel {
    width: 320px;
    background: #141418;
    border-left: 2px solid #1f1f25;
    padding: 20px;
    overflow-y: auto;
    box-shadow: -4px 0 12px rgba(0,0,0,0.4);
}

/* =============================== */
/*        МІНІКАРТА                */
/* =============================== */

#minimap-container {
    position: absolute;
    bottom: 20px;
    right: 350px;
    width: 180px;
    height: 180px;
    background: #1a1a20;
    border: 2px solid #333;
    border-radius: 6px;
    box-shadow: 0 0 12px rgba(0,0,0,0.5);
    cursor: move;
    z-index: 20;
}

#minimap {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

#minimap-viewport {
    position: absolute;
    border: 2px solid #ffd34d;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(255, 211, 77, 0.8);
}

/* =============================== */
/*        ІНСПЕКТОР ПІКСЕЛІВ       */
/* =============================== */

#pixel-inspector {
    position: absolute;
    top: 10px;
    left: 10px;

    background: rgba(20, 20, 25, 0.95);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #444;

    display: none;

    width: 160px;
    min-height: 80px;

    color: #fff;
    font-size: 13px;
    line-height: 1.3;
}

#inspector-canvas {
    display: block;
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    border: 1px solid #666;
}

#pi-color {
    width: 40px;
    height: 20px;
    border: 1px solid #666;
    margin-bottom: 8px;
}

#inspector-info {
    margin-top: 5px;
}

/* =============================== */
/*        TOOLTIP (НОВЕ)          */
/* =============================== */

#pixel-tooltip {
    position: fixed;
    display: none;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    max-width: 260px;
    pointer-events: none;
    z-index: 9999;
    white-space: normal;
    line-height: 1.3;
}

/* =============================== */
/*        TEXTAREA (НОВЕ)         */
/* =============================== */

#pixelMessage {
    width: 100%;
    height: 80px;
    resize: none;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #888;
    background: #111;
    color: #fff;
    margin-top: 5px;
    margin-bottom: 10px;
}

/* =============================== */
/*        АДАПТИВНІСТЬ             */
/* =============================== */

@media (max-width: 900px) {
    #side-panel {
        width: 260px;
    }
}

@media (max-width: 700px) {
    #side-panel {
        display: none;
    }
}
