/* ═══════════════════════════════════════════════
   暗夜二次元 · Cyberpunk Theme
   ═══════════════════════════════════════════════ */
:root {
    --bg:        #05060f;
    --surface:   #0a0c1a;
    --card:      #0d0f22;
    --card-hover:#111428;
    --border:    #1c1f3a;
    --accent:    #00b4d8;
    --accent2:   #48cae4;
    --glow:      rgba(0, 180, 216, 0.2);
    --glow2:     rgba(72, 202, 228, 0.12);
    --text:      #c8d0f0;
    --text-dim:  #6b74b0;
    --text-mute: #3a3f70;
    --success:   #3ddc97;
    --error:     #e05c8a;
    --warn:      #e0b05c;
    --radius:    14px;
    --radius-sm: 8px;
}

/* ── 浅色主题 ── */
[data-theme="light"] {
    --bg:        #eef2ff;
    --surface:   #ffffff;
    --card:      #f8faff;
    --card-hover:#f0f4ff;
    --border:    #cdd2ee;
    --accent:    #0066bb;
    --accent2:   #3399dd;
    --glow:      rgba(0, 102, 187, 0.15);
    --glow2:     rgba(51, 153, 221, 0.1);
    --text:      #1a2235;
    --text-dim:  #4a5580;
    --text-mute: #8890b8;
    --success:   #0faa6a;
    --error:     #cc3366;
    --warn:      #cc8800;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 20px 100px;
    transition: background 0.3s, color 0.3s;
    position: relative;
}

/* 深层氛围背景 - 深邃又有层次 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(0, 180, 216, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 70% 50% at 80% 100%, rgba(72, 202, 228, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(20, 20, 50, 0.4) 0%, transparent 70%),
        #05060f;
    pointer-events: none;
    z-index: 0;
    transition: background 0.3s;
}

[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(0, 102, 187, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 70% 50% at 80% 100%, rgba(51, 153, 221, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(200, 210, 240, 0.4) 0%, transparent 70%),
        #dce3f5;
}

/* 细微噪点纹理 */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 740px;
}

/* ── Header ── */
.header {
    text-align: center;
    margin-bottom: 36px;
}

.logo {
    font-size: 64px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 20px var(--glow));
}

.header h1 {
    font-size: 30px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.header p {
    font-size: 14px;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

/* ── Top Bar ── */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.top-bar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent2);
}

.top-actions { display: flex; gap: 8px; align-items: center; }

.icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.icon-link img {
    width: 20px; height: 20px;
    object-fit: contain;
    border-radius: 3px;
}

.icon-link:hover {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--glow);
}

.icon-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    color: var(--text-dim);
}

.icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 12px var(--glow);
}

.icon-btn.active { border-color: var(--accent2); color: var(--accent2); }

/* ── Card ── */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 16px;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.35); }

/* ── Form ── */
.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-label .tag {
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 20px;
    background: var(--glow);
    color: var(--accent);
    border: 1px solid var(--accent);
    font-weight: 400;
}

.input-wrap { position: relative; }

textarea {
    width: 100%;
    padding: 16px 60px 16px 18px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 140px;
    line-height: 1.7;
    outline: none;
    transition: border-color 0.2s, background 0.3s;
}

textarea.drag-over {
    border-color: var(--accent);
    background: rgba(0, 180, 216, 0.05);
    box-shadow: 0 0 16px var(--glow);
}

.drop-hint {
    display: none;
    font-size: 12px;
    color: var(--accent);
    text-align: center;
    padding: 8px;
    border: 2px dashed var(--accent);
    border-radius: var(--radius-sm);
    margin-top: 8px;
    background: rgba(0, 180, 216, 0.05);
    transition: all 0.2s;
}

.drop-hint.show { display: block; }

textarea:focus { border-color: var(--accent); }
textarea:disabled { opacity: 0.5; cursor: not-allowed; }
textarea.invalid { border-color: var(--error); animation: shake 0.3s; }
textarea.valid { border-color: var(--success); }

.input-actions {
    position: absolute;
    right: 8px;
    top: 8px;
    display: flex;
    gap: 4px;
}

.paste-btn {
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-dim);
    transition: all 0.2s;
    white-space: nowrap;
}

.paste-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.clear-btn { margin-left: 6px; }
.clear-btn:hover { background: var(--error) !important; border-color: var(--error) !important; color: #fff !important; }

.input-hint {
    font-size: 12px;
    margin-top: 8px;
    height: 18px;
    color: var(--text-mute);
}

.input-hint.ok { color: var(--success); }
.input-hint.bad { color: var(--error); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.url-count {
    font-size: 12px;
    color: var(--text-mute);
    text-align: right;
    margin-top: 6px;
}

/* ── Submit ── */
.submit-row { display: flex; gap: 10px; align-items: center; margin-top: 16px; }

.submit-btn {
    flex: 1;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 3px;
    transition: all 0.25s;
    box-shadow: 0 4px 24px var(--glow);
    position: relative;
    overflow: hidden;
}

.submit-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.4s;
}

.submit-btn:hover:not(:disabled)::after { left: 150%; }

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--glow);
}

.submit-btn:active:not(:disabled) { transform: translateY(0) scale(0.99); }

.submit-btn:disabled {
    background: var(--border);
    box-shadow: none;
    cursor: not-allowed;
    color: var(--text-mute);
    transform: none;
}

.queue-badge {
    background: var(--warn);
    color: #000;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    display: none;
}

.queue-badge.show { display: block; }

.shortcut {
    text-align: center;
    font-size: 12px;
    color: var(--text-mute);
    margin-top: 10px;
}

/* ── Batch Progress ── */
.batch-progress {
    display: none;
    margin-top: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
}

.batch-progress.show { display: block; animation: fadeIn 0.3s; }

.bp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-dim);
}

.bp-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.bp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
}

.bp-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer { to { left: 200%; } }

/* ── Queue Visualization ── */
.queue-viz-wrap {
    display: none;
    margin-top: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
}

.queue-viz-wrap.show { display: block; animation: fadeIn 0.3s; }

.queue-viz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}

.qv-hint {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-dim);
}

.queue-viz {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.qv-item.running {
    border-color: rgba(0, 180, 216, 0.55);
    background: rgba(0, 180, 216, 0.1);
    box-shadow: 0 0 16px rgba(0, 180, 216, 0.1);
}

.qv-item.success {
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.12);
}

.qv-item.error {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
}

.qv-idx {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qv-item.running .qv-idx {
    background: var(--accent);
    color: #000;
    animation: pulse 1.2s ease infinite;
}

.qv-item.success .qv-idx { background: var(--success); color: #000; }
.qv-item.error .qv-idx { background: var(--error); color: #fff; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(0, 180, 216, 0); }
}

.qv-url {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-dim);
    font-size: 12px;
}

.qv-item.success .qv-url { color: var(--success); }
.qv-item.error .qv-url { color: var(--error); }

.qv-label {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.qv-item.idle .qv-label { background: rgba(255,255,255,0.06); color: var(--text-dim); }
.qv-item.running .qv-label { background: rgba(0, 180, 216, 0.15); color: var(--accent); }
.qv-item.success .qv-label { background: rgba(16,185,129,0.15); color: var(--success); }
.qv-item.error .qv-label { background: rgba(239,68,68,0.15); color: var(--error); }

.qv-time {
    font-size: 11px;
    margin-left: 6px;
    opacity: 0.8;
}

.qv-spin {
    animation: spin 1s linear infinite;
}

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

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

/* ── Result Cards ── */
.results-section { display: none; margin-bottom: 16px; }
.results-section.show { display: block; }

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
}

.results-summary { font-size: 12px; font-weight: 400; }
.results-summary .ok { color: var(--success); margin-left: 6px; }
.results-summary .fail { color: var(--error); margin-left: 4px; }

.result-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: background 0.2s, box-shadow 0.2s;
    animation: fadeIn 0.3s;
}

.result-card:hover { background: var(--card-hover); box-shadow: 0 4px 20px var(--glow); }
.result-card.success { border-color: rgba(16, 185, 129, 0.45); }
.result-card.error { border-color: rgba(239, 68, 68, 0.45); }
.result-card.running { border-color: rgba(0, 180, 216, 0.5); }

.result-icon { font-size: 26px; flex-shrink: 0; margin-top: 2px; }

.result-info { flex: 1; min-width: 0; }

.result-url {
    font-size: 14px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
    cursor: pointer;
    font-weight: 500;
}

.result-url:hover { color: var(--accent2); }

.result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 20px;
    font-weight: 600;
}

.tag.running { background: var(--glow); color: var(--accent); }
.tag.ok { background: rgba(16,185,129,0.15); color: var(--success); }
.tag.fail { background: rgba(239,68,68,0.15); color: var(--error); }
.tag.id { background: rgba(94,207,176,0.12); color: var(--accent2); }

.result-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; flex-wrap: wrap; }

.dl-btn {
    padding: 5px 14px;
    background: var(--success);
    color: #000 !important;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.dl-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.dl-btn:hover::before { opacity: 1; }

.dl-btn:hover {
    opacity: 1;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(78, 203, 142, 0.45);
}

.dl-btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 8px rgba(78, 203, 142, 0.3);
}

.dl-btn .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.dl-btn:hover .arrow {
    animation: bounceDown 0.6s ease infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

.copy-btn {
    padding: 5px 10px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-mute);
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover { border-color: var(--accent2); color: var(--accent2); }
.copy-btn.copied { border-color: var(--success); color: var(--success); }

.retry-btn {
    padding: 5px 10px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-mute);
    cursor: pointer;
    transition: all 0.2s;
}

.retry-btn:hover { border-color: var(--warn); color: var(--warn); }

/* ── History ── */
.history-section { display: none; margin-bottom: 16px; }
.history-section.show { display: block; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
}

.mini-btn {
    padding: 4px 12px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-mute);
    cursor: pointer;
    transition: all 0.2s;
}

.mini-btn:hover { border-color: var(--accent2); color: var(--accent2); }

.history-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-mute);
    font-size: 13px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-size: 13px;
    transition: background 0.2s;
}

.history-item:hover { background: var(--card-hover); }

.history-icon { font-size: 16px; flex-shrink: 0; }

.history-url {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dim);
    cursor: pointer;
}

.history-url:hover { color: var(--accent2); }

.history-time { font-size: 11px; color: var(--text-mute); white-space: nowrap; }

.history-dl {
    padding: 4px 10px;
    background: var(--success);
    color: #000 !important;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.history-dl:hover { opacity: 0.8; }

.history-retry {
    padding: 4px 10px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 11px;
    color: var(--text-mute);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.history-retry:hover { border-color: var(--accent2); color: var(--accent2); }

/* ── Reset ── */
.reset-row { text-align: center; margin-top: 12px; display: none; }
.reset-row.show { display: block; }

.reset-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-mute);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.reset-btn:hover { border-color: var(--error); color: var(--error); }

/* ── Tips ── */
.tips {
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-mute);
    line-height: 2;
}

.tips strong { color: var(--text-dim); }

.dev-info {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 40px;
    font-size: 12px;
    color: var(--text-mute);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.dev-sep { opacity: 0.5; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Responsive ── */
@media (max-width: 480px) {
    body { padding: 20px 12px 60px; }
    .card { padding: 20px 16px; }
    .header h1 { font-size: 20px; }
    textarea { font-size: 15px; }
    .result-card { flex-wrap: wrap; }
    .result-actions { width: 100%; justify-content: flex-end; }
}
 /* 程序开发者：君临：226666429 */