* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --theme-primary: #198754;
  --theme-hover: #157347;
  --theme-active: #146c43;
}

html {
  touch-action: manipulation;
}

body {
  width: 100%;
  height: 100vh;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

.btn-common {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  display: block;
  width: 90%;
  min-height: 50px;
  color: #fff;
  border: 2px solid var(--theme-primary);
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  border-radius: 5px;
  font-size: 1.3em;
  box-shadow: 1px 1px 2px #ccc;
  margin: 0 auto;
  padding: 8px 16px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
@media (hover: hover) {
  .btn-common:hover {
    background-color: var(--theme-hover);
    border-color: var(--theme-hover);
  }
}
.btn-common:focus {
  background-color: var(--theme-hover);
  border-color: var(--theme-hover);
}
.btn-common:active {
  background-color: var(--theme-active);
  border-color: var(--theme-active);
}
.btn-common:disabled {
  opacity: 0.65;
  pointer-events: none;
}

.wrap {
  width: 100%;
  height: 100%;
  overflow: auto;
  font-size: 16px;
  text-align: center;
  background-color: #fffffe;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 96%;
  max-width: 640px;
  height: 94%;
  overflow: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.startArea {
  width: 100%;
}
.startArea.hide {
  display: none;
}
.startArea .btn-common {
  width: 70%;
  min-height: 70px;
  font-size: 1.6em;
}

h1 {
  margin-bottom: 40px;
  font-weight: 400;
  font-size: 2em;
}

.gameDisplay {
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gameDisplay.hide {
  display: none;
}

.gameTitle {
  font-size: 1.6em;
  margin-bottom: 40px;
}

.preCountDisplay {
  font-size: 3em;
  width: 240px;
  height: 240px;
  border: 2px solid #05401f;
  border-radius: 50%;
  margin: 0 auto 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.preCountDisplay.hide {
  display: none;
}

.click-btn {
  width: 240px;
  height: 240px;
  font-size: 3em;
  margin: 0 auto 60px;
  border-radius: 50%;
  background-color: #0c964a;
  box-shadow: 1px 10px #05401f;
  display: flex;
  justify-content: center;
  align-items: center;
}
.click-btn.hide {
  display: none;
}
.click-btn:hover {
  opacity: 0.9;
}
.click-btn:active {
  box-shadow: 1px 5px #021d0e;
  position: relative;
  top: 5px;
}
.click-btn.clicked {
  animation: pulse 0.1s ease-in-out;
}

.scoreAndTime {
  width: 90%;
  font-size: 1.4em;
  display: flex;
  justify-content: space-between;
  text-align: center;
}
.scoreAndTime.hide {
  display: none;
}
.scoreAndTime .table-title {
  background-color: #05401f;
  color: #fff;
  padding: 8px;
}
.scoreAndTime .score-area {
  width: 48%;
  text-align: center;
  border: 1px solid #05401f;
}
.scoreAndTime .score-area .countNow {
  padding: 12px;
  font-size: 1.6em;
}
.scoreAndTime .time-area {
  width: 48%;
  text-align: center;
  border: 1px solid #05401f;
}
.scoreAndTime .time-area .leftTime {
  padding: 12px;
  font-size: 1.6em;
}

.resultArea {
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.resultArea.hide {
  display: none;
}

.resultScoreArea {
  width: 100%;
  max-width: 320px;
}
.resultScoreArea .table-title {
  background-color: #05401f;
  color: #fff;
  font-size: 1.4em;
  margin-bottom: 0;
  padding: 8px;
}
.resultScoreArea .resultScore {
  border: 1px solid #05401f;
  font-size: 2em;
  padding: 20px;
  margin-bottom: 40px;
}

.resultMsg {
  font-size: 1.6em;
  margin-bottom: 40px;
}

.bestScoreArea {
  font-size: 1.2em;
  margin-bottom: 40px;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.97);
  }
  100% {
    transform: scale(1);
  }
}
