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

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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0a0a0f 0%, #0d1a2e 100%);
  min-height: 100vh;
  color: #e8eaf6;
  padding: 24px 16px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0f; }
::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 3px; }

/* HEADER */
.header { text-align: center; margin-bottom: 36px; }
.header-title {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red  { background: #e53935; box-shadow: 0 0 10px #e53935; }
.dot-blue { background: #1565c0; box-shadow: 0 0 10px #1565c0; }

h1 {
  font-size: 26px; font-weight: 800;
  background: linear-gradient(90deg, #1565c0, #e53935);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.header p { color: #546e7a; font-size: 13px; }

/* CARD */
.card {
  max-width: 600px; margin: 0 auto;
  background: rgba(13,26,46,0.85);
  border: 1px solid #1e3a5f;
  border-radius: 16px; padding: 28px;
  backdrop-filter: blur(10px);
}
.card-title {
  font-size: 13px; font-weight: 700; color: #42a5f5;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px;
}

/* FIELD */
.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: 11px; font-weight: 600;
  color: #78909c; text-transform: uppercase;
  letter-spacing: 0.8px; margin-bottom: 8px;
}

input, select, textarea {
  width: 100%; padding: 10px 14px; border-radius: 8px;
  background: #0a0a1a; border: 1px solid #1e3a5f;
  color: #e8eaf6; font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none; transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus { border-color: #1565c0; }
input::placeholder,
textarea::placeholder { color: #37474f; }

/* DURAÇÃO */
.dur-row { display: flex; gap: 8px; }
.dur-row input  { flex: 1; }
.dur-row select { width: 130px; }

/* CHIPS */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid #1e3a5f;
  background: transparent; color: #546e7a;
  cursor: pointer; font-size: 13px; font-weight: 400;
  transition: all 0.15s; font-family: 'Inter', sans-serif;
}
.chip:hover  { border-color: #1565c0; color: #90caf9; }
.chip.active {
  border-color: #1565c0;
  background: rgba(21,101,192,0.3);
  color: #42a5f5; font-weight: 600;
  box-shadow: 0 0 10px rgba(21,101,192,0.3);
}

/* ERRO */
.error { color: #ef5350; font-size: 13px; margin-bottom: 14px; }

/* BOTÃO GERAR */
#btn-generate {
  width: 100%; padding: 14px; border-radius: 10px;
  border: none; cursor: pointer;
  background: linear-gradient(90deg, #1565c0, #e53935);
  color: #fff; font-size: 15px; font-weight: 700;
  letter-spacing: 0.5px; font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 20px rgba(21,101,192,0.4);
  transition: opacity 0.2s;
}
#btn-generate:hover     { opacity: 0.88; }
#btn-generate:disabled  { background: #1e3a5f; box-shadow: none; cursor: wait; }

/* RESULT */
#result-page { max-width: 720px; margin: 0 auto; display: none; }
.result-actions { display: flex; gap: 10px; margin-bottom: 20px; }

.btn-sec {
  padding: 9px 18px; border-radius: 8px;
  border: 1px solid #1e3a5f;
  background: rgba(13,26,46,0.8);
  color: #42a5f5; cursor: pointer;
  font-size: 13px; font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}
.btn-sec:hover { border-color: #1565c0; }

#result-box {
  background: rgba(13,26,46,0.9);
  border: 1px solid #1e3a5f; border-radius: 16px;
  padding: 28px; line-height: 1.85;
  font-size: 14px; color: #cfd8dc;
  white-space: pre-wrap;
  max-height: 70vh; overflow-y: auto;
}

/* SPINNER */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }