/* 文件上传 - 现代浏览器样式 */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: #2d3748;
    background: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.card {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 18px;
    padding: 38px 34px 30px;
    box-shadow: 0 20px 60px rgba(25, 20, 70, 0.28);
    text-align: center;
}

.brand { margin-bottom: 14px; }

.brand-icon {
    display: inline-flex;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.38);
}

.brand-icon svg { width: 32px; height: 32px; display: block; }
.ico-text { display: none; }

h1 {
    font-size: 24px;
    margin: 0 0 8px;
    font-weight: 600;
    letter-spacing: .5px;
}

.subtitle {
    margin: 0 0 26px;
    color: #718096;
    font-size: 14px;
}

.drop {
    position: relative;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    background: #f8fafc;
    transition: border-color .2s, background .2s, transform .2s;
}

.drop:hover, .drop.dragover {
    border-color: #667eea;
    background: #f0f3ff;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    filter: alpha(opacity=0);
    cursor: pointer;
    z-index: 2;
}

.drop-label {
    display: block;
    padding: 34px 18px 30px;
    cursor: pointer;
}

.drop-ico {
    display: inline-flex;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    background: #edf1ff;
    color: #667eea;
    margin-bottom: 14px;
}

.drop-ico svg { width: 26px; height: 26px; display: block; }

.drop-title {
    display: block;
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
}

.link-like { color: #667eea; font-weight: 600; }

.drop-desc {
    display: block;
    font-size: 12px;
    color: #a0aec0;
    margin-top: 6px;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 10px 14px;
    background: #f7fafc;
    border-radius: 10px;
    font-size: 13px;
    text-align: left;
}

.file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #4a5568;
}

.file-size { color: #a0aec0; flex: none; }

.progress {
    height: 8px;
    background: #edf2f7;
    border-radius: 99px;
    overflow: hidden;
    margin-top: 14px;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: #667eea;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 99px;
    transition: width .15s linear;
}

.pwd-input {
    display: block;
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    font-size: 15px;
    color: #2d3748;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.pwd-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 13px 18px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .5px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.32);
    transition: transform .15s, box-shadow .15s, opacity .15s;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(102, 126, 234, 0.42); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

.tips {
    margin: 20px 0 0;
    font-size: 12px;
    color: #a0aec0;
}

/* 成功提示框 */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 15, 35, 0.5);
}

.modal-box {
    width: 100%;
    max-width: 340px;
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 26px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    animation: pop .22s ease-out;
}

@keyframes pop {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}

.modal-ico {
    display: inline-flex;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: #f0fff4;
    color: #38a169;
    margin-bottom: 14px;
}

.modal-ico svg { width: 30px; height: 30px; }
.modal-box h2 { font-size: 20px; margin: 0 0 8px; }
.modal-box p { font-size: 14px; color: #718096; margin: 0; line-height: 1.6; word-break: break-all; }
.modal-box .btn { margin-top: 22px; }

/* 下载管理页 */
.admin-link {
    display: inline-block;
    margin-top: 14px;
    color: #667eea;
    font-size: 13px;
    text-decoration: none;
}
.admin-link:hover { text-decoration: underline; }
.link-btn { text-decoration: none; }
.admin-card { max-width: 560px; }
.empty-tip { color: #a0aec0; font-size: 14px; padding: 22px 0; }

.file-list { list-style: none; margin: 18px 0 0; padding: 0; text-align: left; }
.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #f8fafc;
}
.fi-check { flex: none; }
.fi-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #2d3748;
}
.fi-meta { flex: none; font-size: 11px; color: #a0aec0; }
.fi-dl {
    flex: none;
    font-size: 12px;
    color: #667eea;
    text-decoration: none;
    padding: 4px 9px;
    border: 1px solid #667eea;
    border-radius: 6px;
}
.fi-dl:hover { background: #667eea; color: #fff; }

.admin-actions { margin-top: 16px; text-align: left; }
.btn-small {
    display: inline-block;
    width: auto;
    margin: 0;
    padding: 9px 18px;
    font-size: 13px;
}
.btn-danger { background: #e53e3e; box-shadow: 0 6px 14px rgba(229, 62, 62, 0.25); }
.msg-ok { color: #38a169; font-size: 13px; margin: 10px 0 0; text-align: left; }

/* 移动端适配 */
@media (max-width: 600px) {
    .wrap { padding: 16px 12px; }
    .card { padding: 28px 20px 24px; border-radius: 14px; }
    h1 { font-size: 21px; }
    .subtitle { margin-bottom: 20px; }
    .drop-label { padding: 26px 12px 22px; }
    .file-info { flex-direction: column; align-items: flex-start; gap: 4px; }
    .file-item { flex-wrap: wrap; }
    .fi-name { flex-basis: 100%; }
    .fi-meta { flex: 1; }
}
