/* 文件共享系统样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 登录卡片 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.login-card .subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.login-card .icon {
    font-size: 64px;
    margin-bottom: 20px;
}

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

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

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: #ff4757;
    color: #fff;
}

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

.btn-secondary {
    background: #f1f1f1;
    color: #666;
}

.btn-secondary:hover {
    background: #e1e1e1;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* 错误提示 */
.error-msg {
    color: #ff4757;
    font-size: 14px;
    margin-top: 10px;
}

/* 主容器 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* 导航栏 */
.navbar {
    background: #fff;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background 0.3s;
}

.breadcrumb a:hover {
    background: #f0f0f0;
}

.breadcrumb span {
    color: #999;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 10px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 14px;
    width: 250px;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.search-box button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

/* 文件列表 */
.file-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.file-list-header {
    display: grid;
    grid-template-columns: 50px 1fr 120px 180px 100px;
    padding: 15px 20px;
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #eee;
}

.file-item {
    display: grid;
    grid-template-columns: 50px 1fr 120px 180px 100px;
    padding: 15px 20px;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
}

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

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

.file-icon {
    font-size: 28px;
}

.file-name {
    font-weight: 500;
    color: #333;
    word-break: break-all;
}

.file-name a {
    color: #333;
    text-decoration: none;
}

.file-name a:hover {
    color: #667eea;
    text-decoration: underline;
}

.file-size {
    color: #999;
    font-size: 14px;
}

.file-date {
    color: #999;
    font-size: 14px;
}

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

.file-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

/* 文件夹样式 */
.folder-icon {
    color: #ffb74d;
}

.folder-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.folder-link:hover {
    color: #667eea;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 20px;
}

/* 上传区域 */
.upload-area {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.upload-area.dragover {
    border: 3px dashed #667eea;
    background: #f8f9ff;
}

.upload-area h3 {
    margin-bottom: 15px;
    color: #333;
}

.upload-area p {
    color: #999;
    margin-bottom: 20px;
}

.upload-btn {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.upload-input {
    display: none;
}

/* 上传进度 */
.upload-progress {
    margin-top: 20px;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e1e1e1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar .progress {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* 上传列表 */
.upload-list {
    margin-top: 20px;
}

.upload-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.upload-item-name {
    font-weight: 500;
    color: #333;
}

.upload-item-size {
    color: #999;
    font-size: 14px;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

/* 确认弹窗 */
.confirm-modal .modal-content {
    text-align: center;
}

.confirm-modal .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.confirm-modal p {
    margin-bottom: 25px;
    color: #666;
}

.confirm-modal .btn-group {
    display: flex;
    gap: 15px;
}

.confirm-modal .btn {
    flex: 1;
}

/* 统计信息 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card .number {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

.stat-card .label {
    color: #999;
    font-size: 14px;
    margin-top: 5px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e1e1e1;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* 响应式 */
@media (max-width: 768px) {
    .file-list-header {
        display: none;
    }
    
    .file-item {
        grid-template-columns: 40px 1fr;
        grid-template-rows: auto auto;
    }
    
    .file-size, .file-date {
        display: none;
    }
    
    .navbar {
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        flex: 1;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
}

/* 底部 */
.footer {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}
