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

:root {
  --white: #ffffff;
  --text: #082f49;
  --muted: #0369a1;
  --primary: #0066cc;
  --secondary: #0284c7;
  --accent: #00e5ff;
  --border: rgba(0, 102, 204, 0.25);
  --shadow: 0 15px 35px -8px rgba(0, 102, 204, 0.18);
  --glass: rgba(255, 255, 255, 0.92);
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: 
    radial-gradient(circle at 10% 10%, rgba(0, 229, 255, 0.12), transparent 30%),
    radial-gradient(circle at 90% 90%, rgba(0, 102, 204, 0.15), transparent 35%),
    linear-gradient(135deg, #e0f2fe 0%, #bae6fd 50%, #7dd3fc 100%);
}

a {
  text-decoration: none;
  color: inherit;
}

/* TOPBAR / HEADER */
.topbar {
  width: 100%;
  padding: 12px 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

img.logo-img, .logo img {
  height: 60px !important;
  width: auto !important;
  object-fit: contain !important;
  display: block !important;
  transition: height 0.3s ease;
}

.nav {
  display: flex;
  gap: 12px;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 700;
  color: #003366;
  background: var(--white);
  padding: 10px 22px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  transition: all 0.25s ease;
}

.nav a:hover, .nav a.active {
  background: #f0f9ff;
  border-color: #0066cc;
  color: #0066cc;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-btn {
  border: 1.5px solid var(--border);
  background: var(--white);
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #003366, #0066cc);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(0, 51, 102, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #002244, #004499);
  transform: translateY(-2px);
}

/* MAIN & CONVERTIDOR CARD */
.converter-page {
  flex: 1;
  padding: 35px 5% 50px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}

.converter-hero {
  text-align: center;
  margin-bottom: 25px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #003366;
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.converter-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  color: #002244;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 10px;
}

.converter-hero p {
  color: #0c4a6e;
  font-size: clamp(0.88rem, 2vw, 0.98rem);
  font-weight: 500;
  max-width: 600px;
  margin: 0 auto;
}

.converter-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.field-group {
  margin-bottom: 20px;
}

.field-group label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #003366;
  margin-bottom: 8px;
}

.select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.select-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #0066cc;
  pointer-events: none;
  font-size: 0.85rem;
}

.drop-zone {
  border: 2px dashed #0066cc;
  border-radius: 20px;
  padding: 32px 16px;
  text-align: center;
  background: rgba(240, 249, 255, 0.65);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.drop-zone:hover, .drop-zone.dragover {
  background: #e0f2fe;
  border-color: #003366;
  transform: scale(0.99);
}

.drop-icon {
  font-size: 2.5rem;
  color: #0066cc;
  margin-bottom: 8px;
}

.drop-zone h3 {
  font-size: 1.15rem;
  color: #003366;
  margin-bottom: 4px;
  font-weight: 700;
}

.drop-zone p {
  color: #0369a1;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.file-limits {
  display: inline-block;
  font-size: 0.78rem;
  color: #0284c7;
  background: #ffffff;
  padding: 4px 14px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid var(--border);
}

.preview-box {
  margin-top: 18px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  color: #0369a1;
  font-size: 0.9rem;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  word-break: break-all;
}

.actions-group {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-remove {
  padding: 12px 18px;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-remove:hover {
  background: #fca5a5;
}

.btn-convert {
  flex: 1;
  padding: 12px 20px;
}

.status-message {
  margin-top: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 0.92rem;
  color: #003366;
  min-height: 22px;
}

/* FOOTER */
.footer {
  padding: 30px 5% 25px;
}

.footer-content {
  background: linear-gradient(135deg, #001e38, #003366);
  color: var(--white);
  border-radius: 24px;
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-brand h2 {
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 1.6rem;
}

.footer-brand p {
  color: #bae6fd;
  font-size: 0.88rem;
  max-width: 320px;
  line-height: 1.45;
}

.footer-links-container {
  display: flex;
  gap: 35px;
  flex-wrap: wrap;
}

.footer-column h4 {
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: var(--white);
}

.footer-column a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bae6fd;
  margin-bottom: 8px;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--accent);
}

/* REGLAS RESPONSIVE (MÓVILES Y TABLETS) */
@media (max-width: 768px) {
  .topbar {
    padding: 10px 4%;
  }

  img.logo-img, .logo img {
    height: 40px !important;
  }

  .nav {
    display: none; /* Se oculta la navegación repetida para mantener 1 sola fila limpia */
  }

  .lang-btn {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .btn-nav {
    padding: 8px 14px;
    font-size: 0.8rem;
    border-radius: 10px;
  }

  .converter-page {
    padding: 20px 3% 35px;
  }

  .converter-card {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .drop-zone {
    padding: 24px 12px;
  }

  .drop-icon {
    font-size: 2.2rem;
  }

  .actions-group {
    flex-direction: column-reverse; /* El botón de convertir principal queda arriba en móviles */
  }

  .btn-remove {
    width: 100%;
  }

  .btn-convert {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    padding: 22px;
    gap: 25px;
  }

  .footer-links-container {
    width: 100%;
    justify-content: space-between;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  img.logo-img, .logo img {
    height: 34px !important;
  }

  .top-actions {
    gap: 6px;
  }

  .btn-nav {
    padding: 7px 10px;
    font-size: 0.75rem;
  }

  .converter-hero h1 {
    font-size: 1.45rem;
  }
}