/* Gen Z–friendly: tối, accent neon mềm, bo tròn lớn, font hiện đại */
:root {
  --bg0: #07070a;
  --bg1: #0f0f14;
  --surface: #14141c;
  --surface2: #1b1b26;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #c8ff4d;
  --accent-dim: rgba(200, 255, 77, 0.15);
  --violet: #a78bfa;
  --cyan: #22d3ee;
  --danger: #fb7185;
  --radius: 18px;
  --font: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(167, 139, 250, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(34, 211, 238, 0.12), transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 40%, #0a0a10);
  line-height: 1.45;
}

a {
  color: var(--cyan);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

header.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--text) 0%, var(--accent) 55%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
}

.pill strong {
  color: var(--accent);
  font-weight: 600;
}

nav.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

nav.tabs button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

nav.tabs button:hover {
  color: var(--text);
  border-color: rgba(200, 255, 77, 0.35);
}

nav.tabs button.active {
  color: #0b0b0f;
  background: linear-gradient(135deg, var(--accent), #9ae66e);
  border-color: transparent;
  box-shadow: 0 6px 24px rgba(200, 255, 77, 0.25);
}

nav.tabs button:active {
  transform: scale(0.98);
}

.panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.5rem;
  box-shadow: var(--shadow);
}

.panel.visible {
  display: block;
}

.panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel > .hint {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

textarea {
  min-height: 5rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(200, 255, 77, 0.45);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .row2 {
    grid-template-columns: 1fr;
  }
}

.checkline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.checkline input {
  width: auto;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

button.primary {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 0.65rem 1.15rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0b0b0f;
  background: linear-gradient(135deg, var(--accent), #b8f562);
  box-shadow: 0 8px 28px rgba(200, 255, 77, 0.22);
  transition: transform 0.1s, filter 0.15s;
}

button.primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

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

button.ghost {
  cursor: pointer;
  border-radius: 12px;
  padding: 0.6rem 1rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

button.ghost:hover:not(:disabled) {
  border-color: rgba(167, 139, 250, 0.5);
  color: var(--violet);
}

.log {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #0a0a10;
  border: 1px solid var(--border);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.8rem;
  color: #d4d4d8;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow: auto;
}

.log.error {
  border-color: rgba(251, 113, 133, 0.45);
  color: #fecdd3;
}

.status {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.status.run {
  color: var(--cyan);
}

footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

input[type="file"] {
  font-size: 0.85rem;
  color: var(--muted);
}

.small {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
