:root {
  --bg-color: #050a14;
  --card-bg: rgba(30, 41, 59, 0.7);
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 20px 20px;
  position: relative;
}

/* Vignette overlay for depth */
body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    transparent 0%,
    rgba(0, 0, 0, 0.8) 100%
  );
  pointer-events: none;
  z-index: -1;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  z-index: 1;
  position: relative;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* Footer Styles */
.site-footer {
  position: relative;
  margin-top: auto; /* Push to bottom */
  width: 100%;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.6) 0%,
    rgba(15, 23, 42, 0.9) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

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

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-logo-img {
  height: 50px;
  width: auto;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.footer-logo-img:hover {
  opacity: 1;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 300px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-section h4 {
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.footer-section a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-section a:hover {
  color: var(--primary);
  transform: translateX(2px);
}

.footer-section a i {
  flex-shrink: 0;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: var(--primary);
}

.copyright {
  opacity: 0.7;
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .site-footer {
    padding: 2rem 1.5rem 1.5rem;
  }
}

/* Beta Banner */
.beta-banner {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.2),
    rgba(147, 51, 234, 0.2)
  );
  border-bottom: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.75rem 1rem;
  backdrop-filter: blur(10px);
}

.beta-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-main);
  justify-content: center;
  text-align: center;
}

.beta-content svg {
  flex-shrink: 0;
  color: var(--primary);
}

.beta-content a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 500;
}

.beta-content a:hover {
  color: var(--primary-hover);
}

/* Header Styles */
.site-header {
  width: 100%;
  background: rgba(15, 23, 42, 0.6); /* Slightly darker for contrast */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0; /* Remove margin as it's separate now */
  position: relative;
  z-index: 50;
}

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

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Push items to edges */
  gap: 2rem;
  width: 100%;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.3));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.header-text {
  text-align: left;
}

.header-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: #fff;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-text p {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.header-nav {
  display: flex;
  align-items: center;
}

.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.github-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Responsive Header */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .logo-area {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .header-text {
    text-align: center;
  }

  .logo {
    height: 48px; /* Larger on mobile when stacked */
  }

  .header-text h1 {
    font-size: 1.5rem;
  }
}

/* Mobile small adjustments */
@media (max-width: 480px) {
  .header-container {
    padding: 1.5rem 1rem;
  }

  .header-text h1 {
    font-size: 1.25rem;
  }
}

/* Options Area - Format Selector */
.options-area {
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  background: rgba(30, 41, 59, 0.4);
  padding: 0.75rem 1.5rem;
  border-radius: 999px; /* Pill shape */
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  z-index: 20; /* Ensure tooltip stacks over upload area */
}

.format-label-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.options-area label {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: help;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.info-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
  opacity: 1;
}

.info-icon svg {
  width: 14px;
  height: 14px;
}

.options-area select {
  padding: 0.5rem 2rem 0.5rem 1rem;
  background-color: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  min-width: 120px;
}

.options-area select:hover {
  color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.options-area select:focus {
  color: var(--primary);
}

/* Format Tooltip Styling */
.format-tooltip {
  position: absolute;
  top: calc(100% + 1rem); /* Slight gap */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 1); /* Darker, more solid */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  width: 360px; /* Fixed width for consistency */
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 100;
  backdrop-filter: blur(20px);
  animation: tooltipFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 467px) {
  .format-tooltip {
    width: 90%;
  }
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.tooltip-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 600;
}

.tooltip-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.tooltip-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.tooltip-close svg {
  width: 18px;
  height: 18px;
}

.tooltip-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 99;
}

.format-option {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.format-option:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(59, 130, 246, 0.3);
}

.format-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  color: var(--primary);
}

.format-option p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: left;
}
.upload-area {
  background: rgba(30, 41, 59, 0.3);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 4rem 2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.upload-area:hover .icon {
  opacity: 1;
  transform: scale(1.1);
  color: var(--primary);
}

.icon svg {
  width: 4rem;
  height: 4rem;
  color: inherit;
}

.upload-area h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.upload-area p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.browse-btn {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  position: relative;
}

.browse-btn::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--primary);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.upload-area:hover .browse-btn::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.status-area {
  margin-top: 2.5rem;
  background: rgba(30, 41, 59, 0.4);
  padding: 3rem 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transform-origin: top;
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: scaleY(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scaleY(1) translateY(0);
  }
}

/* Button Styles */
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 1.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.reset-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.875rem 1.5rem;
  border-radius: 999px; /* Pill shape */
  margin-top: 1.5rem;
  cursor: pointer;
  margin-left: 0.75rem;
  transition: all 0.2s;
  font-weight: 500;
}

.reset-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

/* Spinner Modernization */
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(59, 130, 246, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
  margin: 0 auto 1.5rem;
}

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

/* Batch Processing Styles */
.batch-area {
  margin-top: 2rem;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.batch-area h3 {
  margin-bottom: 1.5rem;
  color: var(--text-main);
  font-size: 1.25rem;
}

.batch-progress {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.file-progress-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.3s ease;
}

.file-progress-card.processing {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.file-progress-card.completed {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.05);
}

.file-progress-card.error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.05);
}

.file-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.file-name {
  font-weight: 500;
  color: var(--text-main);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 1rem;
}

.file-size {
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-fill.error {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.file-status {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.size-comparison {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
  white-space: nowrap;
}

.download-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.5rem;
  transition: color 0.2s;
}

.download-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.batch-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.download-all-btn {
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: white;
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.download-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.download-all-btn:active {
  transform: translateY(0);
}

.download-all-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .file-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

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

  .download-all-btn,
  .reset-btn {
    width: 100%;
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  overflow-y: auto;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-main);
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: all 0.2s;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body .last-updated {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-style: italic;
  margin-bottom: 2rem;
}

.modal-body h3 {
  color: var(--text-main);
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.modal-body h3:first-of-type {
  margin-top: 0;
}

.modal-body p {
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.modal-body ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.modal-body li {
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.modal-body a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

.modal-body a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.modal-body strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Responsive modal adjustments */
@media (max-width: 640px) {
  .modal {
    padding: 0;
    align-items: flex-start;
  }

  .modal-content {
    max-height: 100vh;
    border-radius: 0;
    height: 100vh;
  }

  .modal-header {
    padding: 1rem 1.5rem;
  }

  .modal-header h2 {
    font-size: 1.25rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-body h3 {
    font-size: 1rem;
  }
}

[hidden] {
  display: none !important;
}
