body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.header {
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    margin: 0;
    font-size: 24px;
}

.user-info a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background 0.3s;
}

.user-info a:hover {
    background: rgba(255,255,255,0.2);
}

.main-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.success {
    background: #d1fae5;
    color: #065f46;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 4px solid #10b981;
}

.error {
    background: #ffeaa7;
    color: #d63031;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 4px solid #d63031;
}

.storage-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.storage-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.storage-used {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    transition: width 0.5s;
}

.file-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.file-actions button {
    padding: 10px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.file-actions button:hover {
    background: #2980b9;
}

.file-list {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
}

.empty-folder {
    padding: 30px;
    text-align: center;
    color: #7f8c8d;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.file-item:hover {
    background: #f8f9fa;
}

.file-item:last-child {
    border-bottom: none;
}

.file-info {
    flex: 1;
}

.file-main {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.file-icon {
    margin-right: 8px;
    font-size: 1.2em;
}

.file-name {
    font-weight: bold;
    margin-right: 15px;
}

.file-size {
    margin-left: auto;
    color: #7f8c8d;
    font-size: 14px;
    margin-right: 15px;
}

.file-remark, .file-source, .file-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 3px;
}

.file-source a {
    color: #3498db;
}

.file-meta {
    margin-top: 5px;
}

.file-actions-container {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 5px 10px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9em;
    transition: background 0.3s;
}

.btn-action:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.file-info-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.upload-form {
    background: white;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #eee;
}

.btn-cancel {
    padding: 10px 15px;
    background: #95a5a6;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    margin-left: 10px;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.form-group input:focus, .form-group select:focus {
    border-color: #3498db;
    outline: none;
}

#shareCodeHint {
    color: #7f8c8d;
    font-size: 0.9em;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.share-form, .share-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.share-download {
    text-align: center;
    padding: 30px;
}

.btn-download {
    display: inline-block;
    padding: 15px 30px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    margin-top: 20px;
    transition: background 0.3s;
}

.btn-download:hover {
    background: #2980b9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 15px;
    }
    
    .user-info {
        margin-top: 10px;
    }
    
    .main-container {
        margin: 15px;
        padding: 20px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-actions-container {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-end;
    }
    
    .file-size {
        margin-left: 0;
        width: 100%;
        margin-top: 5px;
    }
    
    .modal-content {
        padding: 20px;
    }
}
/* 突出显示下载次数 */
.download-count {
    color: #e74c3c;
    font-weight: bold;
}

/* 分享链接样式 */
.file-meta a {
    color: #3498db;
    word-break: break-all;
}

.file-meta a:hover {
    text-decoration: underline;
}

/* 创建分享按钮样式 */
.btn-create-share {
    padding: 12px 25px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-create-share:hover {
    background: #27ae60;
}

/* 分享信息区域样式 */
.share-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid #3498db;
}

.share-info h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.share-info p {
    margin: 10px 0;
    line-height: 1.5;
}

/* 分享表单样式 */
.share-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.share-form ul {
    margin: 10px 0 20px 20px;
}

.share-form li {
    margin-bottom: 5px;
    color: #555;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .file-meta {
        font-size: 0.8em;
    }
    
    .file-meta a {
        word-break: break-all;
        display: block;
        margin-top: 5px;
    }
}
/* 分享页面特定样式 */
.main-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.share-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.share-header h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 28px;
}

.package-icon {
    font-size: 60px;
    margin-bottom: 20px;
    display: block;
}

.share-details {
    max-width: 600px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.file-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.file-info-label {
    font-weight: bold;
    color: #2c3e50;
    min-width: 100px;
}

.file-info-value {
    flex: 1;
    text-align: right;
    color: #495057;
    word-break: break-all;
}

.download-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn-download-large {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-download-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9, #3498db);
}

.file-size-large {
    font-size: 18px;
    color: #7f8c8d;
    margin-top: 10px;
}

.source-url {
    background: #e8f4fd;
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 10px;
    border-left: 4px solid #3498db;
}

.source-url a {
    color: #2980b9;
    text-decoration: none;
}

.source-url a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        margin: 20px;
        padding: 20px;
    }
    
    .file-info-row {
        flex-direction: column;
    }
    
    .file-info-label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .file-info-value {
        text-align: left;
    }
    
    .btn-download-large {
        padding: 12px 30px;
        font-size: 18px;
    }
}

/* 下载分享页 */
* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 10%, rgba(70, 168, 155, 0.16), transparent 28%),
        radial-gradient(circle at 85% 0%, rgba(255, 183, 77, 0.16), transparent 24%),
        linear-gradient(180deg, #f7fbff 0%, #eef3f8 100%);
    color: #1f2937;
}

.download-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 18px;
}

.download-card {
    width: min(100%, 760px);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(31, 41, 55, 0.14);
}

.download-card .share-header {
    position: relative;
    margin: 0;
    padding: 54px 42px 30px;
    text-align: center;
    border: 0;
    background: linear-gradient(135deg, #f9fbff 0%, #eef7fb 100%);
}

.download-card .share-header::after {
    content: "";
    position: absolute;
    left: 42px;
    right: 42px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 116, 139, 0.28), transparent);
}

.file-visual {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 140px;
    margin-bottom: 20px;
}

.file-visual img {
    width: 142px;
    height: auto;
    display: block;
}

.file-visual span {
    position: absolute;
    right: 4px;
    bottom: 16px;
    min-width: 50px;
    padding: 7px 10px;
    border-radius: 6px;
    background: linear-gradient(135deg, #111827, #253044);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    box-shadow: 0 8px 18px rgba(21, 34, 56, 0.2);
}

.share-kicker {
    margin: 0 0 10px;
    color: #0f766e;
    font-size: 14px;
    font-weight: 700;
}

.download-card .share-header h1 {
    max-width: 620px;
    margin: 0 auto;
    color: #172033;
    font-size: 34px;
    line-height: 1.22;
    overflow-wrap: anywhere;
}

.file-original-name {
    max-width: 560px;
    margin: 14px auto 0;
    color: #64748b;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.download-card .share-details {
    max-width: none;
    margin: 0;
    padding: 26px 42px 10px;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
}

.download-card .file-info-row {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 18px;
    align-items: center;
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid #edf2f7;
}

.download-card .file-info-label {
    min-width: 0;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
}

.download-card .file-info-value {
    color: #253044;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.download-card .source-url {
    margin: 18px 0 8px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 18px;
    align-items: start;
    background: #f2fbf8;
    border: 1px solid #cceee4;
    border-left: 4px solid #0f766e;
    border-radius: 8px;
}

.download-card .source-url span {
    color: #0f766e;
    font-size: 14px;
    font-weight: 700;
}

.download-card .source-url a {
    color: #1769aa;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.download-card .source-url a:hover {
    text-decoration: underline;
}

.download-card .source-url em {
    color: #94a3b8;
    font-style: normal;
}

.download-card .download-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 28px 42px 42px;
    text-align: center;
    border: 0;
    background: #fff;
}

.download-card .download-status {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 36px;
    margin: 0 0 18px;
    padding: 8px 16px;
    overflow: hidden;
    border-radius: 8px;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 15px;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.download-card .download-status::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.78) 45%, transparent 70%);
    transform: translateX(-120%);
    animation: status-shine 2.2s ease-in-out infinite;
}

.download-card .status-icon {
    position: relative;
    z-index: 1;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(15, 118, 110, 0.25);
    border-top-color: #0f766e;
    border-radius: 50%;
    animation: status-spin 0.8s linear infinite;
}

.download-card .status-text {
    position: relative;
    z-index: 1;
}

.download-card .download-status.is-started {
    background: #ecfdf5;
    color: #047857;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.download-card .download-status.is-started .status-icon {
    border-color: #10b981;
    background: #10b981;
    animation: status-pulse 1.45s ease-in-out infinite;
}

.download-card .download-status.is-started .status-icon::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 2px;
    width: 5px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

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

@keyframes status-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.35);
    }

    50% {
        box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
    }
}

@keyframes status-shine {
    0% {
        transform: translateX(-120%);
    }

    55%, 100% {
        transform: translateX(120%);
    }
}

.download-card .btn-download-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(100%, 360px);
    min-width: 210px;
    min-height: 58px;
    padding: 15px 32px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #1769aa, #159a8c);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 14px 32px rgba(23, 105, 170, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.download-card .btn-download-large svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.download-card .btn-download-large:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #155e98, #0f8b7f);
    box-shadow: 0 18px 40px rgba(21, 94, 152, 0.32);
}

.download-card .file-size-large {
    margin: 14px 0 0;
    color: #64748b;
    font-size: 15px;
}

.download-card .download-fallback {
    margin: 16px 0 0;
    color: #64748b;
    font-size: 14px;
}

@media (max-width: 640px) {
    .download-page {
        align-items: stretch;
        padding: 16px;
    }

    .download-card .share-header {
        padding: 36px 22px 24px;
    }

    .download-card .share-header::after {
        left: 22px;
        right: 22px;
    }

    .file-visual {
        width: 124px;
        height: 116px;
        margin-bottom: 16px;
    }

    .file-visual img {
        width: 116px;
    }

    .download-card .share-header h1 {
        font-size: 25px;
    }

    .download-card .share-details,
    .download-card .download-section {
        padding-left: 22px;
        padding-right: 22px;
    }

    .download-card .file-info-row,
    .download-card .source-url {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .download-card .file-info-value {
        text-align: left;
    }

    .download-card .btn-download-large {
        width: min(100%, 360px);
        min-width: 0;
    }
}
