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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 40px;
  color: white;
}

.logo-container {
  margin-bottom: 20px;
}

.logo {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
}

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

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

main {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

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

.upload-area {
  border: 3px dashed #111;
  border-radius: 15px;
  padding: 60px 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  background: #00000020;
}

.upload-area:hover {
  border-color: #111;
  background: #00000040;
  transform: translateY(-2px);
}

.upload-area.dragover {
  border-color: #4caf50;
  background: #f0fff0;
}

.upload-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.upload-area h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #000;
}

.upload-area p {
  color: #666;
  margin-bottom: 20px;
}

.upload-btn {
  background: linear-gradient(135deg, #000 0%, #111 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.api-section {
  background: #00000020;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 30px;
  border-left: 5px solid #000;
}

.api-section h3 {
  color: #000;
  margin-bottom: 10px;
}

.api-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  margin: 10px 0;
  transition: border-color 0.3s ease;
}

.api-input:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

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

.file-info {
  background: #e8f5e8;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border-left: 5px solid #4caf50;
}

.validation-rules {
  background: #fff3e0;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border-left: 5px solid #ff9800;
}

.validation-rules h4 {
  color: #ff9800;
  margin-bottom: 15px;
}

.validation-rules ul {
  margin-left: 20px;
}

.validation-rules li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.validation-rules ul ul {
  margin-top: 8px;
}

.process-btn {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 25px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  width: 100%;
}

.process-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.process-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.progress-section {
  text-align: center;
  margin-bottom: 30px;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 10px;
}

.progress-text {
  font-size: 1.1rem;
  color: #666;
  margin-top: 10px;
}

.results-section {
  text-align: center;
}

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

.stat-card {
  background: #00000020;
  padding: 20px;
  border-radius: 15px;
  border-left: 5px solid #000;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: #000;
}

.stat-label {
  color: #666;
  margin-top: 5px;
}

.download-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.download-btn {
  padding: 15px 30px;
  border: none;
  border-radius: 15px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.download-btn.success {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.download-btn.error {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.download-btn:hover {
  transform: translateY(-2px);
}

.download-btn.success:hover {
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.download-btn.error:hover {
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.download-btn span {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 5px;
}

.reset-btn {
  background: linear-gradient(135deg, #000 0%, #111 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.reset-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

footer {
  text-align: center;
  color: white;
  opacity: 0.8;
  padding: 20px;
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  main {
    padding: 20px;
  }

  header h1 {
    font-size: 2rem;
  }

  .download-buttons {
    grid-template-columns: 1fr;
  }

  .upload-area {
    padding: 40px 15px;
  }
}

.error-message {
  background: #ffebee;
  color: #c62828;
  padding: 15px;
  border-radius: 10px;
  margin: 10px 0;
  border-left: 5px solid #f44336;
}

.success-message {
  background: #e8f5e8;
  color: #2e7d32;
  padding: 15px;
  border-radius: 10px;
  margin: 10px 0;
  border-left: 5px solid #4caf50;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
