/* ── 上传页 index.php ── */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    padding: 16px 24px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    text-align: center;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto 6px;
}
header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
header p { color: var(--text-muted); font-size: 0.85rem; }
.header-nav { display: flex; align-items: center; gap: 8px; }

.nav-btn {
    padding: 5px 14px; border-radius: 6px; font-size: 0.82rem;
    color: var(--text-muted); text-decoration: none;
    border: 1px solid transparent; transition: all 0.2s;
}
.nav-btn:hover { color: var(--text); background: var(--border); text-decoration: none; }
.nav-btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.nav-btn-primary:hover { background: var(--primary-hover); color: #fff; }
.nav-btn-outline { border-color: var(--border); }
.nav-btn-outline:hover { border-color: var(--error); color: var(--error); background: rgba(239,68,68,0.08); }
.nav-user { font-size: 0.82rem; color: var(--text-muted); padding-left: 4px; }

.login-hint {
    background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.25);
    border-radius: 8px; padding: 10px 16px; margin-bottom: 16px;
    font-size: 0.85rem; color: #a5b4fc; text-align: center;
}
.login-hint a { color: var(--primary); text-decoration: none; font-weight: 500; }
.login-hint a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 800px; padding: 32px 20px; flex: 1; }

/* 拖拽上传区域 */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 20px;
    padding: 56px 24px 52px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, var(--surface) 0%, rgba(99,102,241,0.04) 100%);
    position: relative;
    overflow: hidden;
}
.drop-zone::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.12) 0%, transparent 70%);
    opacity: 0; transition: opacity 0.3s;
    pointer-events: none;
}
.drop-zone:hover::before, .drop-zone.drag-over::before { opacity: 1; }
.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary);
    background: linear-gradient(145deg, var(--surface) 0%, rgba(99,102,241,0.08) 100%);
}
.drop-zone.drag-over {
    transform: scale(1.015);
    box-shadow: 0 0 40px rgba(99,102,241,0.2), inset 0 0 60px rgba(99,102,241,0.04);
    border-style: solid;
}
.drop-zone-icon {
    width: 72px; height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(167,139,250,0.2));
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s ease;
}
.drop-zone:hover .drop-zone-icon, .drop-zone.drag-over .drop-zone-icon {
    transform: translateY(-4px) scale(1.05);
}
.drop-zone-icon svg { width: 36px; height: 36px; color: var(--primary); }
.drop-zone h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.drop-zone > p { color: var(--text-muted); font-size: 0.875rem; }
.drop-zone .hint {
    margin-top: 16px; font-size: 0.78rem; color: var(--text-muted);
    background: rgba(0,0,0,0.2); border-radius: 8px;
    padding: 8px 14px; display: inline-block; line-height: 1.6;
}
.drop-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* 上传列表 */
.upload-list { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.upload-item {
    background: var(--surface); border-radius: 14px; padding: 14px 16px;
    border: 1px solid var(--border); animation: fadeIn 0.3s ease; transition: border-color 0.3s;
}
.upload-item.item-success { border-color: rgba(34,197,94,0.35); background: linear-gradient(145deg, var(--surface), rgba(34,197,94,0.04)); }
.upload-item.item-error   { border-color: rgba(239,68,68,0.35); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.upload-item-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.upload-item-thumb {
    width: 52px; height: 52px; border-radius: 10px; object-fit: cover;
    background: var(--bg); flex-shrink: 0; border: 1px solid var(--border);
}
.upload-item-info { flex: 1; min-width: 0; }
.upload-item-name { font-weight: 500; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-item-size { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }
.upload-item-status { font-size: 0.8rem; font-weight: 500; padding: 3px 10px; border-radius: 20px; flex-shrink: 0; }
.status-queued    { color: var(--text-muted); background: rgba(148,163,184,0.12); }
.status-uploading { color: #818cf8; background: rgba(99,102,241,0.15); animation: pulse 1.2s ease-in-out infinite; }
.status-success   { color: var(--success); background: rgba(34,197,94,0.15); }
.status-error     { color: var(--error); background: rgba(239,68,68,0.15); }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.65; } }

/* 进度条 */
.progress-bar { width: 100%; height: 4px; background: var(--bg); border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #a78bfa); border-radius: 2px; transition: width 0.2s ease; width: 0%; }

/* 链接区域 */
.link-group { display: flex; flex-direction: column; gap: 6px; }
.link-row { display: flex; align-items: center; gap: 8px; }
.link-label { font-size: 0.75rem; color: var(--text-muted); width: 70px; flex-shrink: 0; text-align: right; }
.link-input {
    flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text);
    padding: 6px 10px; border-radius: 6px; font-size: 0.8rem;
    font-family: 'Consolas', 'Monaco', monospace; outline: none; min-width: 0;
}
.link-input:focus { border-color: var(--primary); }
.btn-copy {
    padding: 6px 14px; background: var(--primary); color: #fff; border: none;
    border-radius: 6px; font-size: 0.78rem; cursor: pointer; white-space: nowrap;
    transition: background 0.2s; flex-shrink: 0;
}
.btn-copy:hover { background: var(--primary-hover); }
.btn-copy.copied { background: var(--success); }

/* 总体进度横幅 */
.overall-bar {
    background: linear-gradient(135deg, var(--surface), rgba(99,102,241,0.06));
    border: 1px solid rgba(99,102,241,0.25); border-radius: 14px;
    padding: 14px 18px; margin-bottom: 20px; display: none;
}
.overall-bar.show { display: block; }
.overall-bar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.overall-bar-title { font-size: 0.875rem; font-weight: 600; }
.overall-bar-count { font-size: 0.82rem; color: var(--text-muted); }
.overall-progress { width: 100%; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.overall-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #a78bfa); border-radius: 3px; transition: width 0.3s ease; width: 0%; }

.error-msg { color: var(--error); font-size: 0.85rem; padding: 8px 0; }

footer { text-align: center; padding: 20px; color: var(--text-muted); font-size: 0.8rem; border-top: 1px solid var(--border); width: 100%; }

@media (max-width: 600px) {
    .drop-zone { padding: 40px 16px; }
    .link-row { flex-wrap: wrap; }
    .link-label { width: 100%; text-align: left; }
}
