@charset "UTF-8";
:root {
  /* Step 1: Tell the browser we support both modes */
  color-scheme: light dark;
  /* Step 2: Define your semantic variables using light-dark() */
  --bg-canvas: light-dark(#eeeeee, #121212);
  --text-main: light-dark(#303030, #f0f0f0);
  /* --accent: light-dark(oklch(60% 0.15 250), oklch(75% 0.14 250)); */
  --card-bg: light-dark(#ffffff, #1f1f1f);
}

body {
  margin: 40px auto;
  max-width: 90vw;
  line-height: 1.6;
  font-size: 32px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  padding: 0 10px;
  transition: background-color 0.3s ease;
  text-align: center;
  /* Smooth transition for the win */
}

h1,
h2,
h3 {
  line-height: 1.2;
}

.clickable {
  cursor: pointer;
}

#card {
  text-align: center;
  display: flex;
  position: relative;
  height: 70vh;
  background: var(--card-bg);
  border-radius: 15px;
  width: 50vw;
  max-height: 800px;
  transition: transform 600ms ease;
  transform-style: preserve-3d;
}

.shadow {
  filter: drop-shadow(5px 5px 3px rgba(0, 0, 0, 0.5));
}

#bottom {
  font-size: 1.5em;
}

.center {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

#han_count {
  font-size: 2em;
}

#fu_count {
  font-size: 2em;
}

@media (min-width: 600px) {
  #win_type::before {
    content: " · ";
  }
  #fu_section::before {
    content: " · ";
    font-size: 2em;
  }
}
@media (max-width: 600px) {
  #top {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  #dealer {
    width: 220px;
    max-width: 80vw;
    border-bottom: var(--text-main) solid 1px;
  }
  #card {
    width: 90vw;
  }
}
#front {
  display: flex;
  flex-direction: column;
  backface-visibility: hidden;
  position: absolute;
}

#back {
  font-size: 2em;
  backface-visibility: hidden;
  transform: rotateY(180deg);
}

#back.center {
  position: absolute;
  transform: rotateY(180deg) translate(50%, -50%);
}

.flip {
  transform: rotateY(180deg);
}

.footer {
  position: fixed;
  width: 90%;
  bottom: 0;
  text-align: right;
}

.fa-github {
  color: gray;
}

.header {
  display: flex;
  top: 0;
  width: 100%;
  flex-direction: column;
  align-items: flex-end;
}

.menu {
  background-color: var(--card-bg);
  border-radius: 5px;
  border: 1px solid var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 1;
  font-size: 0.9em;
}

.option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  gap: 10px;
}

input {
  transform: scale(1.5);
}

#mode {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding-left: 10px;
}

#mode > legend {
  text-align: center;
}

#mode > .option {
  justify-content: flex-start;
  font-size: smaller;
  padding-top: 0px;
  padding-bottom: 0px;
  padding-right: 0px;
  padding-left: 5px;
  align-items: center;
}

.fa-question-circle {
  transform: scale(0.75);
}

.menu[hidden] {
  visibility: hidden;
}
