/* static/css/resources/download_center.css */

/* Base Styles */
.download-section {
  padding: 2rem 0 4rem;
  background: linear-gradient(135deg, #f8fafc 0%, rgba(37, 99, 235, 0.05) 100%);
  min-height: 80vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Stats Section */
.stats-section {
  margin-bottom: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(226, 232, 240, 0.5);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.15);
}

.stat-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 0.25rem 0;
  font-family: 'Inter', sans-serif;
}

.stat-label {
  color: #64748b;
  font-weight: 500;
  margin: 0;
}

/* Search Section */
.search-section {
  margin-bottom: 3rem;
}

.search-container {
  max-width: 600px;
  margin: 0 auto;
}

.search-box {
  position: relative;
  background: white;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.search-box:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 4px 30px rgba(37, 99, 235, 0.2);
}

.search-icon {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 1.1rem;
  z-index: 2;
}

.search-input {
  width: 100%;
  padding: 1.25rem 1.5rem 1.25rem 3.5rem;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  background: transparent;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(37, 99, 235, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--brand-blue);
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-clear:hover {
  background: rgba(37, 99, 235, 0.2);
  color: var(--brand-blue-dark);
}

.search-results-count {
  text-align: center;
  margin-top: 1rem;
  color: #64748b;
  font-weight: 500;
}

/* Files Section */
.files-section {
  margin-bottom: 4rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.section-title i {
  color: var(--brand-blue);
  margin-right: 0.5rem;
}

.section-subtitle {
  color: #64748b;
  font-size: 1.1rem;
  margin-top: 2rem;
}

/* Files Grid */
.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.file-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.5);
}

.file-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.file-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.file-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.file-icon .fa-file-pdf { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.file-icon .fa-file-word { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.file-icon .fa-file-excel { background: linear-gradient(135deg, #059669, #047857); }
.file-icon .fa-file-powerpoint { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.file-icon .fa-file-archive { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.file-icon .fa-file-image { background: linear-gradient(135deg, #ea580c, #c2410c); }
.file-icon .fa-file { background: linear-gradient(135deg, #64748b, #475569); }

.file-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.file-type {
  background: rgba(254, 207, 7, 0.1);
  color: var(--brand-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(254, 207, 7, 0.3);
}

.file-size {
  color: #64748b;
  font-size: 0.875rem;
}

.file-content {
  margin-bottom: 0.5rem; /* Reduced margin since no download button */
}

.file-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.file-description {
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.file-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.file-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.875rem;
}

.file-stat i {
  color: #94a3b8;
}

/* Remove file-actions section - no longer needed */
.file-actions {
  display: none;
}

/* Enhanced File Overlay - now the primary interaction */
.file-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 31, 77, 0.95), rgba(37, 99, 235, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  pointer-events: none;
  cursor: pointer;
}

.file-card:hover .file-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Add subtle hover hint to file cards */
.file-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(37, 99, 235, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.file-card:hover::after {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  color: white;
  padding: 2rem;
  transform: translateY(10px);
  transition: transform 0.4s ease 0.1s;
}

.file-card:hover .overlay-content {
  transform: translateY(0);
}

.overlay-content h4 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.overlay-content p {
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.5;
  font-size: 0.95rem;
}

.overlay-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--brand-yellow);
  color: var(--brand-dark);
  text-decoration: none;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(254, 207, 7, 0.3);
  position: relative;
  overflow: hidden;
}

.overlay-download-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.overlay-download-btn:hover::before {
  left: 100%;
}

.overlay-download-btn:hover {
  background: #ffdb4d;
  transform: translateY(-3px) scale(1.05);
  color: var(--brand-dark);
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(254, 207, 7, 0.5);
}

.overlay-download-btn i {
  font-size: 1.1rem;
}

/* No Files/Results Messages */
.no-files-message,
.no-results-message {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.no-files-icon,
.no-results-icon {
  font-size: 4rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.no-files-message h3,
.no-results-message h3 {
  color: #475569;
  margin-bottom: 0.5rem;
}

.no-files-message p,
.no-results-message p {
  color: #64748b;
}

/* Help Section */
.help-section {
  margin-bottom: 3rem;
}

.help-content {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.help-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 1.5rem;
}

.help-content h3 i {
  color: var(--brand-blue);
  margin-right: 0.5rem;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.help-item h4 {
  color: #1a202c;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.help-item p {
  color: #64748b;
  line-height: 1.6;
}

.help-item a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.help-item a:hover {
  text-decoration: underline;
}

/* Recent Section */
.recent-file-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.recent-file-content {
  flex: 1;
}

.recent-file-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 0.25rem;
}

.recent-file-content p {
  color: #64748b;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.recent-file-date {
  color: #94a3b8;
  font-size: 0.75rem;
}

.recent-download-btn {
  padding: 0.5rem;
  background: var(--brand-blue);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recent-download-btn:hover {
  background: var(--brand-blue-dark);
  transform: scale(1.1);
  color: white;
  text-decoration: none;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.loading-spinner i {
  font-size: 2rem;
  color: var(--brand-blue);
  margin-bottom: 1rem;
}

.loading-spinner p {
  color: var(--brand-dark);
  margin: 0;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-card {
    padding: 1.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .files-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .file-card {
    padding: 1.25rem;
  }

  .help-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .search-input {
    padding: 1rem 1rem 1rem 3rem;
  }
}

@media (max-width: 480px) {
  .download-section {
    padding: 1rem 0 2rem;
  }

  .file-stats {
    flex-direction: column;
    gap: 0.5rem;
  }

  .search-box {
    border-radius: 12px;
  }

  .search-input {
    font-size: 0.875rem;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .recent-file {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .recent-download-btn {
    align-self: flex-end;
  }
}

/* Animation Classes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.recent-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 1.5rem;
}

.recent-section h3 i {
  color: var(--brand-blue);
  margin-right: 0.5rem;
}

.recent-files {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recent-file {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.recent-file:hover {
  background: #f1f5f9;
  transform: translateX(4px);
}
