/* Generals */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  background-color: #fbf6ed;
}

body {
  /* vars */
  --page-background: #fbf6ed;
  --description-text-color: rgb(91, 70, 56);
  --central-box-background: rgba(255, 250, 244, 0.86);
  --central-box-border: rgba(184, 160, 130, 0.18) 1px solid;
  --central-box-shadow: rgba(90, 67, 44, 0.12) 0 10px 30px;
  --double-dot-color: #5b4638;
  --start-button-font-color: whitesmoke;
  --start-button-background: #a4161a;
  --break-text-color: #3b2f2a;
  --input-boxes: #ffffff;
  --time-input-background: white;
  --half-title-1: rgb(59, 47, 42);
  --half-title-2: #cc7730;
  --box-submit-background: rgba(255, 248, 240, 0.7);
  --box-submit-border: rgba(184, 160, 130, 0.2) 1px solid;
  --yt-play-button-background: #5b4638;
  --yt-play-button-border: 1px solid #5b4638;
  --shadowed-setting-box-background: rgba(255, 255, 255, 0.2);
  --shadowed-setting-border-radius: 15px;
  --shadowed-setting-box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  --legal-selections-color: rgba(255, 255, 255, 0.548);
  --legal-selections-color-buttons: #5b4638;
  --legal-selections-color-buttons-hover: #b86b2b;

  /* Font Vars */
  --double-dots-font: "Source Code Pro", monospace;
  --legal-selections-font: "Outfit", sans-serif;
  --preset-time-font: "Outfit", sans-serif;
  --start-button-font: "Special Gothic Expanded One", sans-serif;
  --display-and-input-font: "Noto Sans JP", sans-serif;

  margin: 0;
}

::selection {
  background-color: transparent;
}

.no_select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.no_scroll {
  overflow: hidden;
}

/* Video Background */
#video_background {
  position: fixed;
  right: 0;
  bottom: 0;
  min-width: 100%;
  min-height: 100%;
  z-index: -1;
}

/* Center Limit Box */
#container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  height: 100vh;
  width: 100%;
}

#horizontal_divider_central_items {
  display: flex;
  margin: 0 auto;

  justify-content: center;
  align-items: center;

  height: 15rem;
  width: auto;

  transition: 0.5s;
}

#vertical_box {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* Header */
#header {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  top: 20px;
}

#half_title {
  font-family: "Special Gothic Expanded One", sans-serif;
  color: var(--half-title-1);
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  text-shadow: 2px 2px 3px rgba(54, 54, 54, 0.199);
  line-height: 0;
}

#half_title_2 {
  font-family: "Special Gothic Expanded One", sans-serif;
  font-size: 1.5rem;
  color: var(--half-title-2);
  line-height: 0;
  transition: 0.2s all;
}

#half_title_2:hover {
  color: #ff6f61;
}

#description {
  font-family: "Outfit", sans-serif;
  color: var(--description-text-color);
  font-size: 1rem;
  border-radius: 15px;
  text-align: center;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.03);
}

#main_box {
  position: relative;
  background-color: var(--central-box-background);
  padding: 35px;
  border-radius: 2rem;
  border: var(--central-box-border);
  box-shadow: var(--central-box-shadow);
}

/* Input Boxes */
.time_input {
  background-color: var(--time-input-background);
  height: clamp(80px, 20vh, 150px);
  width: 150px;
  outline: none;
  border: none;
  border-radius: 35px;
  margin-left: 10px;

  font-family: var(--display-and-input-font);
  font-size: max(6rem);
  text-align: center;
  box-shadow: rgb(65, 65, 65) 0px 3px 8px;
  max-height: 12rem;
}

#double_dot {
  font-size: 10vh;
  font-family: var(--double-dots-font);
  color: var(--double-dot-color);
  line-height: 1;
  font-weight: 500;
  font-optical-sizing: auto;
}

/* Submit Button */
#start_button {
  height: 3rem;
  width: 9.5rem;
  background-color: var(--start-button-background);

  font-size: 1.25rem;

  border: 2px rgba(255, 255, 255, 0.2) solid;
  box-shadow:
    4px 4px 6px rgba(0, 0, 0, 0.2),
    0 4px 6px rgba(0, 0, 0, 0.1);

  border-radius: 15px;
  cursor: pointer;

  transition: 0.3s ease;
  font-family: var(--start-button-font);

  color: var(--start-button-font-color);

}

#settings_img {
  height: 2.4rem;
}

#fullscreen_img {
  height: 2.5rem;
}

#start_button:hover {
  box-shadow:
    4px 4px 7px rgba(0, 0, 0, 0.25),
    0 5px 8px rgba(0, 0, 0, 0.15);
}

#start_button:active {
  transform: scale(0.95);
  box-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Countdown System */
#countdown_system {
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: auto;
  display: none;
}
#item_display {
  font-family: var(--display-and-input-font);
  font-size: 5rem;
  font-weight: 500;
  color: white;
  text-shadow: 2px 2px 3px rgba(54, 54, 54, 0.199);
}

#item_display:hover {
  cursor: none;
}

/* Break System */
#break_text {
  color: var(--break-text-color);
  opacity: 0;
  font-family: "Caprasimo", serif;
  color: white;
  font-size: 2rem;
  backdrop-filter: blur(20px);
  border-radius: 15px;
  text-shadow: 1px 1px 2px rgba(94, 93, 93, 0.26);
}

/* Group Submit (Genre,Submit,Fullscreen) */
#group_submit {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

#box_submit {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background-color: var(--box-submit-background);
  border: var(--box-submit-border);

  border-radius: 20px;
  padding: 10px;
}

/* Fullscreen Button */
.button {
  opacity: 1;
  cursor: pointer;
  transition: 0.3s all;
  height: 2rem;
}

.button:hover {
  transform: scale(1.1);
}

/* Preset Box */
#preset_box {
  display: flex;
  height: auto;
  border-radius: 20px;
  background-color: rgba(128, 128, 128, 0.137);

  align-items: center;
  flex-direction: row;
  padding: 5px;
  backdrop-filter: blur(50px);
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  transition: 1s all;
}

#flex_timer_container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5px;
}

.preset_time {
  padding: 10px;
  border-radius: 20px;
  margin-right: 2px;
  cursor: pointer;

  border: none;
  background-color: transparent;

  font-family: var(--preset-time-font);
  font-weight: 700;
  color: white;
  transition: 0.2s all;
}

.preset_time:hover {
  box-shadow: rgba(0, 0, 0, 0.658) 0px 2px 10px;
}

.preset_time:active {
  transform: scale(0.95);
}

/* Legal Links */
#legals_selections {
  display: flex;
  flex-direction: row;
  text-align: center;
  font-size: 0.7rem;
  color: var(--legal-selections-color);
  margin-top: 6px;
  font-family: var(--legal-selections-font);
}

.legal_selections_buttons {
  color: var(--legal-selections-color-buttons);
  font-weight: 600;
  text-decoration: none;
  margin: 0 5px;
  cursor: pointer;
  transition: all 0.2s;
}

.legal_selections_buttons:hover {
  color: var(--legal-selections-color-buttons-hover);
}

#adbox {
  /* Change it to Flex */
  display: none;
  position: absolute;
  bottom: 10px;

  border-radius: 20px;
  /*border: 2px solid rgb(12 12 12 / 0.8);*/
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  /*background-color: rgba(255, 255, 255, 0.2);*/
  overflow: hidden;
  z-index: 1;
}

#adbox_title {
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
  color: black;
  text-align: center;
  margin-bottom: 10px;
}

/* Reset Button */
#reset_timer_button {
  display: none;
  opacity: 0;
  height: 2rem;
  margin: 0 auto;
  transition: all 0.3s;
}

#main_box:hover:not(:has(#item_display:hover)) #reset_timer_button {
  opacity: 1;
}

#reset_timer_button:hover {
  cursor: pointer;
  transform: rotate(90deg);
}

/* Settings Menu */
#settings_menu {
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#settings_area {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

#settings_area h2,h3 {

}

#back_button {
  border-radius: 50px;
  border: grey solid 2px;
  margin-top: 5px;
  padding: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#title_settings_menu {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 2rem;
  line-height: 0;
  color: white;
}

.rows_splitter_setting_box {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.line_divider_setting_box {
  width: 90%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 20px 0;
}

.settings_section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  color: white;
  font-family: "Outfit", sans-serif;
}

.shadowed_setting_grid_box {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  align-items: center;
  padding: 5px;
  gap: 5px;
  width: max-content;

  background-color: var(--shadowed-setting-box-background);
  box-shadow: var(--shadowed-setting-box-shadow);
  border-radius: var(--shadowed-setting-border-radius);
}

.two_options_button {
  display: flex;
  justify-content: center;
  align-items: center;
}

.shadowed_button {
  padding: 10px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.3);
  border: none;
  color: white;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.shadowed_button:hover {
  box-shadow: rgba(53, 53, 53, 0.24) 0px 3px 8px;
}

.shadowed_button:active {
  transform: scale(0.95);
}

section h2,
h3 {
  font-family: "Outfit", sans-serif;
  text-align: center;
  color: white;
}

#yt_url_box {
  height: 25px;
  width: 15rem;
  margin-top: 10px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

#yt_url_input {
  height: 25px;
  width: 15rem;
  background-color: white;
  border: none;
  outline: none;
  border-radius: 10px;
  padding-left: 5px;
  text-align: center;
}

#yt_url_input::selection {
  background-color: rgba(128, 128, 128, 0.575);
}

#yt_url_input::placeholder {
  text-align: center;
}

#yt_play_button {
  transition: all 0.2s;
  height: 100%;
  width: 20%;
  border-radius: 10px;
  background-color: transparent;
  color: white;
  border: var(--yt-play-button-border);
  cursor: pointer;
}

#yt_play_button:hover {
  box-shadow: rgba(53, 53, 53, 0.24) 0px 3px 8px;
}

#yt_play_button:active {
  transform: scale(0.95);
}

/* Articles On Page */
#scroll_to_read {
  position: absolute;

  background-color: #1e1e1e3a;
  border: 2px #2a2a2b solid;
  padding: 5px;
  border-radius: 15px;
  color: white;
  font-family: "Outfit", sans-serif;
  transition: 0.3s all;
  bottom: 10px;
}

#scroll_to_read:hover {
  background-color: #1e1e1e3b;
  border: 2px #1a1a1a solid;
  cursor: pointer;
}

#scroll_to_read:active {
  transform: translateY(10px);
}

#reading_mainbox {
  background-color: rgb(44, 44, 44);
  min-height: 100vh;
  margin-top: 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#reading_section {
  margin-top: 50px;
  margin-bottom: 50px;
  max-width: 800px;
  line-height: 1.8;
  padding: 60px 20px;
  color: #e0e0e0;
  border-radius: 15px;

  background-color: rgba(11, 9, 10, 0.3);
  backdrop-filter: blur(50px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#reading_section h1,
h2,
h3 {
  text-align: center;
  font-family: "Outfit", sans-serif;
  margin-top: 30px;
}
#reading_section p,
strong,
li {
  font-family: "Noto Sans JP", sans-serif;
}

#reading_section li {
  margin-top: 10px;
}
#reading_section ul {
  padding-left: 20px;
}

#reading_section a {
  color: #4a90e2;
  text-decoration: none;
}

/* Conffeti Effect */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: fall linear forwards;
  border-radius: 2px;
  pointer-events: none;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* First Engage Menu */
#first_engage_menu_container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

#engage_menu_main_box {
  height: min(350px,100vh);
  width: min(1000px, 90vw);
  border-radius: 20px;
  background-color: rgba(9, 1, 1, 0.8);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.2);
  z-index: 1000;
  backdrop-filter: blur(100px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  transition: 0.5s all;
  grid-gap: 20px;
}

.title {
  font-family: "Outfit", sans-serif;
  font-size: 2rem;
  color: white;
  text-align: center;
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.engage_menu_box_selections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 20px;
}

.engage_menu_box_option {
  aspect-ratio: 1/1;
  width: 100%;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: 0.3s all;
  cursor: pointer;
}

.engage_menu_box_option:hover {
  transform: scale(1.02);
}

.engage_menu_box_option:active {
  transform: scale(0.95);
}

.engage_menu_text {
  font-family: "Noto Sans JP", sans-serif;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  font-size: 1.2rem;
  color: white;
  text-align: center;
}

.engage_menu_text_description {
  font-family: "Noto Sans JP", sans-serif;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

#engage_menu_footer {
  width: 100%;
}

#engage_menu_skip_button {
  display: flex;
  margin: 10px auto 0;
  align-self: center;
  justify-self: center;
  text-align: center;
  align-items: center;
  justify-content: center;

  height: 2.4rem;
  min-width: 6.5rem;
  padding: 1.25rem;

  border-radius: 20px;
  background: rgba(9, 1, 1, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.92);

  cursor: pointer;
  z-index: 9999;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#engage_menu_skip_button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#engage_menu_skip_button:active {
  transform: translateY(1px) scale(0.97);
}

/* Blurred Screen Effect */
#blur_screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(10px);
  z-index: 1;
}

/* Mobile Support System */
@media only screen and (max-width: 768px) {
  .no_mobile {
    display: none;
    visibility: hidden;
  }

  /* Header */
  #half_title {
    font-size: 7vw;
  }
  #half_title_2 {
    font-size: 5vw;
  }
  #description {
    width: 90vw;
    font-size: 3.5vw;
  }

  /* Main Components */
  #main_box {
    padding: 3vw;
  }

  #horizontal_divider_central_items {
    height: auto;
  }

  #group_submit {
    margin-top: 1rem;
  }

  #start_button {
    height: 2.7rem;
    width: 7rem;
    font-size: max(17px, 2.5vw);
  }

  .time_input {
    width: 16vw;
    height: 17vw;
    border-radius: 5vw;
    font-size: 12vw;
    margin-left: 5px;
  }

  #double_dot {
    font-size: 18vw;
  }

  #item_display {
    font-size: 12vw;
  }

  #reset_timer_button {
    opacity: 1;
  }

  #settings_area {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .line_divider_setting_box {
    display: none;
  }

  #engage_menu_main_box {
    width: 90vw;
    height: 70vh;
    grid-template-columns: 1fr;
    grid-gap: 0;
  }

  #adbox {
    height: 20%;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  #header {
    display: none;
    visibility: collapse;
  }

  body {
    overflow: hidden;
  }

  #main_box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 10px;
    margin: 0;
  }

  .time_input {
    width: 10vw;
    height: 10vw;
    font-size: 5vw;
    margin-left: 5px;
  }

  #flex_timer_container {
    display: none;
  }

  #settings_area {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  #settings_area h2,h3 {
    font-size: 1.5rem;
    line-height: 0;
  }

  #legals_selections {
    margin-top: 2px;
    margin-bottom: 10px;
  }
}
