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

:root {
  --bg: linear-gradient(180deg, #f6f8fb 0%, #eef2ff 100%);
  --card-bg: #ffffff;
  --text-primary: #334155;
  --text-muted: #6b7280;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --error: #e11d48;
  --success: #22c55e;
  --shadow: rgba(16, 24, 40, 0.1);
  --radius: 12px;
}

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

.pfp {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.5);
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 1rem;
}

.container {
  max-width: 480px;
  width: 100%;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px var(--shadow);
  padding: 2.5rem 2rem 3rem;
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.subtitle {
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.card {
  margin-bottom: 2rem;
  padding: 1.75rem 1.75rem 2rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px var(--shadow);
}

.card h2 {
  margin-top: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.3rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.file-label {
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

input[type='file'] {
  cursor: pointer;
  border-radius: var(--radius);
  border: 2px dashed var(--accent);
  padding: 1rem;
  color: var(--accent);
  font-weight: 600;
  transition: border-color 0.3s ease;
}

input[type='file']:hover,
input[type='file']:focus {
  border-color: var(--accent-hover);
  outline: none;
}

input[type='text'] {
  padding: 0.85rem 1rem;
  border: 1.8px solid #d1d5db;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type='text']:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(79, 70, 229, 0.4);
  outline: none;
}

.help-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -0.7rem;
  margin-bottom: 0.5rem;
}

button {
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.85rem;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.6);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

button:hover:not(:disabled) {
  background-color: var(--accent-hover);
  box-shadow: 0 6px 18px rgba(67, 56, 202, 0.85);
}

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

.result,
.result-html {
  font-family: 'Fira Mono', monospace, monospace;
  background-color: #f9fafb;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 3px 10px var(--shadow);
  max-height: 280px;
  overflow-y: auto;
}

.result-html .ok {
  color: var(--success);
  font-weight: 700;
}
.result-html .fail {
  color: var(--error);
  font-weight: 700;
}
.result-html b {
  color: var(--text-primary);
}
.result-html .field {
  margin-bottom: 6px;
}

footer.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 1rem;
}

@media (max-width: 520px) {
  .container {
    margin: 0 1rem;
    padding: 2rem 1rem 2.5rem;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  .card h2 {
    font-size: 1.2rem;
  }
}
