/* 全体の基本設定 */
body {
    background-color: #2c2f33; /* 暗い背景色 */
    color: #ffffff; /* 白い文字色 */
    font-family: sans-serif; /* 基本のフォント */
    margin: 0;
    display: flex;
    flex-direction: column; /* 全体を縦に並べる */
    height: 100vh; /* 画面全体の高さを使う */
}

/* ヘッダーエリアのスタイル */
#header {
    display: flex;
    justify-content: space-between; /* 要素を均等に配置 */
    align-items: center;
    padding: 10px 20px;
    background-color: #23272a; /* ヘッダーの背景色 */
    border-bottom: 1px solid #99aab5;
}

h1 {
    margin: 0;
    font-size: 1.5em;
}

/* メインコンテンツエリア（ツールボックスとキャンバス） */
#main-content {
    display: flex;
    flex-grow: 1; /* 残りの高さをすべて使う */
}

/* ツールボックスのスタイル */
#tool-box {
    width: 200px;
    padding: 15px;
    background-color: #23272a;
    border-right: 1px solid #99aab5;
}

/* 作戦キャンバスのスタイル */
#strategy-canvas {
    flex-grow: 1;
    background-color: #36393f;
    /* ★★★★★ ここから追加 ★★★★★ */
    user-select: none; /* テキスト選択を無効化 */
    -webkit-user-select: none; /* Safari用 */
    -moz-user-select: none; /* Firefox用 */
    -ms-user-select: none; /* IE/Edge用 */
    -webkit-user-drag: none; /* ドラッグそのものを無効化 (Safari/Chrome) */
    /* ★★★★★ ここまで追加 ★★★★★ */
}
/* フッター / ヒーロー選択バーのスタイル */
#hero-selector-bar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: #23272a;
    border-top: 1px solid #99aab5;
}

/* フッターのヒーロー選択バーの内部レイアウト */
#hero-selector-bar {
    display: flex; /* アイコンを横に並べる */
    justify-content: center; /* 中央揃え */
    align-items: center;
    gap: 10px; /* アイコン間の隙間 */
}

/* フッターに表示するヒーローアイコンのスタイル */
.hero-icon {
    width: 50px; /* アイコンの幅 */
    height: 50px; /* アイコンの高さ */
    cursor: pointer; /* マウスカーソルを指の形にする */
    border: 2px solid transparent; /* 透明な枠線（普段は見えない） */
    border-radius: 5px; /* 角を少し丸める */
    transition: all 0.2s; /* アニメーションを滑らかに */
}

/* 選択されているヒーローアイコンのスタイル */
.hero-icon.selected {
    border-color: #5865F2; /* 選択されたら枠線を青くする */
    transform: scale(1.1); /* 少しだけ大きくする */
}

.tool-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-button {
    font-size: 24px;
    width: 50px;
    height: 50px;
    background-color: #40444b;
    color: #ffffff;
    border: 2px solid #99aab5;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.tool-button:hover {
    background-color: #5865F2;
}

/* 選択されているツールのボタンスタイル */
.tool-button.active {
    background-color: #5865F2;
    border-color: #ffffff;
}

#strategy-canvas.eraser-mode {
    cursor: crosshair; /* 十字カーソルに変更 */
}

#color-palette {
    display: flex;
    gap: 8px; /* 色の間の隙間 */
}

.color-swatch {
    width: 25px;
    height: 25px;
    border-radius: 50%; /* 円形にする */
    border: 3px solid #23272a; /* 普段の枠線 */
    cursor: pointer;
    transition: transform 0.2s;
}

.color-swatch:hover {
    transform: scale(1.1);
}

/* 選択されている色のスタイル */
.color-swatch.selected {
    border-color: #ffffff; /* 白い枠線で目立たせる */
}

#width-selector {
    display: flex;
    gap: 8px;
}

.width-button {
    flex-grow: 1;
    padding: 5px;
    font-size: 14px;
    background-color: #40444b;
    color: #ffffff;
    border: 2px solid #99aab5;
    border-radius: 5px;
    cursor: pointer;
}

.width-button.selected {
    background-color: #5865F2;
    border-color: #ffffff;
}

#skill-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    background-color: rgba(44, 47, 51, 0.9);
    border: 1px solid #99aab5;
    border-radius: 5px;
    padding: 8px;
    display: none;
    z-index: 1000;
    flex-direction: row;
    gap: 8px;
}

#skill-popup.visible {
    display: flex;
}

#skill-popup .skill-icon {
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    pointer-events: auto;
}

#skill-popup .skill-icon:hover {
    border-color: #5865F2;
}