:root {
      --bg: #070815;
      --card: #121528;
      --accent: #3b82f6;
      --accent-soft: rgba(59,130,246,0.15);
      --text-main: #f9fafb;
      --text-muted: #9ca3af;
      --border: #1f2937;
      --error: #f97373;
      --success: #4ade80;
      --radius: 16px;
    }

    * {
      box-sizing: border-box;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        sans-serif;
    }

    body {
      margin: 0;
      padding: 0;
      min-height: 100vh;
      background: radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
      color: var(--text-main);
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .app {
      width: min(900px, 100%);
      padding: 24px 16px 32px;
    }

    .card {
      background: var(--card);
      border-radius: var(--radius);
      padding: 24px 20px 28px;
      border: 1px solid var(--border);
      box-shadow: 0 24px 60px rgba(15,23,42,0.8);
    }

    h1 {
      font-size: 1.7rem;
      margin: 0 0 4px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    h1 span.logo-dot {
      width: 10px;
      height: 10px;
      border-radius: 999px;
      background: var(--accent);
      box-shadow: 0 0 16px var(--accent);
    }

    .subtitle {
      font-size: 0.95rem;
      color: var(--text-muted);
      margin-bottom: 20px;
    }

    .row {
      display: flex;
      flex-wrap: wrap;
      gap: 18px;
      align-items: center;
      margin-bottom: 18px;
    }

    .file-input-label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 14px;
      border-radius: 999px;
      border: 1px dashed var(--accent);
      background: rgba(15,23,42,0.7);
      cursor: pointer;
      font-size: 0.9rem;
    }

    .file-input-label span.icon {
      font-size: 1rem;
    }

    .file-input-label span.text-muted {
      color: var(--text-muted);
    }

    input[type="file"] {
      display: none;
    }

    button {
      border: none;
      cursor: pointer;
      border-radius: 999px;
      padding: 10px 18px;
      font-size: 0.95rem;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: background 0.16s ease, transform 0.05s ease, box-shadow 0.16s ease, opacity 0.1s;
    }

    button.primary {
      background: var(--accent);
      color: white;
      box-shadow: 0 10px 30px rgba(37,99,235,0.45);
    }

    button.primary:active {
      transform: translateY(1px);
      box-shadow: 0 4px 16px rgba(37,99,235,0.35);
    }

    button.secondary {
      background: rgba(15,23,42,0.9);
      border: 1px solid var(--border);
      color: var(--text-muted);
    }

    button:disabled {
      opacity: 0.6;
      cursor: default;
      box-shadow: none;
      transform: none;
    }

    .status {
      font-size: 0.85rem;
      color: var(--text-muted);
      min-height: 1.2em;
    }

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

    .status.success {
      color: var(--success);
    }

    .result-wrapper {
      margin-top: 18px;
      border-radius: 12px;
      background: #020617;
      border: 1px solid rgba(148,163,184,0.25);
      padding: 12px;
    }

    .result-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 8px;
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .badge {
      padding: 3px 9px;
      border-radius: 999px;
      background: var(--accent-soft);
      color: #bfdbfe;
      font-size: 0.75rem;
    }

    textarea#result {
      width: 100%;
      min-height: 260px;
      max-height: 420px;
      resize: vertical;
      border-radius: 8px;
      border: none;
      padding: 10px;
      font-size: 0.9rem;
      line-height: 1.4;
      background: #020617;
      color: var(--text-main);
      outline: none;
      font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      box-shadow: inset 0 0 0 1px rgba(31,41,55,0.9);
    }

    textarea#result::placeholder {
      color: #4b5563;
    }

    .footer {
      margin-top: 10px;
      font-size: 0.78rem;
      color: var(--text-muted);
      display: flex;
      justify-content: space-between;
      gap: 8px;
      align-items: center;
      opacity: 0.8;
    }

    .footer a {
      color: var(--accent);
      text-decoration: none;
      font-weight: 500;
    }

    @media (max-width: 640px) {
      .card {
        padding: 20px 16px 22px;
      }
      .row {
        flex-direction: column;
        align-items: stretch;
      }
      .file-input-label,
      button {
        width: 100%;
        justify-content: center;
      }
      .result-meta {
        flex-direction: column;
        align-items: flex-start;
      }
      textarea#result {
        min-height: 200px;
      }
    }