/*作成、変更ファイル*/

h1{
    margin:0;
    margin-top:5px;
}
#blockly{
    float: left;
    width:70%;
    /* height:1000px; */
    overflow: hidden;
}
#blocklyDiv{
    width:100%;
    height: 600px;
}
#blocklyDiv_function{
    width:100%;
    height: 900px;
}
#code_area{ /*#othello_area*/ 
    float: right;
    width:28%;
    margin-left:2%;
    margin-top: 2%;
    height: 100px;
}
#btn_area{
    float: left;
    width:60%;
    margin-left: 100px;
    margin-top:10px;
    margin-bottom:50px;
}
#btn_area button {
      font-size: 23px;
      padding: 1px 3px;
      height: 40px;
}
.js_area{
    /* height: 200px; */
    padding:10px;
}
.hat_area{  /*Hat出力エリア*/
    /*display: none;*/
    height: 400px; 
    padding:10px;
}
.hat_output_area{
    /*display: none;*/
    height: 200px; 
    padding:10px;
}
/*.js_area{
    display: none; 
}*/
.outputcode{
    width:100%;
    height:25em;
}
.hatoutputcode{
    width:100%;
    height:7em;
}
.blocklySvg {
    width: 100%;
}



body {
    text-align: center;
  }
  main {
    display: inline-block;
    position: relative;
  }
  
  /* start */
  #modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 19, 19, 0.8);
    color: white;
  }
  
  #turn_select {
    display: flex;
    justify-content: space-evenly;
    margin-top: auto;
  }
  h3,
  p {
    color: white;
  }
  #turn_select p {
    width: 100px;
    font-size: 24px;
    padding: 3px;
    margin: 15px;
    border: solid 1px white;
    cursor: pointer;
    background: black;
    color: white;
  }
  
  /* game */
  #board {
    margin: 0 auto;
    background: #555555;
  }
  td.cell {
    background: rgb(128, 216, 154);
    width: 46px;
    height: 46px;
    margin: 2px;
  }
  .cell div {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin: 0 auto;
  }
  .cell-6 > tr > td {
    width: 63px;
    height: 63px;
  }
  .cell-6 > tr > td > div {
    width: 50px;
    height: 50px;
  }
  .cell-4 > tr > td {
    width: 92px;
    height: 92px;
  }
  .cell-4 > tr > td > div {
    width: 70px;
    height: 70px;
  }
  .black {
    background: black;
  }
  .white {
    background: white;
  }
  h2 {
    text-align: center;
    margin: 5px 0;
  }
  #counter {
    margin: 0 auto;
    margin-top: 15px;
    width: 350px;
    display: flex;
    line-height: 50px;
    font-weight: bold;
    justify-content: space-between;
  }
  #numBlack {
    font-size: 36px;
    margin: 5px;
    width: 100px;
    height: 50px;
    background: black;
    color: white;
    border-radius: 5px;
  }
  #numWhite {
    font-size: 36px;
    margin: 5px;
    width: 100px;
    height: 50px;
    border: solid 1px black;
    border-radius: 5px;
  }
  
  /* end */
  #restartBtn {
    z-index: 1;
    opacity: 0;
    position: absolute;
    width: 25%;
    height: 50px;
    line-height: 50px;
    font-weight: bold;
    cursor: pointer;
    top: 195%;
    left: 86%;
    transform: translate(-50%, -110%);
    color: black;
    background: rgb(244, 247, 73);
  }
  .hide {
    display: none;
  }
/* Blockly ドロップダウンを固定幅にして行ずれを防止 */
#blocklyDiv .blocklyText, 
#blocklyDiv .blocklyDropdownText {
  display: inline-block;
  min-width: 44px;    /* 表示幅（必要なら調整） */
  width: 44px;
  box-sizing: border-box;
  text-align: center; /* 数値を中央表示 */
  padding: 0 2px;
}

/* HTML select を使っている場合のフォールバック */
#blocklyDiv .blocklyHtmlInput, 
#blocklyDiv select {
  width: 44px !important;
  box-sizing: border-box;
  text-align: center;
  font-size: 12px;
  padding: 0 2px;
}

/* eval_table のセル（ブロック上表示）の余白を一定にする */
.blocklyBlockBackground .eval-table-cell,
#blocklyDiv .eval-table-cell {
  min-width: 44px;
  width: 44px;
  display: inline-block;
  text-align: center;
}

/*Blockly のドロップダウンを等幅・固定幅にして行ずれを防止 */
.blocklyText,
.blocklyDropdownText,
.blocklyHtmlInput,
.blocklyFieldLabel,
.blocklyFieldDropdown {
  /*font-family: "Courier New", "Courier", "monospace" !important;*/
  font-size: 14px !important;
  white-space: pre !important;       
  text-align: center !important;
}

/* SVG内の表示文字を見た目上固定幅にする */
.blocklyDropdownText,
.blocklyText {
  display: inline-block !important;
  min-width: 48px !important;       /* -100 を入れても崩れない目安 */
  width: 48px !important;
  box-sizing: border-box !important;
  padding: 0 2px !important;
}

/* eval_table セルの見た目（ブロック上）*/
.blocklyBlockBackground .eval-table-cell,
#blocklyDiv .eval-table-cell {
  min-width: 48px;
  width: 48px;
  display: inline-block;
  text-align: center;
  box-sizing: border-box;
  padding: 0 2px;
}

/* 評価表示エリアの位置調整・中央寄せ */
#evalMultiDisplay {
  margin-top: 11008px;        /* 表示位置を下げる（値を調整） */
  margin-left: auto;
  margin-right: auto;
  max-width: 980px;
  box-sizing: border-box;
}

/* テーブル・選択を中央に */
#evalMultiDisplay #evalTablesContainer,
#evalMultiDisplay #evalFuncSelect {
  margin-left: auto;
  margin-right: auto;
  display: block;
  text-align: center;
}

/* 各評価テーブルを中央配置 */
#evalMultiDisplay table {
  margin: 8px auto;
}

/* 必要ならボタン列も中央寄せ */
#evalMultiDisplay div.row { text-align: center; }
