body {
  margin: 0;
  background: #141b27;
  color: white;
  font-family: system-ui, sans-serif;
}


#app {
  height: 100vh;
  display: grid;
  grid-template-rows: 1fr 260px;
}

#top {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
  padding: 12px;
}


#text-panel,
#controls-panel {
  background: #0e121c;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}


textarea {
  flex: 1;
  background: #000;
  color: white;
  border: none;
  padding: 12px;
  resize: none;
  font-size: 16px;
  line-height: 1.4;
}

textarea:focus {
  outline: none;
}

textarea::selection {
  background: rgba(0, 180, 255, 0.45);
}


label {
  margin-top: 12px;
  color: #aaa;
  font-size: 14px;
}

button {
  background: #2f3033;
  border-radius: 999px;
  width: 65px;
  height: 48px;
  font-size: 18px;
  border: none;
  color: white;
  cursor: pointer;
}

button:hover {
  background: #3f434e;
}

.controls-group {
  display: flex;
  gap: 16px;
  margin: 20px 0;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  margin-top: 10px;
}

.toggle input {
  accent-color: #ff5c5c;
}


.pivot-bias {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.pivot-bias button {
  width: 44px;
  height: 36px;
  font-size: 16px;
}

#biasLabel {
  color: #ccc;
  min-width: 70px;
  text-align: center;
  font-size: 14px;
}


#reader-stage {
  border-top: 1px solid #1c2130;
  background: radial-gradient(circle, #0f1320, #05070b);
  display: flex;
  align-items: center;
  justify-content: center;
}

#focus-box {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 160px;
  overflow: hidden;
}


#word {
  position: absolute;
  top: 50%;
  white-space: nowrap;
  font-size: 90px;
  font-weight: 700;
  color: #cfd6ff;
  transform: translateY(-50%);
}

#word .pivot {
  color: #ff5c5c;
  text-shadow: 0 0 12px rgba(255, 90, 90, 0.6);
}


#pivot {
  position: absolute;
  width: 1px;
  height: 100%;
  background: rgba(255, 80, 80, 0.35);
  left: 50%;
  transform: translateX(-50%);
}

#pivot.hidden {
  display: none;
}

.controls-note {
  margin-top: auto;
  padding-top: 12px;
  font-size: 13px;
  color: #8a92a8;
  line-height: 1.5;
  text-align: center;
  opacity: 0.9;
  border-top: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 768px) {

  #app {
    grid-template-rows: auto 1fr;
  }

  #top {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  #text-panel {
    height: 160px;
  }

  textarea {
    font-size: 14px;
  }

  #controls-panel {
    padding: 12px;
  }

  .controls-group {
    justify-content: space-around;
  }

  #reader-stage {
    border-top: none;
  }

  #focus-box {
    position: relative;
  }

  #word {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .pivot-bias {
    justify-content: center;
  }

  .controls-note {
    font-size: 11px;
    line-height: 1.4;
  }
}

