@charset "UTF-8";
/***************************** ぜんたい ***************************/
.bar{
  display: flex;
   align-items: center;   /* ← 縦の位置を中央揃え */
}
.block.bar{
  height:10%;
}
@media screen and (max-width: 768px){
.block.bar{
  height:5px;
}
h2{
  font-size: 20px;
}

button{
  height:auto;
}
}
@media screen and (max-width: 480px){
h3{
    margin-block-start: 10px;
  font-size: 18px;
}
}
body {
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  font-size: 15px;
  height: 100vh;
  caret-color: transparent; /* ページ全体でキャレット(縦棒)を非表示 */
  user-select: none;        /* 文字の選択を禁止 */
}
/***************************** ヘッダー関連 ***************************/
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #3b82f6; /* 青系 */
  color: white;
  padding: 10px 20px;
  border-bottom: 3px solid #2563eb;
}

.app-header h1 {
  margin: 0;
  font-size: 18px;
}

.header-right button {
  margin-left: 10px;
  padding: 5px 10px;
  background: white;
  color: #3b82f6;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.header-right button:hover {
  background: #e0e7ff;
}

#header-items{
  display: flex;
}
@media screen and (max-width: 768px){
  .inputter{
    width: 160px;
}
.buttons{
  width: 80px;
}

.header-right button {
  height: 24px;
  margin-left: 10px;
  margin-top: 4px;
  width:80px;
  background: white;
  color: #3b82f6;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.app-header input{
  margin-top: 4px;
}
}
/***************************** block要素の制御 ***************************/
.blocks {
    height: 50vh;           /* 画面高さの半分 */
    width: 100%;
    display: flex;          /* 横並び */
    gap: 16px;
    padding: 10px;
    box-sizing: border-box;
  }
    .block {
    flex: 1;                /* 横幅均等 */
    display: flex;          /* 縦方向に並べる */
    flex-direction: column;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    box-sizing: border-box;
    background-color: #fdfdfd;
    width: 50%;
  }
@media screen and (max-width: 768px){
  .blocks {
    height: 80vh;           /* 画面高さの半分 */
    width: 100%;
    gap: 16px;
    padding: 10px;
    box-sizing: border-box;
    flex-wrap: wrap;
  }

  .block {
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    box-sizing: border-box;
    background-color: #fdfdfd;
    min-width: 100%;
    height: 47%;
  }

}

  .block-text{
    height : 25px;
    width:150px;
  }
  @media screen and (max-width: 768px){
  .block-text{
    margin: auto;
  }
  #openPopupBtn{
    margin-left: 0%;
    padding-top: 0%;
  }
  }
.role-filter{
    font-size: 30px;
    height : 100px;
    margin-left: 30px;
}
#test{
  width: 40%;
  height: 50%;
}
/***************************** チーム欄のデザイン ***************************/
.teams { 
  flex:1;
  width :100%;
  gap: 20px;                  /* チーム同士の間隔 */
  justify-content: space-around;
  flex-wrap: wrap;        /* 画面が狭いときは折り返す（2列になる） */

}

.team-text{
  height:10%;
}
@media screen and (max-width: 768px){
.team-text{
  height:10%;
  width:90px;
}
}
@media screen and (max-width: 480px){
.team-text{
  height:10%;
  width:50px;
}
}
.team-container {
  height: 40%;
  width :100%;
  
}
@media screen and (max-width: 768px){
.team-container {
  height: 50%;
  display: flex;
  align-items:center;     /* 縦方向中央 */
}
}

.team-slot {
  font-size: 0; 
  border: 2px dashed #aaa;
  margin: 0 auto;
  position: relative;
  width : 100%;
  height:85% ;
  max-height: 110px;
  overflow: hidden;
   display: block;
  background-color: #f9f9f9;
  box-sizing: border-box;
}

@media screen and (max-width: 768px){
  .team-slot {
    margin-left: 20px;
  border: 2px dashed #aaa;
  width : 70%;
  height:100% ;
  max-height: 80%;
  display: block;
  /*flex-wrap: wrap;            /* 入れたポケモンが折り返す */
  background-color: #f9f9f9;
  box-sizing: border-box; /* ← これ追加！ */
}
}
@media screen and (max-width: 480px){
  .team-slot{
    border: 0px dashed #aaa;
    margin-left: 0%;
    width:90%;
  }
}

.box__line {
  position: absolute;
}

/* 選択中スロットの線だけにアニメーション */
.team-slot.selected .box__line {
  position: absolute;
}

.team-slot.selected .box__line:nth-child(1),
.team-slot.selected .box__line:nth-child(3) {
  width: 100%;
  height: 4px;
}

.team-slot.selected .box__line:nth-child(2),
.team-slot.selected .box__line:nth-child(4) {
  width: 4px;
  height: 100%;
}

.team-slot.selected .box__line:nth-child(1) {
  top: 0;
  left: 0;
  background: linear-gradient(to right, transparent, rgb(0, 132, 255));
  animation: animate1 2s linear infinite;
}

.team-slot.selected .box__line:nth-child(2) {
  top: 0;
  right: 0;
  background: linear-gradient(to bottom, transparent, rgb(0, 132, 255));
  animation: animate2 2s linear infinite;
  animation-delay: 1s;
}

.team-slot.selected .box__line:nth-child(3) {
  bottom: 0;
  left: 0;
  background: linear-gradient(to left, transparent, rgb(0, 132, 255));
  animation: animate3 2s linear infinite;
}

.team-slot.selected .box__line:nth-child(4) {
  top: 0;
  left: 0;
  background: linear-gradient(to top, transparent, rgb(0, 132, 255));
  animation: animate4 2s linear infinite;
  animation-delay: 1s;
}

@keyframes animate1 {

  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes animate2 {

  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }

}

@keyframes animate3 {


  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }

}

@keyframes animate4 {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(-100%);
  }
}

.team-slot img {
      /* 枠に合わせる最大幅 */
     /* 枠に合わせる最大高さ */
  width: 19.3%;        /* アスペクト比維持 */
  height: 100%;
  max-height: 100%;
  cursor: grab; 
  object-fit: contain; /* 枠の中に収まるように */
  position: relative;
  padding: 0px;
}
#ally-pokemon{
  background-color:  rgba(157, 0, 255, 0.1);
}
#ally-pokemon_send{
  background-color:  rgba(157, 0, 255, 0.1);
}


#enemy{
  margin-top: 30px;
}
@media screen and (max-width: 768px){
#enemy{
  margin-top: 0px;
}
}
#enemy-pokemon{
  background-color:rgba(255, 81, 0, 0.1); ;
}
#enemy-pokemon_send{
  background-color:rgba(255, 81, 0, 0.1); ;
}

@media screen and (max-width: 480px){
  .result-text{
  width:40px;
}
}

/***************************** ポケモンの選択欄のデザイン ***************************/

.pokemon {
  width: 80px;   /* 横幅を80pxに縮小 */
  height: auto;  /* アスペクト比を維持して縦を自動調整 */
  margin: 5px;   /* 画像の間に余白を追加 */
  cursor: grab;  /* ドラッグできる感じのカーソル */
  outline: none;         /* ← クリック時の青い枠を消す */
}

@media screen and (max-width: 480px){
.pokemon {
  margin: 0px;   /* 画像の間に余白を追加 */
}
}

#pokemon-list {
  display: flex;
  flex: 1;   
  flex-wrap: wrap;  /* 折り返しあり */
  gap: 10px;        /* 画像同士の隙間 */
  
  overflow-y: auto;    /* 縦スクロールを有効化 */
  border: 1px solid #ccc; /* 枠線（必要なら） */
  padding: 5px;
}

#pokemon-list img {
  width: 22%;
  height: 30%;
  min-width: 80px;
  min-height: 100px;
  object-fit: contain;
  cursor: grab;
  border-radius: 6px;
  transition: transform 0.2s;
}
@media screen and (max-width: 480px){
#pokemon-list img {
  min-width: 70px;
}
}

#pokemon-list img:hover {
  transform: scale(1.1);
}
.pokemon:focus {
  outline: none;         /* 念のためフォーカス時も消す */
}

/***************************** 検索結果***************************/
#results-features {
  max-height: 300px;   /* 表示する高さを制限（ここは好みで調整してね） */
  overflow-y: auto;    /* 縦方向にスクロール可能 */
  padding-right: 8px;  /* スクロールバーが出ても文字が隠れないよう余白 */
}
/* 1試合分のカード */
.match-result {
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 12px;
  margin: 16px 0;
  background: #f9f9f9;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);

  /* ここで縦幅を固定してスクロール */
  max-height: 200px;   /* 好きな高さに調整してね */
  overflow-y: auto;
}

/* 見出し部分の文字 */
.match-result p {
  margin: 4px 0;
  font-size: 14px;
}

/* チームを横並びにする */
.team {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
}

/* 味方チームは青っぽい背景 */
.team.ally {
  background: rgba(157, 0, 255, 0.1);
  border: 1px solid #9410f2;
}

/* 敵チームは赤っぽい背景 */
.team.enemy {
  background: rgba(255, 81, 0, 0.1);
  border: 1px solid #ff752f;
}

/* キャラ画像 */
.team-member {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
  transition: transform 0.2s;
}

/* ホバーでちょっと大きく */
.team-member:hover {
  transform: scale(1.1);
  border-color: #666;
}
#closeBtn{
  display: none;
}
  /* ポップアップ全体のスタイル */
#popup {
  display: none; /* 最初は非表示 */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 680px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  padding: 20px;
  overflow: hidden; /* 全体はスクロールしない */
  z-index: 3;
}
@media screen and (max-width: 768px){
#popup {
  width: 80%;
}}

#popupContent h3{
  width:90px;
}
@media screen and (max-width: 480px){
#popup{
  width:90%;
  padding: 2%;
}
#popupContent{
  width:100%;
}
#popupContent h3{
  width:50px;
}
}
#features-container {
  max-height: 300px; /* Featuresだけスクロール */
  overflow-y: auto;
  margin-top: 10px;
  border-top: 1px solid #ccc;
  padding-top: 10px;
}

#win_lose{
font-size: 20px;
}

.big-select {
  text-align: center;
  text-align-last: center;
  width: 160px;
  padding: 10px 14px;
  font-size: 16px;
  font-weight: bold;
  color: #0277bd;

  background-color: #e0f7fa;
  border: 2px solid #4fc3f7;
  border-radius: 8px;

  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;

  /* ▼ を自作 */
  background-image: url("data:image/svg+xml;utf8,<svg fill='%230277bd' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* ホバー時 */
.big-select:hover {
  background-color: #b3e5fc;
  border-color: #0288d1;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* フォーカス時 */
.big-select:focus {
  outline: none;
  border-color: #03a9f4;
  box-shadow: 0 0 6px #4fc3f7;
}

    /* 戦績の統計ポップアップ */
  .tooltip {
  position: absolute;
  background: #333;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  display: none;
  white-space: pre-line; /* 改行表示 */
  z-index: 1000;
}

/***************************** ボタンデザイン***************************/
#openPopupBtn{
  
  background: linear-gradient(135deg, #105cff, #2980b9);
  color: white;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  letter-spacing: 1px;
}
#submit-btn{
  margin-left: 100px;
  background: linear-gradient(135deg, #105cff, #2980b9);
  color: white;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  letter-spacing: 1px;
}
@media screen and (max-width: 480px){
#submit-btn{
  margin-left: 20px;
  padding:12px 15px;
}
}
button:hover {
  background: linear-gradient(135deg, #89f7fe, #4facfe);
  transform: translateY(-3px) scale(1.07);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

button:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

@media screen and (max-width: 480px){
#openPopupBtn{
  margin-left: 20px;
  margin-top: 0;
  content: "結果を登録";
  background: linear-gradient(135deg, #105cff, #2980b9);
  color: white;
  font-size: 15px;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  padding: 6px 24px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  letter-spacing: 1px;
}


button:hover {
  background: linear-gradient(135deg, #89f7fe, #4facfe);
  transform: translateY(-3px) scale(1.07);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

button:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}
}
input, textarea {
  caret-color: auto; /* 入力欄では普通に表示 */
}
input{
  font-size: 16px; /* ← これが一番重要 */
}