/* 全局样式 */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #f5f5f5;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
    position: relative;
}

header h1 {
    margin: 0;
    color: #ff69b4;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
    font-size: 28px;
    letter-spacing: 0.5px;
}

.buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* --- 按钮通用样式 --- */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.5rem 1rem; /* 统一内边距 */
    font-size: 0.9rem; /* 稍小一点的字体 */
    line-height: 1.5;
    border-radius: 0.25rem; /* 统一圆角 */
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    text-decoration: none; /* 移除链接下划线 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 默认按钮样式 (灰色) */
.btn-default {
    color: #f5f5f5;
    background-color: #444;
    border-color: #555;
}
.btn-default:hover {
    color: #fff;
    background-color: #555;
    border-color: #666;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 主要按钮样式 (蓝色) */
.btn-primary {
    color: #fff;
    background-color: #6495ED; /* Cornflower Blue */
    border-color: #6495ED;
}
.btn-primary:hover {
    color: #fff;
    background-color: #5a88d7;
    border-color: #547fc2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(100, 149, 237, 0.2);
}

/* 次要/粉色按钮样式 (保留原粉色) */
.btn-secondary {
    color: #fff;
    background-color: #ff69b4; /* Hot Pink */
    border-color: #ff69b4;
}
.btn-secondary:hover {
    color: #fff;
    background-color: #ff5ba7;
    border-color: #f7509f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 105, 180, 0.2);
}

/* 成功按钮样式 (绿色) */
.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}
.btn-success:hover {
    color: #fff;
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

/* 危险/删除按钮样式 (红色) */
.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}
.btn-danger:hover {
    color: #fff;
    background-color: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

/* 下载按钮特殊样式 (保持绿色但使用新基类) */
.btn-download {
    color: #fff;
    background-color: #4CAF50;
    border-color: #4CAF50;
    padding: 0.4rem 0.8rem; /* 可以调整下载按钮的大小 */
    font-size: 0.8rem;
}
.btn-download:hover {
    color: #fff;
    background-color: #45a049;
    border-color: #3e8e41;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
}

/* 编辑按钮样式 (蓝色变种或独立颜色) */
.btn-edit {
    color: #fff;
    background-color: #17a2b8; /* Info Blue */
    border-color: #17a2b8;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}
.btn-edit:hover {
    color: #fff;
    background-color: #138496;
    border-color: #117a8b;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.2);
}

/* 添加到分类按钮样式 */
.btn-category {
    color: #fff;
    background-color: #6f42c1; /* Purple */
    border-color: #6f42c1;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}
.btn-category:hover {
    color: #fff;
    background-color: #5a349c;
    border-color: #543090;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(111, 66, 193, 0.2);
}

/* 按钮在激活状态下的样式 */
.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 大按钮样式 */
.btn-large {
    font-size: 16px;
    padding: 12px 20px;
    margin-left: 15px;
}

/* 文件列表样式 */
.file-container {
    background-color: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid #333;
}

.file-container:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #333;
    transition: all 0.2s ease;
}

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

.file-item:hover {
    background-color: #252525;
    transform: translateX(5px);
    border-left: 3px solid #ff69b4;
    padding-left: 12px;
}

.file-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #fff;
    transition: color 0.2s ease;
}

.file-item:hover .file-info h3 {
    color: #ff69b4;
}

.file-note {
    color: #aaa;
    margin: 5px 0;
    font-size: 14px;
}

.file-size {
    color: #888;
    font-size: 12px;
    margin: 5px 0 0 0;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #aaa;
    font-size: 16px;
    position: relative;
}

.no-files {
    text-align: center;
    padding: 20px;
    color: #aaa;
}

.error {
    color: #f44336;
    text-align: center;
    padding: 20px;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #1e1e1e;
    margin: 10% auto;
    padding: 40px 25px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    color: #f5f5f5;
    border: 1px solid #333;
    position: relative;
}

.modal-content h2 {
    margin-top: 0;
    color: #ff69b4;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.close, .close-btn {
    background-color: #ff69b4;
    color: white;
    float: right;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 12px 24px;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 10000;
    position: absolute;
    top: 10px;
    right: 10px;
    text-align: center;
    display: block;
    border: none;
    box-shadow: 0 3px 6px rgba(255, 105, 180, 0.4);
    user-select: none;
    min-width: 80px;
    outline: none;
}

.close:hover, .close-btn:hover {
    background-color: #ff5ba7;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(255, 105, 180, 0.5);
}

.close:active, .close-btn:active {
    background-color: #ff3c96;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 105, 180, 0.3);
}

/* 增加视觉反馈 */
.close:before, .close-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    transform: scale(0);
    transition: transform 0.3s;
}

.close:hover:before, .close-btn:hover:before {
    transform: scale(1);
}

/* 移动设备适配 */
@media (max-width: 768px) {
    .close, .close-btn {
        padding: 15px 30px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ddd;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #252525;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff69b4;
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.25);
    background-color: #2a2a2a;
}

.form-group input[type="file"] {
    padding: 10px 0;
    color: #ddd;
}

/* 登录表单样式 */
.login-form {
    max-width: 400px;
    margin: 0 auto;
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
}

.login-form h2 {
    margin-top: 0;
    color: #ff69b4;
}

.message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.message.error {
    background-color: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.message.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* 管理后台样式 */
.admin-main {
    margin-top: 20px;
}

.admin-section {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.admin-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #ff69b4;
}

/* 管理操作按钮区域 */
.admin-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

/* 主要按钮样式 */
.btn-primary {
    background-color: #ff69b4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #ff5ba7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

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

.filter-btn {
    background-color: #333;
    color: #ddd;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background-color: #ff69b4;
    color: #fff;
}

/* 上传表单样式 */
.upload-container {
    margin-top: 30px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

.upload-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    background-color: #333;
    color: #ddd;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background-color: #ff69b4;
    color: #fff;
}

.upload-form {
    display: none;
    background-color: #252525;
    padding: 25px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.upload-form.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.edit-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
}

.delete-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.file-date {
    color: #777;
    font-size: 12px;
    margin-top: 5px;
}

/* 用户管理样式 */
.user-actions {
    margin-bottom: 20px;
}

.user-list table {
    width: 100%;
    border-collapse: collapse;
}

.user-list th,
.user-list td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.user-list th {
    background-color: #252525;
    color: #ff69b4;
}

.user-list tr:hover {
    background-color: #252525;
}

.user-list .no-data {
    text-align: center;
    color: #aaa;
}

/* 主页文件列表和证书按钮布局 */
.main-content {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.main-content-left {
    flex: 1;
}

.main-content-right {
    width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.cert-button {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    border: 1px solid #333;
    margin-top: 20px;
}

.cert-button:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    transform: translateY(-5px);
    border-color: #ff69b4;
}

.cert-button h3 {
    color: #ff69b4;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    font-size: 18px;
    text-shadow: 0 0 5px rgba(255, 105, 180, 0.3);
}

.cert-button p {
    color: #aaa;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
}

.cert-button .btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
    background-color: #4CAF50;
}

.cert-button .btn:hover {
    background-color: #45a049;
}

/* 响应式样式 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .buttons {
        margin-top: 15px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-actions {
        margin-top: 10px;
    }
    
    .admin-nav {
        flex-wrap: wrap;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .main-content-right {
        width: 100%;
    }
}

/* 页脚样式 */
footer {
    margin-top: 30px;
    text-align: center;
    color: #777;
    font-size: 14px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

/* 标题样式 */
h2 {
    color: #ff69b4;
    margin-bottom: 20px;
    font-size: 24px;
    position: relative;
    padding-bottom: 10px;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #ff69b4;
    border-radius: 3px;
}

h3 {
    color: #ff69b4;
}

/* 增强加载动画 */
.loading:after {
    content: "...";
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60%, 100% {
        content: "...";
    }
}

/* 增强滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 页面描述样式 */
.page-description {
    color: #aaa;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

/* 创建文件夹样式 */
.create-folder-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.create-folder-section h3 {
    color: #ff69b4;
    margin-bottom: 15px;
    font-size: 18px;
    position: relative;
    padding-bottom: 8px;
}

.create-folder-section h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #ff69b4;
    border-radius: 2px;
}

#createFolderForm {
    background-color: #222;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #333;
}

#createFolderMessage {
    margin-top: 10px;
}

/* 证书下载按钮特殊样式 */
.btn-cert {
    background-color: #4CAF50;
    font-size: 16px;
    padding: 10px 20px;
    margin-right: 15px;
    position: relative;
    overflow: hidden;
}

.btn-cert:hover {
    background-color: #45a049;
}

.btn-cert:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-cert:hover:before {
    left: 100%;
}

/* 添加分类文件夹相关样式 */
.category-container {
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.category-header {
    transition: background-color 0.2s;
}

.category-header:hover {
    background-color: rgba(100, 149, 237, 0.1) !important;
}

.category-content {
    border-left: 1px dashed #6495ED;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.folder-icon {
    margin-right: 5px;
    font-size: 1.2em;
}

.expand-icon {
    font-size: 0.7em;
    margin-left: 5px;
    transition: transform 0.2s;
}

/* 文件列表中的分类名称样式 */
.file-category {
    color: #00bcd4; /* 青色，用于区分 */
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* 后台分类管理表格样式 */
.category-admin-container {
    margin-top: 20px;
}

.category-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.category-list-table th,
.category-list-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #333;
    vertical-align: middle;
}

.category-list-table th {
    background-color: #252525;
    color: #ff69b4;
    font-weight: 600;
}

.category-list-table tr:hover {
    background-color: #2a2a2a;
}

.category-list-table td:last-child {
    text-align: center;
}

.delete-category-btn {
    background-color: #f44336; /* 红色 */
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}

.delete-category-btn:hover {
    background-color: #d32f2f;
}

/* 标签页样式 */
.admin-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
}

.tab-item {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #1e1e1e;
    border: none;
    color: #aaa;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 16px;
    margin-right: 5px;
}

.tab-item:hover {
    color: #fff;
    background-color: #252525;
}

.tab-item.active {
    color: #ff69b4;
    border-bottom: 3px solid #ff69b4;
    background-color: #252525;
}

.tab-content {
    display: none; /* Initially hide all tab content */
    padding: 20px;
    background-color: #1e1e1e;
    border-radius: 0 8px 8px 8px; /* Rounded corners except top-left */
    animation: fadeIn 0.4s ease;
    border: 1px solid #333;
    border-top: none;
}

.tab-content.active {
    display: block; /* Show active tab content */
}

/* 上传进度条样式 */
.upload-progress {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #1e1e1e 0%, #252525 100%);
    border-radius: 12px;
    border: 2px solid #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: #fff;
}

.progress-info #progressText {
    font-weight: 500;
    color: #ff69b4;
}

.progress-info #progressPercent {
    font-weight: bold;
    font-size: 18px;
    color: #fff;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #333;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff69b4, #ff5ba7, #ff69b4);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    transition: width 0.3s ease;
    border-radius: 6px;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

.progress-details {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #aaa;
}

.progress-details #uploadSpeed {
    color: #4CAF50;
}

.progress-details #remainingTime {
    color: #ff9800;
}

/* 上传按钮状态 */
.btn.uploading {
    background: linear-gradient(90deg, #666, #888, #666);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    cursor: not-allowed;
    color: #ccc;
}

@keyframes loading {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .upload-progress {
        padding: 15px;
        margin: 15px 0;
    }
    
    .progress-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .progress-details {
        flex-direction: column;
        gap: 5px;
    }
} 