/* HTML Projects Upload Page Styles */
/* Based on DKFile color scheme: Deep teal (#00695C, #004D40), grays (#F8FAFC, #E2E8F0, #64748B, #2C3E50), blue (#3498DB), golden (#F0E0C0) */

.html-projects-upload-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #00695C 0%, #004D40 100%);
  padding: 2rem 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #F0E0C0;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
}

/* Upload Methods Section */
.upload-methods-section {
  margin-bottom: 3rem;
}

.upload-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.upload-method-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(30, 125, 125, 0.1);
  border: 1px solid #E2E8F0;
  transition: all 0.3s ease;
}

.upload-method-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px rgba(30, 125, 125, 0.15);
}

.upload-method-card.local-upload {
  background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
}

.upload-method-card.online-editor {
  background: linear-gradient(135deg, #F0E0C0 0%, #E6D4B0 100%);
  color: #00695C;
}

.method-header {
  text-align: center;
  margin-bottom: 2rem;
}

.method-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.method-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #2C3E50;
}

.upload-method-card.online-editor .method-title {
  color: #00695C;
}

.method-description {
  font-size: 1rem;
  color: #64748B;
  line-height: 1.6;
}

.upload-method-card.online-editor .method-description {
  color: #00695C;
  opacity: 0.8;
}

.method-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.method-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.upload-method-card.local-upload .method-btn {
  background: #1E7D7D;
  color: white;
}

.upload-method-card.local-upload .method-btn:hover {
  background: #165F5F;
  transform: translateY(-2px);
}

.upload-method-card.online-editor .method-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.upload-method-card.online-editor .method-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.method-scenario {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #E2E8F0;
}

.upload-method-card.online-editor .method-scenario {
  border-top-color: rgba(255, 255, 255, 0.2);
}

.scenario-text {
  font-size: 0.9rem;
  color: #64748B;
  margin: 0;
}

.upload-method-card.online-editor .scenario-text {
  color: rgba(255, 255, 255, 0.8);
}

.help-link {
  color: #1E7D7D;
  text-decoration: none;
  font-size: 0.9rem;
}

.help-link:hover {
  text-decoration: underline;
}

.arrow-icon {
  font-size: 1.5rem;
  color: #F0E0C0;
}

/* File Upload Section */
.file-upload-section {
  margin-bottom: 3rem;
}

.upload-section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.batch-upload-trigger {
  background: linear-gradient(135deg, #3498DB 0%, #2980B9 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.batch-upload-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

.upload-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(30, 125, 125, 0.1);
  border: 1px solid #E2E8F0;
}

.upload-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2C3E50;
  margin-bottom: 2rem;
  text-align: center;
}

/* File Statistics */
.file-stats {
  background: #F8FAFC;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid #E2E8F0;
}

.stats-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stats-text {
  font-weight: 600;
  color: #2C3E50;
}

.stats-detail {
  font-size: 0.9rem;
  color: #64748B;
}

/* Tips Section */
.tips-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #F0E0C0;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
}

.tip-text p {
  margin: 0;
  color: #2C3E50;
  font-size: 0.9rem;
}

.featured-benefits {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.benefit-icon {
  font-size: 2rem;
}

.benefit-text strong {
  color: #1E7D7D;
  font-size: 1rem;
}

.benefit-text p {
  margin: 0.25rem 0 0 0;
  font-size: 0.85rem;
  color: #64748B;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed #1E7D7D;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(30, 125, 125, 0.05) 0%, rgba(42, 139, 139, 0.05) 100%);
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 2rem;
}

.upload-zone:hover {
  border-color: #2A8B8B;
  background: linear-gradient(135deg, rgba(30, 125, 125, 0.1) 0%, rgba(42, 139, 139, 0.1) 100%);
}

.upload-zone.dragover {
  border-color: #2A8B8B;
  background: linear-gradient(135deg, rgba(30, 125, 125, 0.15) 0%, rgba(42, 139, 139, 0.15) 100%);
  transform: scale(1.02);
}

.upload-zone-content {
  max-width: 500px;
  margin: 0 auto;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #1E7D7D;
}

.upload-zone-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2C3E50;
  margin-bottom: 1rem;
}

.upload-zone-description {
  font-size: 1rem;
  color: #64748B;
  margin-bottom: 0.5rem;
}

.upload-zone-info {
  font-size: 0.9rem;
  color: #64748B;
  margin-bottom: 2rem;
}

.select-files-btn {
  background: #1E7D7D;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.select-files-btn:hover {
  background: #165F5F;
  transform: translateY(-2px);
}

/* Selected Files */
.selected-files {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #F8FAFC;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
}

.selected-files h4 {
  margin: 0 0 1rem 0;
  color: #2C3E50;
  font-size: 1.1rem;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: white;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-name {
  font-weight: 600;
  color: #2C3E50;
}

.file-size {
  font-size: 0.9rem;
  color: #64748B;
}

.file-remove {
  background: #E74C3C;
  color: white;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.file-remove:hover {
  background: #C0392B;
}

/* Upload Actions */
.upload-actions {
  text-align: center;
}

.upload-btn {
  background: linear-gradient(135deg, #1E7D7D 0%, #2A8B8B 100%);
  color: white;
  border: none;
  padding: 1.25rem 3rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
}

.upload-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(30, 125, 125, 0.3);
}

.upload-btn:disabled {
  background: #64748B;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Projects List Section */
.projects-list-section {
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2C3E50;
}

.refresh-btn {
  background: #3498DB;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.refresh-btn:hover {
  background: #2980B9;
  transform: translateY(-2px);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(30, 125, 125, 0.1);
  border: 1px solid #E2E8F0;
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 25px rgba(30, 125, 125, 0.15);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.project-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2C3E50;
  margin: 0;
}

.project-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.project-badge.featured {
  background: #F0E0C0;
  color: #1E7D7D;
}

.project-info {
  margin-bottom: 1.5rem;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #64748B;
}

.project-actions {
  display: flex;
  gap: 0.75rem;
}

.project-btn {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  font-size: 0.9rem;
}

.project-btn.view {
  background: #3498DB;
  color: white;
}

.project-btn.view:hover {
  background: #2980B9;
}

.project-btn.edit {
  background: #1E7D7D;
  color: white;
}

.project-btn.edit:hover {
  background: #165F5F;
}

.project-btn.delete {
  background: #E74C3C;
  color: white;
}

.project-btn.delete:hover {
  background: #C0392B;
}

/* Loading and Status */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #E2E8F0;
  border-top: 4px solid #1E7D7D;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.status-message {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-weight: 600;
}

.status-message.success {
  background: #D5F4E6;
  color: #1E7D7D;
  border: 1px solid #A7F3D0;
}

.status-message.error {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.status-message.info {
  background: #DBEAFE;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .upload-methods-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .method-actions {
    flex-direction: column;
  }

  .method-btn {
    width: 100%;
    justify-content: center;
  }

  .tips-section {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .upload-zone {
    padding: 2rem 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 2rem;
  }

  .upload-card {
    padding: 1.5rem;
  }

  .upload-zone {
    padding: 1.5rem 1rem;
  }

  .upload-zone-title {
    font-size: 1.1rem;
  }

  .upload-zone-description,
  .upload-zone-info {
    font-size: 0.85rem;
  }
}

/* Project URL Display */
.project-url {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: #F8FAFC;
  border-radius: 4px;
}

.url-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: 'Courier New', monospace;
  background: white;
  color: #64748B;
}

.url-input:focus {
  outline: none;
  border-color: #1E7D7D;
}

.copy-url-btn {
  padding: 0.5rem 1rem;
  background: #1E7D7D;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.copy-url-btn:hover {
  background: #2A8B8B;
  transform: translateY(-1px);
}

.copy-url-btn:active {
  transform: translateY(0);
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification.success {
  border-left: 4px solid #2A8B8B;
  color: #1E7D7D;
}

.notification.error {
  border-left: 4px solid #EF4444;
  color: #DC2626;
}

.notification.info {
  border-left: 4px solid #3B82F6;
  color: #2563EB;
}

.notification.warning {
  border-left: 4px solid #F59E0B;
  color: #D97706;
}
