:root { 
    --bg-color: #0f172a; 
    --card-bg: rgba(30, 41, 59, 0.7); 
    --accent-blue: #3b82f6; 
    --text-main: #f1f5f9; 
    --text-muted: #94a3b8; 
    --border-color: rgba(255, 255, 255, 0.08); 
    --teal: #3b82f6; 
    --mint: #60a5fa; 
    --pale: rgba(59, 130, 246, 0.15);
}

* { box-sizing: border-box; }

body { 
    margin: 0; 
    background-color: var(--bg-color); 
    background-image: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.18) 0%, transparent 600px); 
    background-repeat: no-repeat; 
    color: var(--text-main); 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    line-height: 1.6;
    min-height: 100vh;
}

button, input, select { font: inherit; }

/* 顶部导航：固定悬浮，且左右与下方 main (min(1280px, calc(100% - 44px))) 精准对齐 */
header { 
    position: sticky;
    top: 0;
    z-index: 100;
    height: 76px; 
    padding: 0 calc((100% - min(1280px, calc(100% - 44px))) / 2);
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    background: rgba(15, 23, 42, 0.85); 
    border-bottom: 1px solid var(--border-color); 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

header h1 { 
    font-size: clamp(19px, 2vw, 28px); 
    letter-spacing: -.035em; 
    color: var(--text-main);
    margin: 0;
}

header h1 b { 
    background: linear-gradient(to right, #ffffff, var(--accent-blue)); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.privacy { 
    padding: 6px 14px; 
    border: 1px solid rgba(59, 130, 246, 0.3); 
    border-radius: 50px; 
    background: rgba(59, 130, 246, 0.1); 
    color: var(--accent-blue); 
    font-size: 13px; 
    font-weight: 700; 
}

main { 
    width: min(1280px, calc(100% - 44px)); 
    margin: 28px auto; 
}

.grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 28px; 
}

/* 卡片容器 */
.card { 
    /* background-color: var(--card-bg);  */
    border: 1px solid var(--border-color); 
    border-radius: 14px; 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); 
    backdrop-filter: blur(4px); 
    color: var(--text-main);
}

/* 上传卡片 */
.upload { 
    min-height: 500px; 
    padding: 44px 28px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    border: 2px dashed rgba(59, 130, 246, 0.4); 
    cursor: pointer; 
    /* background: rgba(30, 41, 59, 0.4);  */
    transition: all .2s ease; 
}

.upload:hover, .upload.dragging { 
    background: rgba(59, 130, 246, 0.08); 
    border-color: var(--accent-blue); 
}

.icon { 
    width: 72px; 
    height: 72px; 
    display: grid; 
    place-items: center; 
    border-radius: 50%; 
    background: rgba(59, 130, 246, 0.15); 
    color: var(--accent-blue); 
    font-size: 36px; 
}

.upload h2 { 
    margin: 24px 0 12px; 
    font-size: 18px; 
    color: var(--text-main);
}

.link-button { 
    border: 0; 
    background: none; 
    color: var(--accent-blue); 
    font-weight: 700; 
    cursor: pointer; 
    transition: color 0.2s;
}

.link-button:hover {
    color: var(--mint);
}

.pill { 
    margin-top: 18px; 
    padding: 4px 12px; 
    border: 1px solid var(--border-color); 
    border-radius: 99px; 
    color: var(--text-muted); 
    font-size: 12px; 
}

.file-ready { 
    width: min(100%, 440px); 
    margin-top: 24px; 
    padding: 12px 16px; 
    border: 1px solid rgba(59, 130, 246, 0.3); 
    border-radius: 99px; 
    background: rgba(15, 23, 42, 0.6); 
    display: flex; 
    gap: 12px; 
    align-items: center; 
}

.file-ready b { 
    margin-left: auto; 
    /* background: var(--accent-blue);  */
    color: #fff; 
    border-radius: 50%; 
    width: 26px; 
    height: 26px; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
}

.error { 
    color: #f87171; 
    font-size: 13px; 
    margin-top: 10px;
}

/* 设置区 */
.settings { padding: 24px; }
.settings > h2 { 
    margin: 0 0 22px; 
    font-size: 1.25rem;
    color: var(--text-main);
}

.form { 
    display: grid; 
    grid-template-columns: 140px 1fr; 
    gap: 14px 18px; 
    align-items: center; 
}

.form label { 
    font-size: 14px; 
    font-weight: 600; 
    color: var(--text-muted);
}

@media(max-width:520px){
    .form label {
        display: inline-block;
        max-width: 56px;
        word-break: keep-all;
        line-height: 1.4;
    }
}

/* 输入框通用样式 */
input, select { 
    width: 100%; 
    height: 42px; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    padding: 0 12px; 
    outline: none; 
    background-color: rgba(15, 23, 42, 0.6); 
    color: var(--text-main);
    transition: all 0.2s ease;
}

/* 重点：移除原生下拉箭头，使用自定义 SVG 箭头并向左偏移 16px */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 40px; /* 留出充分空间 */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center; /* 距右侧 16px，居中对齐 */
    cursor: pointer;
}

select option {
    background-color: #1e293b;
    color: var(--text-main);
}

input:focus, select:focus { 
    border-color: var(--accent-blue); 
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25); 
}

input[readonly] { 
    background: rgba(15, 23, 42, 0.3); 
    color: var(--text-muted);
}

/* 开关按钮 */
.toggle { 
    justify-self: start; 
    width: 52px; 
    height: 28px; 
    padding: 2px; 
    border: 0; 
    border-radius: 99px; 
    background: #334155; 
    cursor: pointer;
    transition: background 0.2s;
}

.toggle span { 
    display: block; 
    width: 24px; 
    height: 24px; 
    border-radius: 50%; 
    background: #fff; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); 
    transition: transform .18s; 
}

.toggle.on { 
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 0.8)); 
}

.toggle.on span { 
    transform: translateX(24px); 
}

/* 输出区域 */
.output { 
    margin-top: 28px; 
    padding: 24px; 
}

.output-head { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start;
}

.output-head h2 { margin: 0; font-size: 1.25rem; }
.output-head p { margin: 6px 0 16px; color: var(--text-muted); font-size: 13px; }

.output-head > span { 
    height: max-content; 
    padding: 4px 12px; 
    border-radius: 99px; 
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid var(--border-color);
    color: var(--text-muted); 
    font-size: 12px; 
}

.output-head .ready { 
    background: rgba(59, 130, 246, 0.15); 
    color: var(--accent-blue); 
    border-color: rgba(59, 130, 246, 0.3);
}

.url-row { 
    min-height: 110px; 
    display: grid; 
    grid-template-columns: 1fr 132px; 
    gap: 18px; 
}

.url-row code { 
    padding: 18px 20px; 
    border-radius: 10px; 
    background: rgba(15, 23, 42, 0.6); 
    border: 1px solid var(--border-color);
    color: #93c5fd; 
    font: 500 13px/1.7 ui-monospace, monospace; 
    overflow-wrap: anywhere; 
}

.url-row button { 
    border: 0; 
    border-radius: 9px; 
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 0.8)); 
    color: #fff; 
    font-size: 20px; 
    cursor: pointer; 
    transition: all 0.2s ease;
}

.url-row button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.url-row button:disabled { 
    background: rgba(15, 23, 42, 0.6); 
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    cursor: not-allowed;
}

.url-row button strong { font-size: 14px; }

.note { 
    text-align: center; 
    color: var(--text-muted); 
    font-size: 12px; 
}

/* 第一步卡片布局 */
.step-one-card {
    padding: 1.5rem 2rem; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    flex-wrap: wrap; 
    gap: 1rem; 
    margin-bottom: 24px;
}

.step-one-card h2 {
    margin: 0; 
    font-size: 1.25rem; 
    font-weight: 600;
}

.step-buttons {
    display: flex; 
    flex-wrap: wrap; 
    align-items: center; 
    gap: 0.75rem;
}

/* 透明实心按钮 */
.btn-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 9px;
    background: rgba(59, 130, 246, 0.1);  /* 透明实心底色 */
    color: var(--accent-blue);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    line-height: 1.5;
}

.btn-outlined:hover {
    background: rgba(59, 130, 246, 0.2);   /* 悬停时加深一点 */
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

/* 响应式调整 */
@media(max-width:850px){
    .grid { grid-template-columns: 1fr; }
    .url-row { grid-template-columns: 1fr; }
    .url-row button { min-height: 52px; }
    main { width: calc(100% - 24px); margin-top: 16px; }
}

@media(max-width:520px){
    header { padding: 0 12px; }
    .form { grid-template-columns: 1fr; }
    .upload h2 { text-align: center; }
    .output-head p { display: none; }
}