:root {
  --blue: #00a8ff;
  --cyan: #20e7ff;
  --green: #39ff74;
  --red: #ff6b6b;
  --text: #f4f7fb;
  --muted: #b8c4d4;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #02070d;
  background-image: url("assets/caelusnodes-background.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.chapter-input {
  position: absolute;
  z-index: 10;
  left: 38.25vw;
  top: 67.25vh;
  width: 24.6vw;
  height: 13.0vh;
  resize: none;
  color: var(--text);
  background: rgba(0, 8, 16, 0.92);
  border: 1px solid rgba(0, 168, 255, 0.46);
  border-radius: 7px;
  padding: 0.85vw 1.0vw;
  font-size: clamp(10px, 0.92vw, 16px);
  line-height: 1.42;
  outline: none;
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.42),
    0 0 10px rgba(0, 168, 255, 0.12);
}

.chapter-input::placeholder {
  color: rgba(245, 248, 255, 0.62);
}

.chapter-input:focus {
  border-color: var(--cyan);
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(0, 168, 255, 0.38);
}

.analyze-button,
.clear-button,
.node-button {
  position: absolute;
  z-index: 20;
  height: 4.35vh;
  color: white;
  border: 1px solid var(--blue);
  border-radius: 7px;
  font-size: clamp(10px, 0.95vw, 16px);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 132, 255, 0.92), rgba(0, 46, 106, 0.95));
  box-shadow: 0 0 16px rgba(0, 132, 255, 0.28);
}

.analyze-button,
.clear-button {
  top: 82.0vh;
}

.analyze-button {
  left: 38.25vw;
  width: 10.55vw;
}

.clear-button {
  left: 50.02vw;
  width: 8.55vw;
  background: rgba(3, 14, 26, 0.94);
}

.roast-button {
  left: 16.6vw;
  top: 82.0vh;
  width: 13.4vw;
  background: linear-gradient(180deg, rgba(0, 132, 255, 0.88), rgba(0, 30, 86, 0.94));
}

.analyze-button:hover,
.clear-button:hover,
.node-button:hover {
  box-shadow: 0 0 20px rgba(0, 168, 255, 0.48);
}

.analyze-button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.response-box {
  position: absolute;
  z-index: 10;
  left: 66.95vw;
  top: 63.65vh;
  width: 29.3vw;
  height: 22.4vh;
  margin: 0;
  color: var(--green);
  background: rgba(0, 6, 12, 0.92);
  border: 1px solid rgba(0, 168, 255, 0.36);
  border-radius: 7px;
  padding: 1.05vw 1.45vw;
  overflow: auto;
  white-space: pre-wrap;
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(9px, 0.84vw, 15px);
  line-height: 1.48;
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.44),
    0 0 10px rgba(0, 168, 255, 0.12);
}

.request-status {
  position: absolute;
  z-index: 30;
  left: 59.5vw;
  top: 82.8vh;
  width: 5.8vw;
  color: var(--muted);
  font-size: clamp(8px, 0.72vw, 12px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.request-status.ok {
  color: var(--green);
}

.request-status.error {
  color: var(--red);
}

@media (max-width: 900px) {
  html,
  body {
    min-width: 1200px;
    min-height: 800px;
    overflow: auto;
  }
}