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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

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

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

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

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

.storage-info {
  margin-top: 10px;
  font-size: 0.85rem;
  opacity: 0.95;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 15px;
  border-radius: 20px;
  display: inline-block;
}

main {
  padding: 30px;
}

.upload-area {
  border: 3px dashed #667eea;
  border-radius: 15px;
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-area:hover {
  background: #f8f9ff;
  border-color: #764ba2;
}

.upload-area.drag-over {
  background: #f0f4ff;
  border-color: #764ba2;
  transform: scale(1.02);
}

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

.upload-area h2 {
  color: #333;
  margin-bottom: 10px;
}

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

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
  margin: 5px;
}

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

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

.btn-success {
  background: #48bb78;
  color: white;
}

.btn-success:hover {
  background: #38a169;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

.btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

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

.file-info {
  background: #f7fafc;
  border-radius: 15px;
  padding: 30px;
  text-align: center;
}

.file-info h3 {
  color: #333;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 10px;
}

.info-row .label {
  font-weight: 600;
  color: #4a5568;
}

.progress-container {
  text-align: center;
  padding: 30px;
}

.progress-container h3 {
  color: #333;
  margin-bottom: 20px;
}

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

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s;
  border-radius: 15px;
}

#progressText {
  color: #4a5568;
  font-weight: 600;
  font-size: 1.1rem;
}

.result-container {
  text-align: center;
  padding: 30px;
}

.result-container h3 {
  color: #48bb78;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.result-container > p {
  color: #4a5568;
  margin-bottom: 20px;
}

.link-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.link-container input {
  flex: 1;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
}

.warning {
  background: #fff5e6;
  border-left: 4px solid #f6ad55;
  padding: 15px;
  margin: 20px 0;
  border-radius: 5px;
  text-align: left;
  color: #744210;
  font-size: 0.9rem;
}

footer {
  background: #f7fafc;
  padding: 20px;
  text-align: center;
  color: #4a5568;
  font-size: 0.9rem;
}

.download-container {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.loading {
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #e2e8f0;
  border-top: 5px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.file-ready {
  width: 100%;
}

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

.error-container {
  text-align: center;
}

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

.error-container h2 {
  color: #e53e3e;
  margin-bottom: 15px;
}

#errorMessage {
  color: #4a5568;
}

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

  header p {
    font-size: 0.8rem;
  }

  .storage-info {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  main {
    padding: 20px;
  }

  .upload-area {
    padding: 30px 20px;
  }

  .upload-icon {
    font-size: 3rem;
  }

  .link-container {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
