/*
 * OW (Overwatch) スカッド編成 CSS
 * ベースカラー: #1a1e26 (背景), #00c8ff (ネオン/プライマリ), #ff9900 (ハイライト/ボタン)
 */

/* -------------------------------------------------- */
/* 1. 全体の設定と背景 */
/* -------------------------------------------------- */
body {
  font-family: "Arial", "Segoe UI", sans-serif; /* シャープでモダンなフォント */
  background-color: #1a1e26; /* 暗い背景色 */
  color: #ffffff; /* 基本の文字色 */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
}

/* -------------------------------------------------- */
/* 2. メインコンテナ */
/* -------------------------------------------------- */
.container {
  background-color: #2a2f3a; /* 中央のフォームの背景 */
  padding: 40px;
  border-radius: 6px; /* わずかに丸みを帯びた角 */
  box-shadow: 0 0 40px rgba(0, 200, 255, 0.5), 0 0 10px rgba(0, 200, 255, 0.3); /* 強いネオン光 */
  width: 100%;
  max-width: 450px;
  border: 2px solid #00c8ff; /* メインのネオンボーダー */
}

/* -------------------------------------------------- */
/* 3. タイトルと見出し */
/* -------------------------------------------------- */
h2 {
  color: #00c8ff; /* タイトルのネオンカラー */
  text-align: center;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 3px;
  border-bottom: 2px solid #00c8ff;
  padding-bottom: 15px;
  font-size: 1.8em;
  text-shadow: 0 0 5px rgba(0, 200, 255, 0.8); /* ネオンの文字影 */
}

h3#resultTitle {
  color: #ff9900; /* 結果タイトルのハイライトカラー */
  border-bottom: 1px dashed #ff9900;
  text-shadow: none;
  font-size: 1.2em;
  margin-top: 40px;
}

/* -------------------------------------------------- */
/* 4. フォーム要素 */
/* -------------------------------------------------- */
.input-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #b0c4de; /* ラベルの色 */
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9em;
}

input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #5a6e8c;
  background-color: #1a1e26;
  color: #ffffff;
  border-radius: 3px;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
  font-size: 1em;
}

input[type="text"]:focus {
  border-color: #00c8ff;
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.8);
  background-color: #202530; /* フォーカスで少し明るく */
  outline: none;
}

button {
  width: 100%;
  padding: 15px;
  background-color: #ff9900; /* アクションを促すオレンジ */
  color: #1a1e26;
  border: none;
  border-radius: 4px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 20px;
}

button:hover {
  background-color: #ffaa33;
  box-shadow: 0 0 15px rgba(255, 153, 0, 0.7); /* オレンジ色の光 */
}

button:active {
  transform: translateY(2px);
}

/* -------------------------------------------------- */
/* 5. 結果テーブル */
/* -------------------------------------------------- */
#teamTable {
  margin-top: 20px;
  font-size: 0.95em;
  border: 1px solid #00c8ff; /* テーブル全体のネオンボーダー */
}

#teamTable thead tr {
  background-color: #3a414e;
}

#teamTable th,
#teamTable td {
  padding: 12px;
  border: 1px solid #5a6e8c;
  text-align: center;
}

#teamTable th {
  color: #ff9900; /* ヘッダーの文字色 */
  background-color: #3a414e;
  text-transform: uppercase;
}

/* ロールごとの色分け (JSでクラスを付与することを想定) */
.role-tank {
  color: #f7931e; /* オレンジ */
  font-weight: bold;
}
.role-damage {
  color: #ee4a4a; /* 赤 */
  font-weight: bold;
}
.role-support {
  color: #4ac9ff; /* 水色 */
  font-weight: bold;
}

.result-container {
  width: 95%;
  max-width: 1800px;
  padding: 30px;
}

.player-list {
  display: flex;
  gap: 30px;
  justify-content: center;
  min-height: 350px;
}

.player-card {
  background-color: #2a2f3a;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.4);
  border: 1px solid #00c8ff;
  width: 240px;
  text-align: center;
  transition: transform 0.2s;
}

.player-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 200, 255, 0.6);
}

.player-name {
  color: #ff9900;
  font-size: 1.8em;
  margin: 15px 0;
  font-weight: bold;
  border-bottom: 3px solid #ff9900;
  padding-bottom: 8px;
}

.role-info {
  margin: 25px 0;
}

.role-name {
  font-size: 1.6em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 8px;
}

.hero-info {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 2px dashed #5a6e8c;
}

.hero-name {
  font-size: 1.9em;
  color: #00c8ff;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(0, 200, 255, 0.7);
}

.role-image,
.hero-image {
  width: 90px;
  height: 90px;
  background-color: #4a4f5c;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 4px solid;
  display: block;
}

.role-tank .role-image {
  border-color: #f7931e;
}
.role-damage .role-image {
  border-color: #ee4a4a;
}
.role-support .role-image {
  border-color: #4ac9ff;
}
.hero-image {
  border-radius: 6px;
  border-color: #00c8ff;
}
@media (max-width: 768px) {
  .player-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .player-card {
    display: flex;
    flex-direction: column; /* 上下段 */
    width: 90%;
    max-width: 340px;
    padding: 8px 10px;
    box-sizing: border-box;
    gap: 8px;
    border: 1px solid #00c8ff;
    border-radius: 6px;
  }

  .player-name {
    font-size: 1em;
    font-weight: bold;
    text-align: center;
  }

  .card-bottom {
    display: flex;
    flex-direction: row; /* 横並び */
    width: 100%;
    justify-content: space-between; /* 左右端に配置 */
    gap: 8px;
  }

  .role-container,
  .hero-container {
    width: 48%; /* 横幅を50%弱で確保 */
    display: flex;
    flex-direction: column; /* 画像の下に名前 */
    align-items: center;
  }

  .role-image,
  .hero-image {
    width: 50px;
    height: 50px;
    border-width: 2px;
    margin-bottom: 4px;
  }

  .role-name,
  .hero-name {
    font-size: 0.85em;
    text-align: center;
  }

  .hero-info {
    margin-top: 0;
    padding-top: 25px;
    border-top: 2px dashed #5a6e8c;
  }
}

/* PC版だけ（スマホ以外） */
@media (min-width: 769px) {
  .hero-container {
    margin-top: 20px; /* ヒーロー画像の上に余白を追加 */
  }
}
