* {
  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;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

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

main {
  padding: 40px;
}

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

.upload-card {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 25px;
  border: 2px dashed #ddd;
  transition: all 0.3s ease;
}

.upload-card:hover {
  border-color: #667eea;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h2 {
  font-size: 1.3rem;
  color: #333;
}

.file-format {
  background: #667eea;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.upload-area {
  background: white;
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: #667eea;
  background: #f0f4ff;
}

.upload-area.dragover {
  border-color: #667eea;
  background: #e8edff;
}

.upload-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  color: #667eea;
  stroke-width: 2;
}

.upload-text {
  color: #666;
  margin-bottom: 15px;
}

.browse-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.file-info {
  margin-top: 15px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}

.file-info.active {
  display: block;
}

.file-info.success {
  color: #28a745;
  border-left: 4px solid #28a745;
}

.file-info.error {
  color: #dc3545;
  border-left: 4px solid #dc3545;
}

.action-section {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 40px 0;
}

.generate-btn,
.clear-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 40px;
  font-size: 1.1rem;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.generate-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(40, 167, 69, 0.3);
}

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

.clear-btn {
  background: #6c757d;
  color: white;
}

.clear-btn:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(108, 117, 125, 0.3);
}

.btn-icon {
  width: 20px;
  height: 20px;
  stroke-width: 3;
}

.status-section {
  margin: 30px 0;
  padding: 20px;
  border-radius: 10px;
  display: none;
}

.status-section.active {
  display: block;
}

.status-section.success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.status-section.error {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.status-section.info {
  background: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}

.download-link {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 25px;
  background: #667eea;
  color: white;
  text-decoration: none;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.download-link:hover {
  background: #5568d3;
  transform: translateY(-2px);
}

.info-section {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 10px;
  margin-top: 30px;
}

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

.info-section ul {
  list-style: none;
  padding-left: 0;
}

.info-section li {
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
}

.info-section li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
}

.links-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.external-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.external-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.link-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  flex-shrink: 0;
}

footer {
  background: #f8f9fa;
  padding: 20px;
  text-align: center;
  color: #666;
  border-top: 1px solid #dee2e6;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

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

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

  .action-section {
    flex-direction: column;
  }

  .generate-btn,
  .clear-btn {
    width: 100%;
    justify-content: center;
  }
}
