/* ===== Global Reset & Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Smooth scrolling for anchor navigation */
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: var(--muted);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Container & Layout Optimization ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  animation: fadeInUp 0.8s ease-out;
}

/* Page Load Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 50px 0 50px;
  position: relative;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  color: #000000;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: rgba(42, 219, 92, 0.3);
}

.hero-subtitle {
  font-size: 1.3rem;
  color: #666666;
  font-weight: 500;
  margin-bottom: 16px;
  display: inline-block;
}

.hero-description {
  font-size: 1.1rem;
  color: #666666;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== Minimalist Card Design ===== */
.card {
  background: #ffffff;
  border: none;

  padding: 40px;
  margin-bottom: 32px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  animation: slideIn 0.6s ease-out;
  animation-fill-mode: both;
}

.card:nth-child(2) {
  animation-delay: 0.1s;
}

.card:nth-child(3) {
  animation-delay: 0.2s;
}

.card:nth-child(4) {
  animation-delay: 0.3s;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--muted);
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: #000000;

}

/* ===== Features Section ===== */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-item {
  text-align: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.02);

  transition: all 0.3s ease;
  position: relative;
}

.feature-item:hover {
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.05);
}

.feature-icon {
  margin-bottom: 16px;
  display: block;
  color: #000000;
}

.feature-icon svg {
  stroke: currentColor;
}

.feature-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}

.feature-item p {
  font-size: 0.9rem;
  color: #666666;
  line-height: 1.5;
}

/* ===== Minimalist Upload Area ===== */
.upload-zone {
  border: 2px dashed rgba(0, 0, 0, 0.3);
  padding: 60px 40px;
  text-align: center;
  background: #ffffff;
  cursor: pointer;

  transition: all 0.3s ease;
  position: relative;
}

.upload-zone:hover {
  border-color: rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.02);
  transform: translateY(-1px);
}

.upload-zone.dragover {
  border-color: #000000;
  background: rgba(0, 0, 0, 0.05);
}

.upload-icon {
  margin-bottom: 16px;
  color: #000000;
}

.upload-icon svg {
  stroke: currentColor;
}

.upload-text {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 500;
}

.upload-hint {
  font-size: 0.9rem;
  color: #999999;
}

input[type="file"] {
  display: none;
}

/* ===== File Info ===== */
.file-info {
  display: none;
  padding: 20px;
  background: rgba(0, 0, 0, 0.05);
  margin-top: 24px;

  animation: fadeIn 0.5s ease-out;
}

.file-info.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.file-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.file-type {
  display: inline-block;
  padding: 6px 16px;
  background: #2adb5c;
  color: white !important;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 20px !important;

}

/* ===== Use Cases Section ===== */
.use-cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .use-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.use-case-item {
  padding: 24px;
  background: rgba(0, 0, 0, 0.02);

  border-left: 3px solid #000000;
  transition: all 0.3s ease;
}

.use-case-item:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateX(4px);
}

.use-case-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.use-case-item p {
  font-size: 0.9rem;
  color: #666666;
  line-height: 1.5;
}

/* ===== Formats Section ===== */
.formats-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .formats-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

.format-group h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
  text-align: center;
}

.format-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.format-tag {
  padding: 6px 12px;
  background: #000000;
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 20px !important;
  transition: all 0.3s ease;

}

.format-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== Preset Options ===== */
.presets {
  display: none;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

.presets.active {
  display: grid;
  animation: fadeIn 0.6s ease-out;
}

@media (min-width: 768px) {
  .presets {
    grid-template-columns: repeat(2, 1fr);
  }
}

.preset-item {
  padding: 20px 24px;
  background: rgba(0, 0, 0, 0.02);

  cursor: pointer;
  transition: all 0.3s ease;
}

.preset-item:not(.selected):hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: #333;
  transform: translateY(-1px);
}

.preset-item.selected {
  background: rgb(42 219 92 / 10%);
  border-color: rgb(42 219 92 / 80%);
}

.preset-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.preset-description {
  font-size: 0.9rem;
  color: #666666;
}

/* ===== Input Area ===== */
.input-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}

textarea,
input[type="text"] {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid #e5e5e5;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  resize: vertical;
  min-height: 100px;
  background: #ffffff;
  color: var(--muted);

  transition: all 0.3s ease;
}

textarea::placeholder,
input[type="text"]::placeholder {
  color: #999999;
}

textarea:focus,
input[type="text"]:focus {
  outline: none;
  border-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* ===== Minimalist Button System ===== */
.btn {
  display: inline-block;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;

  transition: all 0.3s ease;
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: #000000;
  color: white;
}

.btn-primary:hover {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-primary:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
}

.btn-success {
  background: #666666;
  color: white;
}

.btn-success:hover {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 102, 102, 0.3);
}

/* ===== FAQ Section ===== */
.faq-list {
  margin-top: 24px;
}

.faq-item {
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.02);

  transition: all 0.3s ease;
}

.faq-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.faq-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.faq-item p {
  font-size: 0.9rem;
  color: #666666;
  line-height: 1.5;
}

/* ===== Advantages Section ===== */
.advantages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.advantage-item {
  text-align: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.02);

  transition: all 0.3s ease;
}

.advantage-item:hover {
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.05);
}

.advantage-icon {
  margin-bottom: 16px;
  display: block;
  color: #000000;
}

.advantage-icon svg {
  stroke: currentColor;
}

.advantage-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.advantage-item p {
  font-size: 0.9rem;
  color: #666666;
  line-height: 1.5;
}

/* ===== Loading & Status Indicators ===== */
.processing {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.processing.active {
  display: block;
  animation: fadeIn 0.5s ease-out;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: #000000;
  animation: spin 1.5s linear infinite;
  margin: 0 auto 20px;
  border-radius: 50%;

}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Result Display ===== */
.result {
  display: none;
  padding: 32px;
  background: rgba(102, 102, 102, 0.05);
  border: 1px solid rgba(102, 102, 102, 0.2);
  margin-top: 24px;

  animation: slideInUp 0.6s ease-out;
}

.result.active {
  display: block;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error {
  display: none;
  padding: 32px;
  background: rgba(245, 101, 101, 0.05);
  border: 1px solid rgba(245, 101, 101, 0.2);
  margin-top: 24px;

  animation: slideInUp 0.6s ease-out;
}

.error.active {
  display: block;
}

.error-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #e53e3e;
  margin-bottom: 12px;
}

.error-message {
  font-size: 1rem;
  color: #718096;
}

.result-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
}

.success-icon {
  font-size: 3rem;
  color: #666666;
}

.result-text {
  font-size: 1.1rem;
  color: #666666;
  font-weight: 500;
}

.command-display {
  background: rgba(0, 0, 0, 0.05);
  color: var(--muted);
  padding: 20px;
  font-family: "Fira Code", "Courier New", monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 20px 0;

  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ===== Footer ===== */
.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
  text-align: left;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
}

.footer-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}

.footer-section p {
  color: #666666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: #666666;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: #000000;
}

.footer-section a {
  color: #666666;
  text-decoration: none;
  font-weight: 500;
}

.footer-section a:hover {
  color: #000000;
  text-decoration: underline;
}

.footer-bottom {
  padding: 24px 0;
  border-top: 1px solid #e5e5e5;
  text-align: center;
}

.footer-bottom p {
  color: #999999;
  font-size: 0.8rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  body {
    padding: 16px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  header {
    padding: 40px 0 30px;
  }

  h1 {
    font-size: 2.5rem;
  }

  .card {
    padding: 24px;
    margin-bottom: 20px;
  }

  .upload-zone {
    padding: 40px 20px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .use-cases-grid {
    grid-template-columns: 1fr;
  }

  .formats-content {
    grid-template-columns: 1fr;
  }

  .advantages-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .result-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .card {
    padding: 20px;
  }

  .btn {
    padding: 14px 24px;
    font-size: 0.9rem;
  }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f5f5f5;

}

::-webkit-scrollbar-thumb {
  background: #000000;

}

::-webkit-scrollbar-thumb:hover {
  background: #333333;
}

/* ===== Style Overhaul: Align with MediaForge visual language ===== */
:root {
  --accent: #2adb5c;
  --text: #f5f5f5;
  --muted: #cccccc;
  --bg: #000000;
  --border: #222222;
}

/* Remove rounded corners globally to follow design spec */
* {}

/* Accent and typography adjustments */
body {
  color: var(--text);
  background: var(--bg);
}

.card-title::before {
  background: var(--accent);
}

.feature-icon,
.advantage-icon {
  color: var(--accent);
}

.upload-zone:hover {
  border-color: var(--accent);
}

.format-tag {
  background: var(--accent);
}

.btn-primary {
  background: var(--accent);
}

.btn-primary:hover {
  background: #22c34f;
}

/* Metrics section under hero */
.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .metrics {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-item {
  border: 1px solid var(--border);
  padding: 16px 12px;
  text-align: center;
}

.metric-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
}

.metric-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===== Dark Theme Overrides ===== */
.hero-title {
  color: var(--text);
}

.hero-subtitle,
.hero-description {
  color: var(--muted);
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: none;
}

.card-title {
  color: var(--text);
}

.feature-item,
.use-case-item,
.preset-item,
.faq-item,
.advantage-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.feature-item:hover,
.use-case-item:hover,
.faq-item:hover,
.advantage-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.feature-item h3,
.use-case-item h3,
.preset-name,
.faq-item h3,
.advantage-item h3 {
  color: var(--text);
}

.feature-item p,
.use-case-item p,
.preset-description,
.faq-item p,
.advantage-item p {
  color: var(--muted);
}

.upload-zone {
  background: var(--bg);
  border-color: rgba(255, 255, 255, 0.3);
}

.upload-zone.dragover {
  background: #0a0a0a;
}

.upload-icon {
  color: var(--text);
}

.upload-text {
  color: var(--text);
}

.upload-hint {
  color: var(--muted);
}

.file-info {
  background: rgba(255, 255, 255, 0.06);
}

.file-name {
  color: var(--text);
}

.file-type {
  color: var(--muted);
}

textarea,
input[type="text"] {
  background: #0a0a0a;
  color: var(--text);
  border: 1px solid var(--border);
}

textarea::placeholder,
input[type="text"]::placeholder {
  color: #999999;
}

.btn-success {
  background: #333333;
  color: var(--text);
}

.btn-success:hover {
  background: #444444;
}

.processing .spinner {
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
}

.result {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.result-text,
.success-icon {
  color: var(--muted);
}

.error {
  background: rgba(229, 62, 62, 0.08);
  border: 1px solid rgba(229, 62, 62, 0.3);
}

.error-title {
  color: #ff6b6b;
}

.error-message {
  color: var(--muted);
}

.command-display {
  background: #0a0a0a;
  color: var(--text);
  border: 1px solid var(--border);
}

.footer-bottom {
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  color: var(--muted);
}

/* ===== Top Navigation (Logo Bar) ===== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  /* border-bottom: 1px solid var(--border); */
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  padding-bottom: 0;
}

.nav-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  /* gap: 16px; */
  width: 100%;
  padding: 10px 30px;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 50px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav-brand {
  font-size: 1.2rem;
}

.top-nav.scrolled {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

/* Ensure upload section isn't hidden beneath sticky nav when scrolled */
#upload { scroll-margin-top: 90px; }

/* Links */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text);
}

.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: #0a0a0a;
  border: 1px solid var(--border);
  display: none;
  min-width: 180px;
  padding: 8px 0;
}

.has-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 10px 14px;
}

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-link-badge {
  position: relative;
}

.badge-new {
  margin-left: 6px;
  font-size: 0.7rem;
  color: #0a0a0a;
  background: var(--accent);
  padding: 2px 6px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.nav-small-link {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.nav-small-link:hover {
  color: var(--text);
}

.btn-outline {
  background: #ffffff;
  color: #0a0a0a;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 30px;
  text-transform: initial;
}

.btn-outline:hover {
  background: #e9e9e9;
}


@media (max-width: 768px) {
  .nav-bar {
    padding: 10px 15px;
  }
}

/* ===== Scrollbar Redesign (Edge/Chrome + Firefox) ===== */
/* Firefox support */
html {
  scrollbar-width: thin;
  scrollbar-color: #2adb5c #0b1020;
}

/* Theme-aware variables */
:root {
  --scrollbar-track: #f1f3f5;
  --scrollbar-thumb: #2adb5c;
  --scrollbar-thumb-hover: #22c34f;
  --scrollbar-border: rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: dark) {
  :root {
    --scrollbar-track: #0b1020;
    --scrollbar-thumb: #2adb5c;
    --scrollbar-thumb-hover: #22c34f;
    --scrollbar-border: rgba(255, 255, 255, 0.08);
  }
}

/* WebKit (Edge/Chrome/Safari) */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 12px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--scrollbar-thumb) 0%, #22c34f 100%);
  border-radius: 12px;
  border: 2px solid var(--scrollbar-border);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--scrollbar-thumb-hover) 0%, #27cc58 100%);
}

::-webkit-scrollbar-corner {
  background: transparent;
}
