@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', Arial, sans-serif;
  background: #f7f5ef;
  color: #111827;
}

/* Main layout */
.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* Header */
header {
  background: transparent;
  color: #111827;
  padding: 0 0 28px 0;
  border: none;
  box-shadow: none;
}

header h1,
.logo,
h1 {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -2px;
  margin: 0;
  color: #111827;
}

header p,
.subtitle {
  margin-top: 8px;
  font-size: 1rem;
  color: #6b7280;
}

/* Notebook / card container */
.notebook,
.paper,
.card,
main {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
}

/* Remove red notebook line */
.notebook::before,
.paper::before,
.card::before {
  display: none;
  content: none;
}

/* Controls */
.controls,
.form-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

label {
  display: block;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

select,
input {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  outline: none;
}

select:focus,
input:focus,
textarea:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

/* Textarea */
textarea {
  width: 100%;
  height: 360px;
  resize: none;
  padding: 20px;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  border: 1px solid #dbe1ea;
  border-radius: 16px;
  background: #fffefb;
  color: #111827;
  outline: none;
}

/* Button */
button {
  margin-top: 18px;
  padding: 13px 22px;
  border: none;
  border-radius: 12px;
  background: #0f766e;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  background: #115e59;
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Results */
#results {
  margin-top: 28px;
}

#results h2,
#results h3 {
  color: #111827;
  margin-bottom: 12px;
}

#corrected {
  background: #ffffff;
  border: 1px solid #dbe1ea;
  border-radius: 14px;
  padding: 18px;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Annotation cards */
.annotation {
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  border-left: 5px solid #14b8a6;
  padding: 16px;
  margin-top: 14px;
  border-radius: 14px;
  line-height: 1.6;
}

.annotation .span {
  font-weight: 700;
  color: #0f766e;
  margin-bottom: 6px;
}

.annotation .meta {
  color: #475569;
  margin-bottom: 6px;
}

/* Lists */
#flow,
#notes {
  padding-left: 22px;
  line-height: 1.7;
}

/* Error */
#error {
  margin-top: 18px;
  color: #be123c;
  font-weight: 600;
}

/* Utility */
.hidden {
  display: none;
}

/* Mobile */
@media (max-width: 700px) {
  .app {
    padding: 28px 16px;
  }

  header h1,
  .logo,
  h1 {
    font-size: 2.4rem;
  }

  .notebook,
  .paper,
  .card,
  main {
    padding: 20px;
  }

  textarea {
    height: 300px;
  }
}
