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

html,
body {
  height: 100%;
  font-family: system-ui, -apple-system, sans-serif;
  color: #fff;
  overflow: hidden;
}

#bg {
  position: fixed;
  inset: -20px;
  background-image: url("images/classroom.jpg");
  background-size: cover;
  background-position: center;
  filter: blur(3px) brightness(0.6);
  transform: scale(1.02);
  z-index: 0;
  opacity: 1;
}

body.no-script #bg {
  background: radial-gradient(circle at center, #2a3060, #0f1220);
}

#loading {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #d7dcff;
  z-index: 1;
  pointer-events: none;
}

#view {
  position: fixed;
  inset: 0;
  z-index: 2;
}

#lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#lines line {
  stroke-width: 5;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

#nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

#center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(18, 22, 45, 0.82);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  padding: 20px 24px;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  text-align: center;
  width: 300px;
  user-select: none;
}

#center-title {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

#center-form {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

#center-form #center-input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  outline: none;
  color: #fff;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
}

#center-form #center-input::placeholder {
  color: #aeb6e0;
}

#center-form button {
  background: #5b8cff;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 0 14px;
  border-radius: 8px;
  cursor: pointer;
}

#center-form button:hover {
  background: #4a7bff;
}

#statement {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  right: 24px;
  width: 230px;
  text-align: left;
  padding: 16px;
  background: rgba(18, 22, 45, 0.86);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  z-index: 2;
  user-select: none;
}

#negative {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  left: 24px;
  width: 230px;
  text-align: left;
  padding: 16px;
  background: rgba(18, 22, 45, 0.86);
  border: 2px solid #ff6b9a;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  z-index: 2;
  user-select: none;
}

#negative-title {
  font-weight: 800;
  font-size: 16px;
  color: #ffb3c9;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

#negative-form,
#idea-form {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.menu {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  outline: none;
  color: #fff;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.menu option {
  color: #222;
  background: #fff;
}

#negative-input,
#idea-input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  outline: none;
  color: #fff;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
}

#negative-input::placeholder,
#idea-input::placeholder {
  color: #aeb6e0;
}

#negative-form button,
#idea-form button {
  background: #5b8cff;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 0 14px;
  border-radius: 8px;
  cursor: pointer;
}

#negative-form button:hover,
#idea-form button:hover {
  background: #4a7bff;
}

.idea {
  position: absolute;
  padding: 9px 15px;
  background: rgba(23, 27, 50, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
}

#generate {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(91, 140, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  padding: 14px 30px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  z-index: 4;
}

#generate:hover {
  background: #4a7bff;
}

#generate:disabled {
  opacity: 0.7;
  cursor: default;
}

#reset {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  z-index: 4;
}

#reset:hover {
  background: rgba(255, 255, 255, 0.22);
}

#result {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: rgba(10, 12, 28, 0.9);
  z-index: 5;
  padding: 40px 20px;
  text-align: center;
  color: #d7dcff;
  font-size: 18px;
  display: none;
  overflow-y: auto;
}

#result img {
  max-width: min(700px, 90vw);
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

#result.show {
  display: flex;
}

#result-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc {
  background: #fdfaf2;
  color: #1a1a1a;
  max-width: 640px;
  width: 90vw;
  padding: 40px 48px 36px;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
  text-align: left;
  font-family: "Times New Roman", Georgia, serif;
  position: relative;
  transform: rotate(-0.4deg);
}

.doc::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.03)),
    radial-gradient(circle at 20% 15%, rgba(0, 0, 0, 0.03), transparent 50%);
  pointer-events: none;
}

.doc-school {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #7a1f1f;
}

.doc-seal {
  width: 96px;
  height: 96px;
  margin: 0 auto 6px;
  display: block;
}

.doc-title {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 2px;
}

.doc-line {
  height: 3px;
  background: #1a1a1a;
  margin: 18px 0;
}

.doc-intro {
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 18px;
}

.doc-body h4 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 8px 0 4px;
}

.doc-body li {
  font-size: 15px;
  line-height: 1.5;
  margin-left: 20px;
  list-style: disc;
}

.doc-foot {
  margin-top: 26px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 2px;
  color: #555;
  text-transform: uppercase;
  border-top: 1px solid #ccc;
  padding-top: 14px;
}


#result-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  z-index: 6;
}


