body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
  position: fixed;
  top: 0px;
  right: 0;
  width: 100%;
  height: 58px;
  z-index: 800;
}

.logo {
  margin-left: 8px;
}
.logo a {
  text-decoration: none;
  color: #fff;
}

.logo-img {
  height: 65px;
  position: relative;
  top: 12px;
}

.menu {
  display: flex;
}

.hamburger {
  padding: 12px;
  margin-right: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  z-index: 1000; /* ハンバーガーメニューがナビメニューの上に表示されるようにする */
}

.hamburger .line {
  width: 100%;
  height: 3px;
  background-color: #333;
  transition: all 0.3s;
}

.header-link {
  display: none;
  padding: 12px;
  margin-right: 4px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 4px;
  background-color: #ff4444;
  border: none;
  cursor: pointer;
}
.non-decoration {
  text-decoration: none;
  color: #fff;
}
@media (max-width: 600px) {
  .non-decoration {
    font-size: 12px;
  }
}
@media (max-width: 600px) {
  .header-link,
  .hamburger {
    padding: 6px;
  }
}

.nav-menu {
  position: absolute;
  top: -30px;
  right: -482px;
  width: 400px;
  max-width: calc(100vw - 48px);
  height: 94vh; /* ナビメニューが全画面の高さになるようにする */
  padding: 58px 24px;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: right 0.3s ease-in-out;
  z-index: 999; /* ナビメニューがハンバーガーメニューの下に表示されるようにする */
  backdrop-filter: blur(5px);
  overflow-x: scroll;
}
.nav-menu.open {
  right: 0;
}
.nav-menu ul {
  display: flex;
  flex-direction: column;
  row-gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 60px;
  width: 100%;
}
.nav-menu ul li {
  display: flex;
  width: 100%;
  text-align: center;
  &.indent {
    margin-left: 12px;
  }
  img {
    width: 12px;
    margin-left: 8px;
    margin-bottom: 2px;
  }
}
.nav-menu ul li a {
  display: block;
  padding: 12px;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s;
  &.disabled {
    pointer-events: none;
    color: #ccc;
  }
}
.nav-menu ul li a:hover {
  background-color: #444;
  opacity: 0.5;
}
.separate-text {
  padding-top: 14px;
  color: #ccc;
  border-top: solid 1px rgba(255, 255, 255, 0.5);
  .top-icon {
    width: 20px;
    margin: 0 4px 0 0;
  }
}
.spacer {
  height: 12px;
}
.hamburger.open .line1 {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.open .line2 {
  opacity: 0;
}

.hamburger.open .line3 {
  transform: rotate(-45deg) translate(6px, -6px);
}

.emphasis {
  color: #ff4444;
  font-weight: bold;
}

.flex-layout {
  display: flex;
  flex-wrap: wrap; /* 要素がはみ出す場合は折り返す */
  gap: 20px; /* 要素間の間隔を設定 */
  padding: 20px;
}

.flex-layout section {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  flex: 1 1 calc(50% - 20px); /* 2つ並べるように計算して設定 */
  box-sizing: border-box; /* paddingとborderを含めてサイズを計算 */
}

.flex-layout h2 {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.flex-layout h2 img {
  max-width: min(300px, 100%);
  flex-shrink: 0; /* 画像が被らないようにする */
}

.flex-layout p {
  margin: 10px 0;
}

/* 画面が小さいときに縦一列にするメディアクエリ */
@media (max-width: 600px) {
  .flex-layout section {
    flex: 1 1 100%; /* 縦一列にする */
    max-width: 100%;
  }
  .flex-layout h2 img {
    max-width: min(200px, 50%);
    flex-shrink: 0; /* 画像が被らないようにする */
  }
}

h2 {
  font-size: 150px;
  color: #ff4444;
  margin: 0;
}

p {
  font-size: 16px;
  line-height: 1.5;
}

@media (max-width: 480px) {
}

.sponsor-title {
  margin: 20px;
}
.sponsor {
  width: 100px;
  text-align: center;
  &.kenko {
    width: 150px;
  }
  img {
    border-radius: 4px;
  }
}
.sponsor-text {
  font-size: 12px;
}

/* footer */
footer {
  width: 100%;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 10px 0;
  z-index: 1000; /* フッターを他の要素より前面に表示 */
  p {
    margin: 0;
  }
}

/* about */

.main-wrapper {
  padding: 20px;
  min-height: calc(100vh - 84px);

  p {
    margin: 0;
    font-size: 14px;
  }
}
#mainContents {
  width: 100%;
  display: grid;
  row-gap: 18px;
}
.about-section-wrapper {
  display: grid;
  row-gap: 8px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;

  a {
    color: #ff4444;
  }
}
.about-top-image {
  width: 100%;
  margin-top: 48px;
  display: flex;
  justify-content: center;
  img {
    max-width: 700px;
    width: 100%;
  }
}
.section-inner-wrapper {
  display: flex;
  flex-direction: column;
  row-gap: 8px;
  p {
    font-size: 12px;
  }
}
.about-content,
.teams-content {
  margin-bottom: 4px;
  position: relative;
  border-bottom: 1px solid rgba(34, 34, 34, 0.1);
  padding-bottom: 20px;
}
.content-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  &::after {
    width: 80px;
    content: "";
    height: 3px;
    background: #ff4444;
    position: absolute;
    left: 0;
    bottom: -1px;
    text-decoration: inherit;
    vertical-align: inherit;
  }
}
.accent-text {
  line-height: 1;
  font-size: 12px;
  font-weight: 600;
}
.accent-point {
  color: #ff4444;
}
.normal-text {
  font-size: 14px;
}
p.sub-title {
  font-size: 16px;
  font-weight: 600;
  margin-top: 20px;
}
.inner-section {
  display: flex;
  flex-direction: column;
  row-gap: 4px;
}
.fire-annotation {
  display: flex;
  align-items: center;
  &::before {
    content: url(img/fire.svg);
  }
}
.circle-annotation {
  display: flex;
  &::before {
    display: block;
    content: "●";
    color: #ff4444;
    margin-right: 2px;
  }
}
p.annotation {
  display: flex;
  font-size: 12px;
  &::before {
    content: "※";
    color: #ff4444;
  }
}

.original-annotation {
  display: flex;
  font-size: 14px;
  color: #223a70;
}
.annotation-head {
  margin-right: 2px;
}
.navy-blue {
  color: #223a70;
}
.gray-text {
  color: #444;
}
p.sub-text {
  font-size: 12px;
  margin-left: 20px;
}

/* teams */

.teams-section-wrapper {
  display: grid;
  row-gap: 8px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-top: 20px;
}

.team-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 10px;
}
.team-content {
  display: flex;
  align-items: center;
  cursor: pointer;
  min-width: 200px;
  width: max-content;
  height: 90px;

  a {
    text-decoration: none;
    display: flex;
    align-items: center;
    cursor: pointer;
  }
  p {
    position: relative;
    padding-bottom: 4px;
    color: #666;
    border-bottom: 1px solid rgba(34, 34, 34, 0.1);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    &::after {
      width: 40%;
      content: "";
      height: 3px;
      background: #999;
      position: absolute;
      left: 0;
      bottom: -1px;
      text-decoration: inherit;
      vertical-align: inherit;
    }
  }

  img {
    margin-right: 10px;
  }
  transition: opacity 0.4s ease;
  &:hover {
    opacity: 0.5;
  }
}

/* system */
.indent {
  margin-left: 12px;
}

/* ranking */
#ranking-main-contents {
  .title-font {
    font-family: "Bebas Neue", sans-serif;
    font-size: 46px;
  }
  h2 {
    font-size: 20px;
    display: flex;
    column-gap: 10px;
    justify-content: center;
    align-items: center;
  }
  table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
  }
  td {
    border: 1px solid #fff;
    padding: 8px;
    text-align: center;
  }
  th {
    background-color: #f4f4f4;
  }
  tbody tr:nth-child(even) {
    background-color: #f9f9f9;
  }
}
#ranking-table {
  display: none;
  width: calc(100vw - 40px);

  thead {
    position: sticky;
    top: 80px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    th {
      background-color: #ff4444;
      border: 1px solid #fff;
      border-bottom: 1px solid #fff;
      color: #eee;
    }
  }
  td {
    /* min-width: 30px; */
  }
}
@media (max-width: 600px) {
  #ranking-main-contents {
    font-size: 12px;
    h2 {
      font-size: 14px;
    }
  }
}

/* ダークモード時のスタイル */
@media (prefers-color-scheme: dark) {
  body,
  .main-wrapper .about-section-wrapper,
  .flex-layout section {
    background-color: #fafafa;
  }
  #ranking-table thead th {
    border: 1px solid #eee;
    border-bottom: 1px solid #fff;
  }
}

.loading-gif {
  width: 100%;
}
