* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: #f4f4f4;
  color: #333;
  line-height: 1.6;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

.section {
  width: 100%;
  padding: 20px;
}

.js {
  background-color: #fffacd; /* 淡い黄色 */
}

.java {
  background-color: #add8e6; /* 淡い青色 */
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}

.content {
  margin-bottom: 100%;
  margin-left: 20%;
  margin-right: 20%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  height: 100%;
}

h3 {
  font-size: 1.5em;
  margin-bottom: 10px;
}

p {
  font-size: 1em;
  margin-bottom: 10px;
}

.code-block {
  background-color: #333;
  color: #fff;
  padding: 15px;
  border-radius: 5px;
  font-family: Consolas, "Courier New", monospace;
  overflow-x: auto;
}

/* 追従する縦向きのテキスト */
.sticky-label {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 4em;
  font-weight: bold;
  writing-mode: vertical-rl;
  text-orientation: upright;
  z-index: 1000;
  padding: 10px;
}

.js-label {
  left: 0;
  background-color: #ffd700; /* 濃いめの黄色 */
}

.java-label {
  right: 0;
  background-color: #4682b4; /* 濃いめの青 */
}

.index {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background-color: #afa;
  color: white;
  padding: 25px;
  border-radius: 5px;
  font-size: 1.5em;
}

/* 横並びのデザイン */
@media screen and (min-width: 768px) {
  .container {
      flex-direction: row;
  }
  .section {
      width: 50%;
  }
  .content {
      margin-bottom: 0;
  }
}

/* モバイル表示でsticky-labelを非表示にする */
@media screen and (max-width: 767px) {
  .sticky-label {
      display: none;
  }
  .index {
      display: none;
  }
}
