@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
  color: #1e293b;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.container {
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.1);
  padding: 48px 40px;
  width: 100%;
  max-width: 480px;
  text-align: center;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 32px;
  font-weight: 400;
}

.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 50px 20px;
  background-color: #f8fafc;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 24px;
}

.dropzone:hover, .dropzone.active {
  border-color: #3b82f6;
  background-color: #eff6ff;
  transform: translateY(-2px);
}

.dropzone p {
  font-size: 16px;
  font-weight: 500;
  color: #475569;
  pointer-events: none;
}

#fileBox {
  display: none;
}

button#submitBtn {
  width: 100%;
  background-color: #2563eb;
  color: #ffffff;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

button#submitBtn:hover:not(:disabled) {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

button#submitBtn:active:not(:disabled) {
  transform: translateY(1px);
}

button#submitBtn:disabled {
  background-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

#status {
  margin-top: 20px;
  font-size: 15px;
  font-weight: 500;
  display: none;
  color: #475569;
}

.resultbox {
  margin-top: 24px;
  padding: 24px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  display: none;
  text-align: left;
  word-break: break-all;
}

.resultbox p {
  color: #0f172a;
  font-weight: 600;
  margin-bottom: 12px;
}

.result-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.result-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.result-item:last-child {
  margin-bottom: 0;
}

.result-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.result-content {
  flex-grow: 1;
  min-width: 0;
}

.result-filename {
  font-weight: 600;
  color: #0f172a;
  font-size: 14.5px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-link {
  font-size: 13.5px;
  line-height: 1.4;
}

.result-link a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  word-break: break-all;
  display: inline-block;
}

.result-link a:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.result-error {
  font-size: 13.5px;
  color: #ef4444;
  font-weight: 500;
}

.copy-btn {
  display: inline-block;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-left: auto;
}

.copy-btn:hover {
  background-color: #059669;
}

.loader {
  border: 3px solid #e2e8f0;
  border-top: 3px solid #2563eb;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
