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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

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

header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
  padding: 20px 0;
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
  font-size: 1.1em;
  opacity: 0.9;
}

.card {
  background: white;
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  margin-bottom: 30px;
}

.form-section {
  margin-bottom: 30px;
}

.form-section h2 {
  font-size: 1.3em;
  margin-bottom: 15px;
  color: #667eea;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.3s;
}

textarea:focus {
  outline: none;
  border-color: #667eea;
}

.divider {
  text-align: center;
  margin: 30px 0;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
}

.divider span {
  background: white;
  padding: 0 20px;
  position: relative;
  color: #999;
  font-weight: 600;
}

.file-upload {
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type="file"] {
  display: none;
}

.file-label {
  display: inline-block;
  padding: 10px 20px;
  background: #667eea;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  font-weight: 500;
}

.file-label:hover {
  background: #5568d3;
}

.file-name {
  color: #666;
  font-size: 14px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checkbox-group label {
  margin: 0;
  cursor: pointer;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s;
}

.radio-group label:hover {
  border-color: #667eea;
  background-color: #f8faff;
}

.radio-group input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
}

.radio-group input[type="radio"]:checked + .radio-label {
  color: #667eea;
  font-weight: 600;
}

.radio-group label:has(input[type="radio"]:checked) {
  border-color: #667eea;
  background-color: #f8faff;
}

.radio-label {
  margin: 0;
  font-size: 16px;
}

.button-group {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.btn {
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #667eea;
  color: white;
  flex: 1;
}

.btn-primary:hover:not(:disabled) {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

.btn-success {
  background: #10b981;
  color: white;
  width: 100%;
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.progress-container,
.result-container,
.error-container {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  margin-bottom: 30px;
}

.progress-header h3 {
  color: #667eea;
  margin-bottom: 10px;
}

.progress-header p {
  color: #666;
  margin-bottom: 15px;
}

.progress-bar {
  width: 100%;
  height: 30px;
  background: #f0f0f0;
  border-radius: 15px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  width: 0%;
  transition: width 0.3s;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.result-success h3 {
  color: #10b981;
  margin-bottom: 20px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 10px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-label {
  color: #666;
  font-size: 14px;
}

.stat-value {
  color: #667eea;
  font-size: 32px;
  font-weight: bold;
}

.error-container h3 {
  color: #ef4444;
  margin-bottom: 15px;
}

.error-container p {
  color: #666;
  margin-bottom: 20px;
  padding: 15px;
  background: #fee2e2;
  border-radius: 8px;
}

footer {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.info-section h3 {
  color: #667eea;
  margin-bottom: 15px;
}

.info-section p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #555;
}

.info-section ul {
  margin-left: 20px;
  margin-bottom: 15px;
}

.info-section li {
  margin-bottom: 8px;
  color: #555;
}

.note {
  background: #f0f9ff;
  padding: 15px;
  border-left: 4px solid #667eea;
  border-radius: 4px;
  margin-top: 15px;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2em;
  }

  .card {
    padding: 25px;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }
}
