@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:wght@300;400;600&display=swap');



:root {
    --bg:        #0e1117;
    --surface:   #161b24;
    --border:    #252d3d;
    --accent:    #3b82f6;
    --accent-dim:#1d4ed8;
    --text:      #e2e8f0;
    --muted:     #64748b;
    --success:   #22c55e;
    --error:     #ef4444;
    --mono:      'IBM Plex Mono', monospace;
    --sans:      'IBM Plex Sans', sans-serif;
}

body {
    background: var(--bg) !important;
    color: var(--text);
    font-family: var(--sans);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Subtle grid background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

/* Header */
.header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.header-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.header h1 {
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--text);
}

.header h1 strong {
    font-weight: 600;
}

/* Card */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2rem;
}

/* Form fields */
.field {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
    font-family: var(--mono);
    font-size: 1rem;
    padding: 0.65rem 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--accent);
}

button[type="submit"] {
    width: 100%;
    background: var(--accent);
    border: none;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.75rem;
    margin-top: 0.5rem;
    text-transform: uppercase;
    transition: background 0.2s, transform 0.1s;
}

button[type="submit"]:hover  { background: var(--accent-dim); }
button[type="submit"]:active { transform: scale(0.98); }
button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status bar */
.status {
    display: none;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding: 0.65rem 0.85rem;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 0.78rem;
    border: 1px solid transparent;
}

.status.loading {
    display: flex;
    border-color: var(--border);
    color: var(--muted);
}

.status.error {
    display: flex;
    border-color: var(--error);
    color: var(--error);
    background: rgba(239, 68, 68, 0.07);
}

.status.success {
    display: flex;
    border-color: var(--success);
    color: var(--success);
    background: rgba(34, 197, 94, 0.07);
}

/* Spinner */
.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* JSON output section */
#output-section {
    display: none;
    margin-top: 1.5rem;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.output-title {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--muted);
    text-transform: uppercase;
}

.copy-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--muted);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    text-transform: uppercase;
    transition: border-color 0.2s, color 0.2s;
}

.copy-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: #7dd3fc;
    font-family: var(--mono);
    font-size: 0.75rem;
    line-height: 1.6;
    max-height: 420px;
    overflow: auto;
    padding: 1rem;
    white-space: pre;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.7rem;
    color: var(--muted);
    font-family: var(--mono);
}
