/* 全体のスタイル */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  text-align: center;
  background-color: #f9f9f9;
}

/* コンテンツ全体のラッパー */
.wrapper {
  padding: 15px; /* フッター以外に適用される余白 */
}

h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

p {
  margin-bottom: 20px;
}

/* コンバータ全体のスタイル */
.converter {
  width: 90%;
  margin: 20px auto;
  max-width: 1200px;
  display: flex;
  flex-direction: column; /* デフォルトは縦並び */
  gap: 10px;
}

/* ラベル */
label {
  font-weight: bold;
  margin-bottom: 5px;
  display: block;
}

/* テキストエリア */
textarea {
  width: 100%;
  margin: 7px auto;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  height: 100px; /* デフォルト高さ */
  max-width: 700px;
}

/* ボタン全体 */
button {
  padding: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background-color: #007bff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin: 7px auto;
  display: block;
  max-width: 700px;
}

/* 変換するボタン */
#convertButton {
  width: 100%; /* 横幅100%に設定 */
  max-width: 700px; /* 最大幅を700pxに制限 */
}

button:hover {
  background-color: #0056b3;
}

/* ボタン行 (大文字・小文字) */
.button-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.button-row button {
  flex: 1;
}

/* 三角形共通 */
.triangle {
  width: 0;
  height: 0;
  margin: 10px auto;
  display: none; /* 初期状態は非表示 */
}

/* 左向きの三角形 (PC用) */
.triangle-left {
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 15px solid #cfcfcf;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* 下向きの三角形 (スマホ用) */
.triangle-down {
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 15px solid #cfcfcf;
}

/* PC用レイアウト */
@media (min-width: 768px) {
  .converter {
    flex-direction: row; /* 横並びに変更 */
    justify-content: space-between;
    align-items: center; /* 縦方向中央揃え */
    position: relative;
  }

  .left, .right {
    width: 48%; /* 左右エリアを半分ずつ */
  }

  /* PC用三角形を表示 */
  .triangle-left {
    display: block;
  }

  /* PC表示でのテキストエリアの高さ */
  #inputText {
    height: 300px; /* 変換したい文章のテキストエリア */
  }

  #outputText {
    height: 350px; /* 結果のテキストエリア */
  }
}

/* スマホ用レイアウト */
@media (max-width: 767px) {
  .triangle-down {
    display: block; /* スマホ用三角形を表示 */
  }
}
