/* ===== RESET & BASE ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: "Poppins", Arial, sans-serif;
  background: linear-gradient(135deg, #f3f5f8, #e9ecf1);
  color: #2b2b2b;
  line-height: 1.6;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 680px;
  margin: 80px auto;
  background: #ffffff;
  padding: 32px;
  border-radius: 14px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.container:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ===== INPUT FILE ===== */
input[type="file"] {
  display: block;
  width: 100%;
  margin-bottom: 16px;
  padding: 12px;
  border: 2px dashed #d0d5dd;
  border-radius: 10px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

input[type="file"]:hover {
  border-color: #3b82f6;
  background: #f0f6ff;
}

/* ===== BUTTONS ===== */
button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

button:active {
  transform: translateY(0);
  box-shadow: none;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* ===== LOADING ===== */
#loading {
  margin-top: 16px;
  font-size: 14px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 8px;
}

#loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 3px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== RESULT BOX ===== */
pre {
  margin-top: 24px;
  padding: 18px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.7;
  max-height: 420px;
  overflow-y: auto;
}

/* ===== UTILITY ===== */
.hidden {
  display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .container {
    margin: 40px 16px;
    padding: 24px;
  }

  button {
    width: 100%;
    justify-content: center;
  }
}
