:root {
  --bg: #0d0e0d;
  --surface: #141615;
  --surface2: #1c1d1c;
  --surface3: #242624;

  --border: rgba(255, 255, 255, 0.06);
  --border2: rgba(255, 255, 255, 0.12);

  --text: #f1f5f9;
  --text2: #94a3b8;
  --text3: #475569;

  --blue: #0f3bfe;
  --blue-lt: #3d62fe;
  --blue-dim: #93aaff;
  --blue-dim2: rgba(15, 59, 254, 0.15);

  --green: #c0f58b;
  --green-dk: #86c65a;
  --green-dim: rgba(192, 245, 139, 0.12);

  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.15);

  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Work Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
}

.erro-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.erro-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 56px 48px;
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.erro-status {
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 16px;
  color: var(--red);
}

.erro-mensagem {
  font-size: 16px;
  color: var(--text2);
  margin-bottom: 32px;
  line-height: 1.5;
}

.erro-link {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition:
    border-color 0.2s,
    color 0.2s;
}

.erro-link:hover {
  border-color: var(--blue);
  color: var(--blue-dim);
}

.hub-page {
  min-height: 100vh;
  padding: 48px 24px;
}

.fxbg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.gridbg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(
      rgba(192, 245, 139, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(192, 245, 139, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(
    ellipse 80% 70% at 50% 40%,
    #000 25%,
    transparent 78%
  );
  mask-image: radial-gradient(
    ellipse 80% 70% at 50% 40%,
    #000 25%,
    transparent 78%
  );
}

.glow1,
.glow2 {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(14px);
}

.glow1 {
  width: 55vw;
  height: 55vw;
  top: -24vw;
  right: -16vw;
  background: radial-gradient(
    circle,
    rgba(192, 245, 139, 0.06),
    transparent 62%
  );
  animation: breathe 13s ease-in-out infinite;
}

.glow2 {
  width: 45vw;
  height: 45vw;
  bottom: -22vw;
  left: -14vw;
  background: radial-gradient(circle, rgba(15, 59, 254, 0.07), transparent 62%);
  animation: breathe 16s ease-in-out infinite reverse;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.06);
  }
}

.scan {
  position: fixed;
  left: 0;
  right: 0;
  height: 110px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(192, 245, 139, 0.025),
    transparent
  );
  animation: scan 14s linear infinite;
}

@keyframes scan {
  0% {
    top: -14%;
  }
  100% {
    top: 110%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glow1,
  .glow2,
  .scan {
    animation: none;
  }
}

.hub {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
}

.hub-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.hub-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-logo {
  height: 32px;
}

.hub-logo-team {
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--green);
}

.glow-card {
  --glow-bright: var(--green);
  --glow-deep: var(--green-dk);
  --edge: 0;
  --angle: 0deg;
  position: relative;
  border-radius: 12px;
  isolation: isolate;
}

.glow-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  transition:
    border-color 0.2s,
    transform 0.2s,
    background 0.2s;
}

.glow-card::before,
.glow-card::after {
  content: '';
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(
    from var(--angle),
    var(--glow-bright) 0deg,
    var(--glow-deep) 38deg,
    transparent 104deg,
    transparent 256deg,
    var(--glow-deep) 322deg,
    var(--glow-bright) 360deg
  );
  opacity: min(1, calc(var(--edge) / 55));
  transition: opacity 0.25s ease;
}

.glow-card::before {
  inset: 0;
  padding: 2.5px;
  z-index: 2;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.glow-card::after {
  inset: -6px;
  z-index: 0;
  filter: blur(18px);
  opacity: min(1, calc(var(--edge) / 50));
}

@media (prefers-reduced-motion: reduce) {
  .glow-card::before,
  .glow-card::after {
    transition: none;
  }
}

.converter-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.converter-card {
  width: 100%;
  max-width: 480px;
}

#converter-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 40px 24px;
  border: 1.5px dashed var(--border2);
  border-radius: 10px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--green);
  background: var(--green-dim);
}

.upload-area.has-file {
  border-style: solid;
  border-color: var(--green-dk);
}

.upload-area.loading {
  opacity: 0.6;
  pointer-events: none;
}

.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.upload-icon {
  color: var(--text2);
  margin-bottom: 6px;
}

.upload-label {
  font-size: 15px;
  font-weight: 600;
}

.upload-sub {
  font-size: 13px;
  color: var(--text2);
}

.upload-link {
  color: var(--green);
  text-decoration: underline;
}

.upload-filename {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  word-break: break-all;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--green-dim);
  border: 1px solid var(--green-dk);
  border-radius: 6px;
}

.file-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
}

.file-item-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  border-radius: 3px;
  transition: color 0.15s;
}

.file-item-remove:hover {
  color: var(--red);
}

.format-selector {
  display: flex;
  gap: 8px;
}

.format-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border2);
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}

.format-btn:hover {
  border-color: var(--green-dk);
  color: var(--text);
}

.format-btn.active {
  border-color: var(--green);
  background: var(--green-dim);
  color: var(--green);
}

.status-msg {
  font-size: 13px;
  min-height: 18px;
}

.status-msg.status-error {
  color: var(--red);
}

.btn-primary {
  width: 100%;
  background: var(--green);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    filter 0.2s,
    transform 0.2s;
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
