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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #f6821f 0%, #faae40 100%);
  min-height: 100vh;
  padding: 20px;
  color: #1a1a1a;
}

.container {
  max-width: 720px;
  margin: 0 auto;
}

h1 {
  color: white;
  text-align: center;
  margin-bottom: 8px;
  font-size: 28px;
}

.subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.field {
  margin-bottom: 18px;
  position: relative;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
  color: #333;
}

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border 0.2s;
}

.field input:focus {
  outline: none;
  border-color: #f6821f;
  box-shadow: 0 0 0 3px rgba(246, 130, 31, 0.15);
}

.toggle-btn {
  position: absolute;
  right: 10px;
  top: 32px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}

.clear-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.clear-btn:hover {
  background: #eee;
}

.primary-btn {
  width: 100%;
  background: #f6821f;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.primary-btn:hover:not(:disabled) {
  background: #e07118;
}

.primary-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.status {
  margin-top: 20px;
  padding: 14px;
  border-radius: 8px;
  background: white;
  font-size: 14px;
}

.status.loading {
  border-left: 4px solid #f6821f;
}

.status.error {
  border-left: 4px solid #e74c3c;
  color: #c0392b;
}

.status.success {
  border-left: 4px solid #27ae60;
}

.result {
  margin-top: 20px;
  background: white;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.result h2 {
  margin-bottom: 18px;
  color: #333;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-box {
  background: linear-gradient(135deg, #fff7ee, #ffe8d1);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #f6821f;
  word-break: break-all;
}

.details-box {
  margin-top: 16px;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
}

.details-box summary {
  cursor: pointer;
  font-weight: 600;
  padding: 6px;
}

#fileList {
  margin-top: 12px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  max-height: 300px;
  overflow-y: auto;
}

.file-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.file-row:nth-child(even) {
  background: #fafafa;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.hidden {
  display: none;
}

footer {
  text-align: center;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}
