html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; 
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
  background-color: rgb(0, 0, 0);
  box-shadow: inset 0 0 300px rgba(150, 150, 150, 0.3);
  display: flex;
  flex-direction: column;
}

#headerArea {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow:
     0 0 100px rgb(35, 35, 35),
     inset 0 0 100px rgb(35, 35, 35);
  color: #ffffff;
  padding: 5px;
}

#dilemmaMitaina {
  margin-bottom: 0;
  letter-spacing: 0.1em;
}

#dilemmaGenerator {
  margin-top: 1px;
  font-weight: normal;
  letter-spacing: 0.1em;
}

#resultWrapper {
  display: block;
  width: 50%;
  min-width: 350px;
  margin: 5% auto;
  padding: 2%;
  overflow: hidden;
}

#resultArea {
  position: relative;
  display: block;
  width: 100%;
  min-height: 120px;
  background-color: transparent;
  margin-bottom: 20px;
  
  line-height: 1.8;
  text-align: left;
  word-break: break-word;
  white-space: normal;
}

#resultText {
  font-size: 20px;
  line-height: 1.8;
  letter-spacing: 0.15rem;
  word-break: break-word;
  white-space: normal;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#relotteryBtn {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  background-color: rgb(35, 35, 35);
  font-size: 10pt;
  color: rgb(215, 215, 215);
  border-color: 1px solid rgb(215, 215, 215);
  border-radius: 8px;
  padding: 8px 16px;
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;

  opacity: 1;
  pointer-events: auto;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s, color 0.2s;
}

#relotteryBtn:hover {
  background-color: rgb(60, 60, 60);
  color: #ffffff;
}

#relotteryBtn:disabled {
  opacity: 0;
  cursor: default;
  pointer-events: none;
  transition: opacity 0s ease-out;
}


span {
  display: inline-block;
}



/* 結果の表示 */
.word {
  display: inline-block;
  opacity: 0;
  color: #ffffff;
  position: relative;

  transform: translateY(10px) skewX(-8deg);

  transition: 
    opacity 0.1s ease-out,
    transform 0.36s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.word.highlight {
  margin: 0 0.1em;
  transition: opacity 0.3s ease-out;
}

  /* n倍 */
.word.highlight::before {
  content: attr(data-text);
  position: absolute;
  top: 50%;
  left: 50%;
  
  transform: translate(-50%, -50%) scale(1.8);
  color: #ffffffd0;
  pointer-events: none;
  white-space: nowrap;
  
  opacity: 1;
  transition: opacity 1.6s ease-out, transform 0.5s ease-out;
}


/* 定位置 */
.word.visible {
  opacity: 1;
  transform: translate(0, 0) skewX(0deg);
}

.word.highlight.visible::before {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1) skewX(0deg);
}



/* グリッチ */
.glitch-clone-layer {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
  opacity: 0;
  z-index: 100;
  display: block !important;
  transition: none !important;

  word-break: break-word;
  white-space: normal;
  box-sizing: border-box;
}

.glitch-clone-layer .word.highlight::before {
  display: none !important;
  content: none !important;
}

.glitch-clone-layer.is-glitching {
  opacity: 1 !important;
  
  /* 上下左右の長方形切り抜き */
  clip-path: inset(
    var(--clip-top, 0%) 
    var(--clip-right, 0%) 
    var(--clip-bottom, 0%) 
    var(--clip-left, 0%)
  ) !important;
  
  /* 位置ズレ */
  transform: translate(var(--shift-x, 0px), var(--shift-y, 0px)) !important;
  /* 色ズレ */
  filter: drop-shadow(-3px 0px 0px #ff0055) drop-shadow(3px 0px 0px #00e5ff) !important;
}
