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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f1117;
    color: #e1e4e8;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

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

header {
    text-align: center;
    padding: 1.5rem 0 1rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.subtitle {
    font-size: 0.875rem;
    color: #8b949e;
    margin-top: 0.25rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.25rem;
    background: #161b22;
    border-radius: 0.5rem;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}

.tab {
    flex: 1;
    padding: 0.625rem 0;
    border: none;
    background: transparent;
    color: #8b949e;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tab:hover {
    color: #e1e4e8;
}

.tab.active {
    background: #21262d;
    color: #fff;
}

/* Forms */
.form {
    display: none;
}

.form.active {
    display: block;
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #8b949e;
    margin-bottom: 0.375rem;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 0.375rem;
    color: #e1e4e8;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: #58a6ff;
}

.field textarea {
    resize: vertical;
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 0.8125rem;
}

.field.checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #e1e4e8;
}

.field.checkbox input {
    width: auto;
}

.btn {
    width: 100%;
    padding: 0.75rem;
    background: #238636;
    border: none;
    border-radius: 0.375rem;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn:hover {
    background: #2ea043;
}

.btn:active {
    background: #1a7f37;
}

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

/* QR result */
.qr-result {
    text-align: center;
    padding: 1.5rem 0;
}

.qr-result img {
    max-width: 100%;
    width: 320px;
    height: auto;
    border-radius: 0.5rem;
    background: #fff;
    padding: 1rem;
}

.instruction {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #8b949e;
}

/* Error */
.error {
    background: #3d1f28;
    border: 1px solid #f85149;
    color: #f85149;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.hidden {
    display: none !important;
}
