:root {
  --bg: #0b1020;
  --card: #141b2f;
  --accent: #2ecc71;
  --accent-soft: #27ae60;
  --text: #ecf0f1;
  --muted: #95a5a6;
  --danger: #e74c3c;
  --border: #2c3e50;
  --ball: #1abc9c;
}

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1c2748 0, #02030a 55%, #000 100%);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 24px;
}

.app {
  max-width: 1100px;
  width: 100%;
  background: linear-gradient(145deg, #151b2c, #090d18);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

header h1 span.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 420px;
}

.header-right {
  align-self: flex-end;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 20px;
}

@media (max-width: 840px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .header-right {
    text-align: left;
  }
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.card h2 {
  margin: 0 0 10px 0;
  font-size: 1.05rem;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.field small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

select,
button {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0c1220;
  color: var(--text);
  font-size: 0.9rem;
}

button {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  border: none;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(46, 204, 113, 0.4);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(46, 204, 113, 0.55);
}

button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 5px 12px rgba(46, 204, 113, 0.35);
}

.checkbox-group {
  margin-top: 8px;
  display: grid;
  gap: 4px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.numbers-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 42px;
}

.ball {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, var(--ball));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #05211a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
}

.meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.meta span.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin-right: 4px;
  margin-bottom: 3px;
  font-size: 0.75rem;
}

.meta span.tag strong {
  margin-right: 4px;
  color: var(--accent);
}

.alert {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 2px;
}

.explanation {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 6px;
  border-top: 1px dashed var(--border);
  padding-top: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.75rem;
}

table thead {
  background: #0f1526;
}

table th,
table td {
  padding: 6px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

table th {
  font-weight: 600;
}

table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

footer {
  margin-top: 14px;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: right;
}
/* ===================== */
/* 🔵 MODAL — IA PENSANDO */
/* ===================== */

.thinking-modal {
  /* começa escondido, só aparece quando o JS muda para "flex" */
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;

  /* estes não mudam o display, só definem alinhamento
     quando o JS colocar display: flex */
  align-items: center;
  justify-content: center;
}

.thinking-content {
  background: #15171e;
  padding: 25px 35px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #00bcd4;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
}

.spinner {
  width: 45px;
  height: 45px;
  border: 5px solid #333;
  border-top-color: #00bcd4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.thinking-content p {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #d9d9d9;
}

