/* ============================================
   FileForge — Redesigned Style Sheet
   ============================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --bg-elevated: #1e1e2a;

  --text-primary: #f0f0f5;
  --text-secondary: #9494a8;
  --text-muted: #5e5e72;

  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-glow: rgba(108, 92, 231, 0.3);
  --accent-subtle: rgba(108, 92, 231, 0.1);

  --success: #00cec9;
  --success-glow: rgba(0, 206, 201, 0.3);
  --error: #ff6b6b;
  --error-glow: rgba(255, 107, 107, 0.3);

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Animated Background ---- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  width: 600px;
  height: 600px;
  background: var(--accent-glow);
  top: -200px;
  right: -100px;
  opacity: 0.4;
  animation: float1 20s ease-in-out infinite;
}

.bg-glow-2 {
  width: 500px;
  height: 500px;
  background: rgba(0, 206, 201, 0.15);
  bottom: -150px;
  left: -100px;
  opacity: 0.3;
  animation: float2 25s ease-in-out infinite;
}

.bg-glow-3 {
  width: 400px;
  height: 400px;
  background: rgba(255, 118, 117, 0.1);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.2;
  animation: float3 30s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-80px, 60px); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(60px, -80px); }
}

@keyframes float3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-link:hover {
  color: var(--accent-light);
}
.nav-badge {
  background: yellow;
  color: black;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border: 1px solid;
  border: #164d83;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: var(--shadow-yellow);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.2s;
}

.nav-link:hover::after {
  width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  z-index: 1;
  padding: 140px 24px 80px;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--accent-subtle);
  border: 1px solid rgba(108, 92, 231, 0.2);
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-light), var(--success), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px var(--accent-glow);
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.hero-formats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-format-tag {
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   CONVERTER SECTION
   ============================================ */
.converter-section {
  position: relative;
  z-index: 1;
  padding: 40px 24px 80px;
}

.converter-inner {
  max-width: 680px;
  margin: 0 auto;
}

.converter-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.converter-bg-illustration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent-light);
  pointer-events: none;
  z-index: 0;
}

.converter-card > *:not(.converter-bg-illustration) {
  position: relative;
  z-index: 1;
}

/* ---- Drop Zone ---- */
.drop-zone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.drop-zone.drag-over {
  transform: scale(1.01);
}

.drop-icon-wrapper {
  color: var(--accent-light);
  margin-bottom: 20px;
  animation: bob 3s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.drop-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.drop-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.browse-btn {
  background: none;
  border: none;
  color: var(--accent-light);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: var(--font);
}

.browse-btn:hover {
  color: var(--accent);
}

.drop-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- File Info ---- */
.file-info {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.file-info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.file-icon-wrapper {
  width: 48px;
  height: 48px;
  background: var(--accent-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  flex-shrink: 0;
}

.file-details {
  flex: 1;
  min-width: 0;
}

.file-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.remove-file-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.remove-file-btn:hover {
  background: var(--error-glow);
  color: var(--error);
}

/* ---- Format Selection ---- */
.format-section {
  margin-bottom: 24px;
}

.format-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.format-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.format-chip {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.format-chip:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-subtle);
}

.format-chip.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  box-shadow: 0 0 16px var(--accent-glow);
}

/* ---- Convert Button ---- */
.convert-btn {
  width: 100%;
  padding: 18px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.convert-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.convert-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.convert-btn:not(:disabled):active {
  transform: translateY(0);
}

/* ---- Progress ---- */
.progress-section {
  text-align: center;
  padding: 48px 0;
  animation: fadeIn 0.3s ease;
}

.progress-spinner {
  width: 52px;
  height: 52px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.progress-bar-track {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

/* ---- Result ---- */
.result-section {
  text-align: center;
  padding: 40px 0;
  animation: fadeIn 0.3s ease;
}

.result-icon {
  color: var(--success);
  margin-bottom: 20px;
  animation: popIn 0.4s ease;
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.result-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--success);
}

.result-detail {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.result-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--success), #00b894);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--success-glow);
}

.convert-another-btn {
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.convert-another-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ---- Error ---- */
.error-section {
  text-align: center;
  padding: 40px 0;
  animation: fadeIn 0.3s ease;
}

.error-icon {
  color: var(--error);
  margin-bottom: 20px;
}

.error-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--error);
}

.error-detail {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.try-again-btn {
  padding: 14px 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--error);
  background: transparent;
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.try-again-btn:hover {
  background: var(--error-glow);
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-section {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
}

.features-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.feature-icon-purple {
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent-light);
}

.feature-icon-teal {
  background: rgba(0, 206, 201, 0.15);
  color: var(--success);
}

.feature-icon-coral {
  background: rgba(255, 107, 107, 0.15);
  color: var(--error);
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   SUPPORTED FORMATS SECTION
   ============================================ */
.formats-section {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
}

.formats-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.formats-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.format-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
  transition: all 0.2s ease;
}

.format-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.format-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.format-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.format-card-icon.doc {
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent-light);
}

.format-card-icon.sheet {
  background: rgba(0, 206, 201, 0.15);
  color: var(--success);
}

.format-card-icon.data {
  background: rgba(253, 203, 110, 0.15);
  color: #fdcb6e;
}

.format-card-icon.web {
  background: rgba(255, 118, 117, 0.15);
  color: #ff7675;
}

.format-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.format-card-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.format-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background-color: #164d83; /* Dark background */
    color: #a0a0a0;
    padding: 60px 5%;
    font-family: 'Segoe UI', sans-serif;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand { max-width: 400px; }
.logo-box { display: flex; align-items: center; gap: 10px; color: #fff; margin-bottom: 15px; }

.footer-links h3, .footer-social h3 { color: #fff; margin-bottom: 20px; border-bottom: 2px solid #00c853; display: inline-block; padding-bottom: 5px;}

.footer-links ul { list-style: none; padding: 0; }
.footer-links a { color: #a0a0a0; text-decoration: none; display: block; margin-bottom: 10px; }

.social-icons { display: flex; gap: 15px; }
.social-icons a { 
    background: #1a1e22; color: #fff; padding: 12px; border-radius: 8px; 
    text-decoration: none; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;
}

.footer-bottom {
    border-top: 1px solid #1a1e22;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .formats-cards {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .nav-links {
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 120px 20px 60px;
  }

  .hero-title {
    font-size: 32px;
    letter-spacing: -1px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .converter-card {
    padding: 24px;
  }

  .drop-zone {
    padding: 36px 16px;
  }

  .drop-title {
    font-size: 18px;
  }

  .section-title {
    font-size: 24px;
  }

  .format-grid {
    gap: 6px;
  }

  .format-chip {
    padding: 6px 12px;
    font-size: 12px;
  }

  .nav-links {
    display: none;
  }
}