@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Google+Sans+Text:wght@400;500&display=swap');

:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-hover: #f1f3f4;
  --border: #e0e0e0;
  --text: #202124;
  --muted: #5f6368;
  --accent: #1a73e8;
  --accent-light: #e8f0fe;
  --accent-hover: #1557b0;
  --green: #34a853;
  --red: #ea4335;
  --yellow: #fbbc05;
  --radius: 24px;
  --radius-sm: 12px;
  --shadow: 0 1px 3px rgba(60,64,67,0.1), 0 4px 12px rgba(60,64,67,0.08);
  --shadow-hover: 0 2px 8px rgba(60,64,67,0.15), 0 8px 24px rgba(60,64,67,0.12);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  height: 100%;
  font-family: 'Google Sans Text', 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ─── Layout ──────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ─── Header ──────────────────────────────── */
header {
  text-align: center;
  padding: 3rem 0 2.5rem;
  animation: fadeDown 0.5s ease-out;
}

.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.logo-dots {
  display: flex;
  gap: 5px;
}

.logo-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
  width: auto;
}

.dot-b { background: #4285f4; width: 12px; height: 12px; border-radius: 50%; }
.dot-r { background: #ea4335; width: 12px; height: 12px; border-radius: 50%; }
.dot-y { background: #fbbc05; width: 12px; height: 12px; border-radius: 50%; }
.dot-g { background: #34a853; width: 12px; height: 12px; border-radius: 50%; }

h1 {
  font-family: 'Google Sans', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

h1 span {
  color: var(--accent);
}

.subtitle {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 1rem;
  max-width: 560px;
  margin-inline: auto;
}

/* ─── Window (two-column top) ─────────────── */
.window {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

/* ─── Panels ──────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  animation: slideUp 0.4s ease-out both;
}

.panel:nth-child(2) { animation-delay: 0.05s; }
.grid .panel:nth-child(1) { animation-delay: 0.1s; }
.grid .panel:nth-child(2) { animation-delay: 0.15s; }

.panel:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* ─── Labels & Fields ─────────────────────── */
.field {
  margin-bottom: 1.25rem;
}

.label {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

input[type="text"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

input[type="file"] {
  padding: 0.6rem 0.8rem;
  cursor: pointer;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
  background: #fafcff;
}

textarea {
  resize: vertical;
  min-height: 200px;
  font-size: 0.9rem;
  line-height: 1.7;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select option {
  color: var(--text);
  background: var(--surface);
}

/* ─── Actions ─────────────────────────────── */
.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.7rem 1.4rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
  white-space: nowrap;
}

button:hover:not(:disabled) {
  background: var(--surface-hover);
  box-shadow: 0 1px 6px rgba(60,64,67,0.15);
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(26,115,232,0.3);
}

button.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 2px 10px rgba(26,115,232,0.4);
}

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

/* ─── Loading text ────────────────────────── */
.loading-text {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--accent);
  min-height: 1.3em;
  font-weight: 500;
  animation: fadeIn 0.3s ease;
}

/* ─── Title bar separator ─────────────────── */
.title-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-top: 1.25rem;
  box-shadow: var(--shadow);
  animation: slideUp 0.4s 0.08s ease-out both;
}

.title-bar:hover {
  box-shadow: var(--shadow-hover);
}

/* ─── Simulation Section ──────────────────── */
.simulation-section h3 {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.simulation-section h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #4285f4, #34a853);
  border-radius: 4px;
}

.simulation-section input[type="text"] {
  max-width: none;
  flex: 1;
}

.simulation-section .actions {
  align-items: center;
}

#simulationBox {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  min-height: 90px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  transition: var(--transition);
}

#simulationBox:not(:empty) {
  background: var(--accent-light);
  border-color: rgba(26, 115, 232, 0.25);
}

/* ─── Grid (questions) ────────────────────── */
.grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

h2 {
  font-family: 'Google Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

h2::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.panel:first-child h2::before { background: var(--accent); }
.panel:last-child h2::before { background: var(--green); }

ol {
  padding-left: 0;
  list-style: none;
  counter-reset: question-counter;
}

li {
  counter-increment: question-counter;
  margin-bottom: 0.6rem;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid transparent;
  font-size: 0.9rem;
  line-height: 1.55;
  transition: var(--transition);
  position: relative;
  cursor: default;
}

li::before {
  content: counter(question-counter);
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Google Sans', sans-serif;
}

.panel:last-child li::before {
  background: var(--green);
}

li:hover {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

/* ─── Footer ──────────────────────────────── */
footer {
  text-align: center;
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ─── Animations ──────────────────────────── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ─── Responsive ──────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 1.25rem 1rem 3rem; }
  .window { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.8rem; }

  .actions {
    flex-direction: column;
  }

  button {
    width: 100%;
    justify-content: center;
  }

  .simulation-section .actions {
    flex-direction: column;
  }
}