/* =================================================
   Theme variables
   ================================================= */

:root {
  --bg: #0f172a;
  --panel: rgb(21, 26, 35);
  --border: rgb(47, 59, 81);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: rgb(190, 127, 82);
  --nav: rgb(21, 26, 35);
}

/* =================================================
   Global reset
   ================================================= */

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html,
body {
  margin: 0;
  min-height: 100vh;
}

/* =================================================
   Page background
   ================================================= */

body {
  background:
    linear-gradient(
      rgb(7, 12, 22),
      rgba(7, 12, 22, 0.6)
    ),
    url("/assets/bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* =================================================
   Navigation
   ================================================= */

nav {
  background: var(--nav);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
}

nav a {
  margin-left: 24px;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  opacity: 0.9;
}

nav a:hover {
  opacity: 1;
  color: var(--accent);
}

.nav-title {
  margin-left: 0;
  margin-right: auto;
  font-weight: bold;
}

/* =================================================
   App container
   ================================================= */

.app {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px;
  flex: 1;
}

h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

p {
  color: var(--muted);
  margin-top: 0;
}

/* =================================================
   Form elements
   ================================================= */

label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

textarea,
input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px;
  border-radius: 8px;
  font-size: 0.95rem;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

input[type="number"] {
  max-width: 160px;
}

.row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

button {
  margin-top: 12px;
  padding: 10px 16px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

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

/* =================================================
   Result / panels
   ================================================= */

.answer,
.result {
  margin-top: 24px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* =================================================
   Footer
   ================================================= */

footer {
  background: var(--nav);
  color: var(--muted);
  text-align: center;
  padding: 16px;
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}
