[v-cloak] {
    display: none;
}

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

:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --success: #16a34a;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 40%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.1), transparent 35%),
        var(--bg);
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 20px 64px;
}

.header {
    margin-bottom: 28px;
    text-align: center;
}

.brand {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.main {
    width: 100%;
    max-width: 640px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 28px 24px;
}

.card h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.hint {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.6;
}

.form-item {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
}

.input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.share-box {
    margin: 18px 0 4px;
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.share-row {
    display: flex;
    gap: 8px;
}

.share-row .input {
    flex: 1;
    min-width: 0;
    font-size: 12px;
}

.meta {
    margin: 0 0 12px;
    line-height: 1.6;
    word-break: break-all;
}

.meta.url {
    color: var(--muted);
    font-size: 14px;
}

.label {
    display: inline-block;
    min-width: 42px;
    margin-right: 8px;
    color: var(--muted);
    font-size: 13px;
}

.code {
    margin: 0;
    padding: 14px 16px;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 13px;
    overflow-x: auto;
    line-height: 1.5;
}

.actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-ghost {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    background: #f9fafb;
}

.progress-wrap {
    margin-top: 8px;
}

.progress-bar {
    height: 10px;
    border-radius: 999px;
    background: #eef2ff;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    transition: width 0.2s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.error-text {
    margin: 16px 0 0;
    color: var(--danger);
    font-size: 14px;
}

.toast-list {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    min-width: 220px;
    max-width: 90vw;
    padding: 10px 14px;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-size: 14px;
    box-shadow: var(--shadow);
    text-align: center;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.loading,
.toast.info {
    background: #1f2937;
}

code {
    padding: 2px 6px;
    border-radius: 6px;
    background: #eef2ff;
    color: #1e40af;
    font-size: 0.95em;
}

@media (max-width: 640px) {
    .page {
        padding: 32px 16px 48px;
    }

    .card {
        padding: 22px 18px;
    }

    .actions {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }
}
