/* ==================================================
   RESET
================================================== */

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


/* ==================================================
   VARIABLES
================================================== */

:root {
  --bg: #050505;
  --panel: #0b0b0b;
  --panel2: #101010;
  --border: #242424;

  --text: #f5f5f5;
  --muted: #858585;

  --green: #00ff88;
  --green2: #00c96b;

  --red: #ff4545;
}


/* ==================================================
   HTML / BODY
================================================== */

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;

  background:
    radial-gradient(
      circle at top,
      #101a15 0,
      #050505 38%,
      #050505 100%
    );

  color: var(--text);

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}


/* Background Grid */

body::before {
  content: "";

  position: fixed;
  inset: 0;

  pointer-events: none;

  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: 40px 40px;
}


/* ==================================================
   GLOBAL
================================================== */

button,
input {
  font-family: inherit;
}

button {
  outline: none;
}

.app {
  width: 100%;
  min-height: 100vh;
}


/* ==================================================
   TOP BAR
================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;

  height: 76px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 7%;

  background: rgba(5, 5, 5, 0.82);

  border-bottom: 1px solid var(--border);

  backdrop-filter: blur(12px);
}


/* ==================================================
   BRAND
================================================== */

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


/* Logo */

.logo {
  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  overflow: hidden;

  background: #080808;

  border: 1px solid var(--green);

  color: var(--green);

  font-size: 20px;
  font-weight: 900;

  box-shadow:
    0 0 18px rgba(0, 255, 136, 0.15);
}

.logo img {
  width: 100%;
  height: 100%;

  padding: 5px;

  object-fit: contain;
}

.logo-fallback {
  font-size: 21px;
}


/* Brand Text */

.brand h1 {
  font-size: 15px;
  letter-spacing: 2px;
}

.brand span {
  display: block;

  margin-top: 2px;

  color: var(--green);

  font-size: 9px;
  letter-spacing: 2px;
}


/* ==================================================
   TOP STATUS
================================================== */

.status-top {
  color: #8d8d8d;

  font-size: 10px;
  letter-spacing: 1px;
}

.status-top i {
  display: inline-block;

  width: 7px;
  height: 7px;

  margin-right: 6px;

  border-radius: 50%;

  background: var(--green);

  box-shadow:
    0 0 10px var(--green);
}


/* ==================================================
   MAIN
================================================== */

main {
  width: min(920px, 92%);

  margin: auto;

  padding: 75px 0 60px;
}


/* ==================================================
   HERO
================================================== */

.hero {
  margin-bottom: 42px;

  text-align: center;
}


/* Badge */

.badge {
  display: inline-block;

  margin-bottom: 22px;

  padding: 8px 13px;

  color: var(--green);

  background: rgba(0, 255, 136, 0.04);

  border: 1px solid #1e4c37;
  border-radius: 100px;

  font-size: 10px;
  letter-spacing: 1.5px;
}


/* Hero Title */

.hero h2 {
  font-size: clamp(38px, 7vw, 70px);

  line-height: 0.98;

  letter-spacing: -3px;

  font-weight: 800;
}

.hero h2 b {
  color: var(--green);
}


/* Hero Description */

.hero p {
  max-width: 560px;

  margin: 22px auto 0;

  color: var(--muted);

  font-size: 14px;

  line-height: 1.7;
}


/* ==================================================
   CARD
================================================== */

.card {
  margin-bottom: 18px;

  padding: 25px;

  background: rgba(11, 11, 11, 0.9);

  border: 1px solid var(--border);
  border-radius: 14px;

  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.2);
}


/* Card Header */

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;
}

.card-title h3 {
  font-size: 12px;
  letter-spacing: 1.5px;
}

.card-title p {
  margin-top: 5px;

  color: #666;

  font-size: 11px;
}


/* ==================================================
   STATUS BADGE
================================================== */

.waiting {
  padding: 5px 8px;

  color: #666;

  border: 1px solid #292929;
  border-radius: 5px;

  font-size: 9px;
}

.waiting.running {
  color: var(--green);
  border-color: #155d3b;
}

.waiting.success {
  color: var(--green);
  border-color: #155d3b;
}

.waiting.error {
  color: var(--red);
  border-color: #5e2222;
}


/* ==================================================
   DROP ZONE
================================================== */

.drop-zone {
  position: relative;

  min-height: 220px;

  margin-top: 22px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  border: 1px dashed #333;
  border-radius: 12px;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  background: rgba(0, 255, 136, 0.025);

  border-color: var(--green);
}


/* Upload Icon */

.upload-icon {
  width: 54px;
  height: 54px;

  display: grid;
  place-items: center;

  margin-bottom: 14px;

  color: var(--green);

  border: 1px solid #333;
  border-radius: 10px;

  font-size: 25px;
}


/* Upload Text */

.drop-zone h4 {
  font-size: 14px;
}

.drop-zone p {
  margin-top: 8px;

  color: #777;

  font-size: 12px;
}

.drop-zone small {
  margin-top: 13px;

  color: #444;

  font-size: 9px;

  letter-spacing: 1px;
}


/* Hidden File Input */

.drop-zone input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;

  pointer-events: none;
}


/* File Name */

.file-name {
  display: none;

  max-width: 90%;

  margin-top: 14px;

  color: var(--green);

  font-size: 11px;

  text-align: center;

  word-break: break-all;
}


/* ==================================================
   ACTIONS
================================================== */

.actions {
  display: flex;

  gap: 10px;

  margin-top: 15px;
}

.primary,
.secondary {
  height: 43px;

  padding: 0 17px;

  border-radius: 8px;

  cursor: pointer;

  font-size: 10px;

  font-weight: 700;

  letter-spacing: 1px;
}


/* Primary */

.primary {
  flex: 1;

  color: #001b0d;

  background: var(--green);

  border: 1px solid var(--green);
}

.primary:hover:not(:disabled) {
  box-shadow:
    0 0 25px rgba(0, 255, 136, 0.18);
}

.primary:disabled {
  opacity: 0.35;

  cursor: not-allowed;
}


/* Secondary */

.secondary {
  color: #aaa;

  background: #111;

  border: 1px solid #292929;
}

.secondary:hover {
  color: white;

  border-color: #555;
}


/* ==================================================
   CONSOLE STATUS
================================================== */

.console-line {
  min-height: 16px;

  margin-top: 15px;

  color: #666;

  font-size: 10px;
}

.console-line.success {
  color: var(--green);
}

.console-line.error {
  color: var(--red);
}

.console-line.running {
  color: var(--green);
}


/* ==================================================
   RESULT
================================================== */

.result {
  width: 100%;

  margin: 28px 0 35px;

  padding: 0;

  background: transparent;

  border: 0;

  animation: appear 0.3s ease;
}

.result:empty {
  display: none;
}


/* Result Title */

.result-title {
  margin: 0 0 20px;

  color: #f5f5f5;

  font-size: 28px;

  font-weight: 800;

  letter-spacing: -1px;
}


/* ==================================================
   CONFIG ITEM
================================================== */

.config-item {
  width: 100%;

  margin-bottom: 16px;

  overflow: hidden;

  background: #0b0b0b;

  border: 1px solid #242424;
  border-radius: 16px;

  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.25);
}


/* ==================================================
   CONFIG HEADER
================================================== */

.config-header {
  min-height: 58px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding: 0 15px 0 17px;

  background: #101010;

  border-bottom: 1px solid #202020;
}


/* Config Name */

.config-name {
  display: flex;
  align-items: center;

  gap: 6px;

  color: #f5f5f5;

  font-size: 14px;

  font-weight: 700;
}


/* ==================================================
   COPY BUTTON
================================================== */

.config-copy {
  height: 36px;

  padding: 0 14px;

  color: #aaa;

  background: #151515;

  border: 1px solid #292929;
  border-radius: 8px;

  cursor: pointer;

  font-size: 9px;

  font-weight: 800;

  letter-spacing: 1px;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.config-copy:hover {
  color: var(--green);

  background: rgba(0, 255, 136, 0.04);

  border-color: #155d3b;
}


/* ==================================================
   CONFIG VALUE
================================================== */

.config-value {
  min-height: 58px;

  padding: 17px;

  color: #bcefd3;

  background: #070707;

  font-family: monospace;

  font-size: 11px;

  line-height: 1.8;

  white-space: pre-wrap;

  word-break: break-word;

  overflow-wrap: anywhere;
}


/* Payload */

.config-value.payload {
  max-height: 420px;

  overflow-y: auto;

  scrollbar-width: thin;
}


/* ==================================================
   RAW RESULT
================================================== */

.raw-title {
  margin: 0 0 10px;

  color: #777;

  font-size: 10px;

  letter-spacing: 1px;
}


/* ==================================================
   FOOTER
================================================== */

footer {
  width: min(920px, 92%);

  margin: auto;

  display: flex;
  justify-content: space-between;

  padding: 20px 0 30px;

  color: #444;

  border-top: 1px solid #181818;

  font-size: 9px;

  letter-spacing: 1px;
}


/* ==================================================
   ANIMATION
================================================== */

@keyframes appear {

  from {
    opacity: 0;

    transform:
      translateY(8px);
  }

  to {
    opacity: 1;

    transform:
      translateY(0);
  }

}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 650px) {

  .topbar {
    padding: 0 4%;
  }


  .status-top {
    display: none;
  }


  main {
    padding-top: 45px;
  }


  .hero h2 {
    letter-spacing: -2px;
  }


  .card {
    padding: 17px;
  }


  .actions {
    flex-direction: column;
  }


  .result-title {
    margin-bottom: 18px;

    font-size: 27px;
  }


  .config-item {
    margin-bottom: 14px;

    border-radius: 16px;
  }


  .config-header {
    min-height: 56px;

    padding:
      0 13px
      0 15px;
  }


  .config-name {
    font-size: 13px;
  }


  .config-copy {
    height: 35px;

    padding: 0 13px;
  }


  .config-value {
    padding: 16px;

    font-size: 10px;

    line-height: 1.8;
  }


  footer {
    flex-direction: column;

    gap: 8px;
  }

}
