/* ベース設定 */
html {
  font-size: 16px;
  font-family: "Helvetica Neue",
  Arial,
  "Hiragino Kaku Gothic ProN",
  "Hiragino Sans",
  Meiryo,
  sans-serif;
}

main {
  margin-top: 60px;
}

.container {
  max-width: 800px;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  line-height: 1.8;
}

body,
p,
ul,
li,
div,
h1, h2, h3 {
  margin: 0;
  padding: 0;
}

body {
  max-width: 800px;
  margin: 0 auto;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

a {
  text-decoration: none;
}

/* ナビゲーションバー */
.l-header {
  display: block;
  z-index: 999;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  background: orange;
}

.c-hamburger {
  position: relative;
  width: inherit;
  height: inherit;
  margin: 0;
  border: transparent;
  background-color: transparent;
  cursor: pointer;
}

.c-hamburger span {
  display: block;
  position: relative;
  left: 50%;
  width: 24px;
  height: 2px;
  transform: translateX(-50%);
  background: white;
  transition: all 0.4s;
}

.c-hamburger span:nth-of-type(1) {
  top: -4px;
}

.c-hamburger span:nth-of-type(2) {
  top: 1px;

  transform: translateX(-0.45deg);
}

.c-hamburger span:nth-of-type(3) {
  top: 6px;
  transform: translateX(-0.45deg);
}

.c-hamburger.is-active span:nth-of-type(1) {
  top: 0;
  transform: translateX(-50%) rotate(225deg);
}

.c-hamburger.is-active span:nth-of-type(2) {
  opacity: 0;
}

.c-hamburger.is-active span:nth-of-type(3) {
  top: -4px;
  transform: translateX(-50%) rotate(-225deg);
}

.p-header__nav {
  display: flex;
  z-index: 10;
  position: absolute;
  top: 0;
  right: -100%;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  background: transparent;
  opacity: 0;
  transition: right 0.6s, opacity 0.6s;
}

.p-header__title{
  color: #fff;
}

.p-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 20px;
}

.p-header__logo img {
  display: block;
  width: 220px;
  height: auto;
}

.p-header__hamburger {
  z-index: 100;
  position: absolute;
  top: 0;
  right: 0;
  width: 95px;
  height: 100%;
}

.p-header__nav.is-active {
  position: fixed;
  top: 60px;
  right: 0;
  opacity: 1;
  background-color: orange;
  font-weight: bold;
  align-items: flex-start;
  padding: 20px 0px;
  height: auto;
}

.p-nav__list {
  display: block;
  padding-right: 20px;
  padding-left: 20px;
}

.p-nav__item {
  display: inline-block;
  position: relative;
  width: 100%;
}

.p-nav__link {
  color: #fff;
  display: block;
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
}

.p-nav__item.p-nav__item--acMenu>.p-nav__link {
  position: relative;
}

.p-nav__item.p-nav__item--acMenu>.p-nav__link::after {
  position: absolute;
  content: "▼";
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.p-nav__middle {
  display: none;
}

.p-nav__middleItem a::before {
  margin-right: 8px;
  margin-left: 8px;
  content: "-";
}

.p-nav__item.is-open .p-nav__middle {
  display: block;
}

@media screen and (min-width: 1000px) {

  .p-header__hamburger {
    display: none;
  }

  .p-header__nav {
    position: static;
    opacity: 1;
    height: inherit;
    width: 100%;
    max-width: fit-content;
  }

  .p-nav__list {
    padding-right: 0;
    padding-left: 0;
    display: flex;
    flex-direction: row;
  }

  .p-nav__item ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 130px;
    margin: 0;
    padding: 0;
  }

  .p-nav__item ul li {
    width: 100%;
    height: 0;
    overflow: hidden;
    transition: all 0.1s;
  }

  .p-nav__item ul li a {
    display: flex;
    align-items: center;
    padding: 13px 20px 13px 10px;
    color: #fff;
  }

  .p-nav__item:hover>ul>li {
    height: 48px;
    overflow: visible;
    background-color: rgb(242, 195, 107);
  }

  .p-nav__item:hover>ul>li:not(:first-child) {
    border-top: 1px solid #fff;
  }

  .p-nav__item:hover>ul>li.p-nav__middleItem:hover {
    background-color: #fff;
  }

  .p-nav__item:hover>ul>li.p-nav__middleItem:hover a {
    color: orange;
  }

  .p-nav__middle {
    display: block;
    text-align: left;
  }

  .p-nav__middleItem {
    position: relative;
  }

  .p-nav__middleItem a {
    position: relative;
    white-space: nowrap;
  }

}

body {
  padding: 1.25rem;
  background-color: #f7f7f7;
  line-height: 1.6;
}

h1 {
  color: #333;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.recent-results {
  margin: 1rem auto;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.prediction-form {
  margin-bottom: 1.5rem;
  background: #fff;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* 横並び用 */
.prediction-form .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.prediction-form label {
  font-weight: bold;
}

.prediction-form select {
  padding: 0.4rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.prediction-form select:focus {
  outline: 2px solid #0073e6;
  background-color: #eef6ff;
}

.note {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
}

/* ページネーションボタン */
.pagination {
  margin-bottom: 1.5em;
  text-align: center;
}

.pagination a {
  text-decoration: none;
}

.pagination a button,
.recent-results button {
  margin: 0.2rem;
  width: 180px;
  height: 45px;
  border: none;
  background-color: #eee;
  color: #333;
  border-radius: 0.3rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}

.pagination a button:hover,
.recent-results button:hover {
  background-color: #ddd;
}

.pagination a button.active,
.recent-results button.active {
  background-color: orange;
  color: white;
  font-weight: bold;
}

.number-filter {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
}

.number-filter button {
  width: 60px;
  height: 35px;
}

/* 結果テーブル */
.result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
}

.result-table th,
.result-table td {
  border: 1px solid #ccc;
  padding: 0.5em;
  text-align: center;
}

.result-table thead {
  background-color: #f7f7f7;
}

.result-table tr:nth-child(even) {
  background-color: #fafafa;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.3rem;
  border-radius: 0.25rem;
  border: 1px solid #ccc;
  font-size: 1rem;
}

/* ボタン横並び用 */
.button-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.button-row button {
  padding: 0.6rem 1.25rem;
  border: none;
  background-color: orange;
  color: white;
  border-radius: 0.3rem;
  cursor: pointer;
  font-size: 1rem;
}

.button-row button:hover {
  background-color: orangered;
}

/* リセットボタンの個別スタイル（色分け） */
.button-row .reset-button {
  background-color: #888;
}

.button-row .reset-button:hover {
  background-color: #666;
}

.hot {
  color: red !important;
  border-color: red !important;
}

.cold {
  color: blue !important;
  border-color: blue !important;
}

/* 数字の丸囲みスタイル */
.circle-number, .circle-bonus {
  display: inline-block;
  width: 2em;
  height: 2em;
  line-height: 2em;
  text-align: center;
  border-radius: 50%;
  border: 1px solid #333;
  background-color: #fff;
  font-weight: bold;
  color: #333;
  margin-right: 0.3em;
}

/* ボーナス番号を別カラーに */
.circle-bonus {
  background-color: #ffeb3b;
  border-color: #fbc02d;
}

/* ===== モバイル対応: 画面幅が600px以下のときに調整 ===== */
@media screen and (max-width: 600px) {
  .result-table th, .result-table td {
    font-size: 0.9rem;
    padding: 0.3rem;
  }

  .pagination a button {
    width: 160px;
    height: 40px;
  }

}

/* ===== モバイル対応: 画面幅が480px以下のときに調整 ===== */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  body {
    padding: 0.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  label,
  input,
  select,
  button {
    font-size: 1rem;
  }

  .pagination a button {
    width: 150px;
    height: 40px;
  }

  .prediction-form {
    padding: 0.75rem;
  }

  .prediction-form .form-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .prediction-form select {
    width: 100%;
  }

  .button-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .button-row button {
    width: 100%;
  }
}

/* FAQのデザイン */
.faq-container details {
  background: #ffffff;
  border: 1px solid #e2e3e4;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 0.5ex;
}

.faq-container summary {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  background: gray;
  position: relative;
  list-style: none;
}

.faq-container summary::-webkit-details-marker {
  display: none;
}

.faq-container .question-label {
  display: inline-block;
  color: white;
  margin-right: 12px;
  text-align: center;
  line-height: 25px;
  font-size: 20px;
  font-weight: bold;
}

.faq-container .question-text {
  color: #ffffff;
  font-weight: bold;
  padding-right: 10%;
}

.faq-container .plus-icon {
  margin-right: 10px;
  color: white;
  position: absolute;
  left: 90%;
  font-size: 25px;
}

.faq-container .answer-content {
  padding: 10px 15px;
}

.faq-container .answer-content p {
  margin-bottom: 0;
}

.faq-container .answer-label {
  color: #ff8d8d;
  font-size: 20px;
  font-weight: bold;
  margin-right: 12px;
}