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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  min-height: 100vh;
  padding: 1rem;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
}

h1 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: #1a1a2e;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: #9ca3af;
}

input[type="text"],
input[type="date"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.15s;
}

input[type="text"]:focus,
input[type="date"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fff;
  position: relative;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: #3b82f6;
  background: #eff6ff;
}

.drop-zone.has-file {
  border-style: solid;
  border-color: #10b981;
  background: #f0fdf4;
}

.drop-zone.error {
  border-color: #ef4444;
  background: #fef2f2;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.drop-icon {
  font-size: 2rem;
  line-height: 1;
  color: #9ca3af;
}

.drop-text {
  font-size: 0.85rem;
  color: #6b7280;
}

.file-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.file-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #dcfce7;
  color: #166534;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.file-tag .remove {
  cursor: pointer;
  font-weight: 700;
  color: #166534;
  opacity: 0.6;
  font-size: 1rem;
  line-height: 1;
}

.file-tag .remove:hover {
  opacity: 1;
}

.buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

button {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

button:active {
  transform: scale(0.98);
}

#generateBtn {
  background: #3b82f6;
  color: #fff;
}

#generateBtn:hover {
  background: #2563eb;
}

#clearBtn {
  background: #e5e7eb;
  color: #374151;
}

#clearBtn:hover {
  background: #d1d5db;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.overlay[hidden] {
  display: none;
}

.spinner-container {
  background: #fff;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.spinner-container p {
  margin-top: 1rem;
  font-weight: 500;
  color: #374151;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #059669;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 200;
  animation: toast-in 0.3s ease;
}

.toast[hidden] {
  display: none;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(1rem); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem 0.5rem;
  }

  h1 {
    font-size: 1.4rem;
  }

  .drop-zone {
    padding: 1rem;
  }

  .buttons {
    flex-direction: column;
  }
}
