/* =========================
   囲碁検討エンジン：掲示板用スタイル
   ========================= */

/* 棋譜ビューア全体 */
.besogo-viewer {
    /* margin なし */
}

/* レイアウト（左：碁盤、右：操作パネル） */
.besogo-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* 碁盤エリア */
.besogo-board-area {
    flex-shrink: 0;
}

/* 碁盤キャンバス */
.besogo-board-area canvas {
    border: 1px solid #333;
    cursor: default;
    max-width: 100%;
    background: #DEB887;
}

/* 操作パネル */
.besogo-controls {
    flex-grow: 0;
    min-width: 200px;
}

/* ナビゲーションボタン */
.besogo-nav-buttons {
    margin-bottom: 10px;
}

.besogo-nav-buttons button {
    min-width: 50px;
    height: 32px;
    cursor: pointer;
    border: 1px solid #999;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    padding: 5px 10px;
    margin-right: 3px;
    transition: background 0.2s;
}

.besogo-nav-buttons button:hover {
    background: #eee;
}

/* SGFボタン */
.besogo-sgf-buttons {
    margin-bottom: 8px;
}

.besogo-sgf-buttons button {
    min-width: 80px;
    height: 32px;
    cursor: pointer;
    border: 1px solid #999;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    padding: 5px 10px;
    margin-right: 3px;
    transition: background 0.2s;
}

.besogo-sgf-buttons button:hover {
    background: #eee;
}

/* 手数表示 */
.besogo-info {
    font-size: 14px;
    color: #333;
    padding: 5px;
    background: #f5f5f5;
    border-radius: 3px;
    margin-bottom: 10px;
}

/* SGFエリア */
.besogo-sgf-area {
    max-width: 350px;
}

/* SGFテキストエリア */
.besogo-sgf-textarea {
    width: 100%;
    height: 50px;
    font-size: 12px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    resize: none;
    font-family: monospace;
    box-sizing: border-box;
}

/* リンクエリア */
.besogo-link-area {
    margin-top: 10px;
}

/* 検討盤リンク */
.besogo-variation-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background-color: #e8f5e9;
    color: #1f5d3a;
    text-decoration: none;
    border: 2px solid #1f5d3a;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.besogo-variation-link::before {
    content: "eco";
    font-family: "Material Icons";
    font-size: 18px;
}

.besogo-variation-link:hover {
    background-color: #c8e6c9;
    text-decoration: none;
}

/* =========================
   レスポンシブ対応
   ========================= */

/* タブレット */
@media screen and (max-width: 768px) {
    .besogo-layout {
        gap: 15px;
    }
    
    .besogo-nav-buttons button,
    .besogo-sgf-buttons button {
        min-width: 45px;
        font-size: 13px;
        padding: 5px 6px;
    }
    
    .besogo-variation-link {
        font-size: 13px;
        padding: 6px 15px;
    }
}

/* スマホ（小画面） */
@media screen and (max-width: 480px) {
    .besogo-layout {
        flex-direction: column;
        gap: 10px;
    }
    
    .besogo-board-area {
        width: 100%;
        text-align: center;
    }
    
    .besogo-controls {
        width: 100%;
        min-width: auto;
    }
    
    .besogo-nav-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .besogo-nav-buttons button {
        min-width: 40px;
        height: 28px;
        font-size: 12px;
        padding: 0 4px;
        margin-right: 0;
        flex: 1 1 auto;
    }
    
    .besogo-sgf-buttons {
        display: flex;
        gap: 4px;
    }
    
    .besogo-sgf-buttons button {
        flex: 1;
        min-width: 60px;
        height: 28px;
        font-size: 12px;
        padding: 0 4px;
        margin-right: 0;
    }
    
    .besogo-variation-link {
        font-size: 12px;
        padding: 6px 12px;
        display: block;
        text-align: center;
    }
    
    .besogo-sgf-textarea {
        font-size: 11px;
        height: 45px;
    }
    
    .besogo-info {
        font-size: 13px;
    }
}

/* 画面が広い場合は横並びを明示的に指定 */
@media screen and (min-width: 481px) {
    .besogo-layout {
        flex-direction: row;
    }
    
    .besogo-board-area {
        width: auto;
        text-align: left;
    }
    
    .besogo-controls {
        width: auto;
        min-width: 200px;
        flex-grow: 0;
    }
}
