/* 存储系统前端样式 - 修复为绿色主题 */
.storage-system-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 上传区域 */
.storage-upload-section {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.storage-upload-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.upload-field {
    margin-bottom: 15px;
}

.upload-field input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.upload-field input[type="file"]:focus {
    outline: none;
    border-color: #4CAF50;
}

.upload-options {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #4CAF50;
}

/* 上传按钮 - 修复颜色 */
.upload-button {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.upload-button:hover {
    background: #388E3C;
}

.upload-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.upload-info {
    margin-top: 10px;
    color: #666;
    font-size: 12px;
}

/* 上传进度 - 修复颜色 */
.upload-progress {
    display: none;
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
}

.progress-text {
    margin-top: 5px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* 文件列表 */
.storage-files-section {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.storage-files-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.empty-files {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* 文件网格 */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* 文件卡片 - 修复颜色 */
.file-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 15px;
    transition: all 0.3s ease;
}

.file-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 2px 5px rgba(76, 175, 80, 0.15);
    transform: translateY(-2px);
}

.file-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.file-icon {
    font-size: 24px;
    color: #4CAF50;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: bold;
    margin-bottom: 5px;
    word-break: break-word;
    color: #333;
    transition: color 0.3s ease;
}

.file-card:hover .file-name {
    color: #4CAF50;
}

.file-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.file-meta span {
    padding: 2px 5px;
    background: #f8f9fa;
    border-radius: 2px;
    white-space: nowrap;
}

/* 文件公开状态 - 保持原有绿色风格 */
.file-public {
    background: #d4edda !important;
    color: #155724 !important;
}

.file-public-tag {
    background: #d4edda;
    color: #155724;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

/* 文件所有者徽章 - 修复颜色 */
.file-owner-badge {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid rgba(76, 175, 80, 0.2);
    display: inline-block;
}

/* 公开文件提示 - 修复颜色 */
.public-file-notice {
    background: rgba(76, 175, 80, 0.05);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
}

.public-file-notice p {
    margin: 10px 0;
}

.public-file-notice .login-button {
    background: #4CAF50;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    transition: background 0.3s ease;
}

.public-file-notice .login-button:hover {
    background: #388E3C;
}

/* 文件上传者信息 */
.file-uploader {
    background: #f8f9fa;
    color: #666;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 11px;
    display: inline-block;
}

/* 文件操作按钮 - 修复颜色 */
.file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.action-button {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.action-download {
    background: #4CAF50;
    color: white;
}

.action-download:hover {
    background: #388E3C;
    transform: translateY(-1px);
}

.action-preview {
    background: #6c757d;
    color: white;
}

.action-preview:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.action-delete {
    background: #dc3545;
    color: white;
}

.action-delete:hover {
    background: #bd2130;
    transform: translateY(-1px);
}

.action-rename {
    background: #ffc107;
    color: #212529;
}

.action-rename:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

/* 公开切换按钮 - 修复颜色 */
.action-toggle-public {
    background: #4CAF50;
    color: white;
}

.action-toggle-public:hover {
    background: #388E3C;
    transform: translateY(-1px);
}

/* 已公开状态的切换按钮样式 */
.action-toggle-public.public-active {
    background: #ffc107;
    color: #212529;
}

.action-toggle-public.public-active:hover {
    background: #e0a800;
}

.action-button.disabled {
    background: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.action-button.disabled:hover {
    background: #cccccc !important;
    color: #666666 !important;
    transform: none;
}

/* 错误和提示 - 修复颜色 */
.storage-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin: 15px 0;
    border: 1px solid #f5c6cb;
}

.storage-login-prompt {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 5px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.login-button {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.login-button:hover {
    background: #388E3C;
}

/* 模式指示器 */
.mode-indicator {
    color: #4CAF50;
    font-size: 12px;
    font-weight: normal;
    margin-left: 10px;
}

/* 消息提示 - 修复颜色 */
.storage-message {
    margin: 10px 0 !important;
    padding: 10px 15px !important;
    border-radius: 4px !important;
}

.storage-message.notice-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

.storage-message.notice-error {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

.storage-message.notice-info {
    background-color: rgba(76, 175, 80, 0.1) !important;
    border-color: rgba(76, 175, 80, 0.2) !important;
    color: #4CAF50 !important;
}

/* 响应式设计 - 布局保持不变 */
@media (max-width: 768px) {
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .storage-system-container {
        padding: 10px;
    }
    
    .file-meta {
        flex-direction: column;
        gap: 3px;
    }
    
    .file-actions {
        justify-content: center;
    }
    
    .file-public-tag,
    .file-uploader {
        display: block;
        width: fit-content;
        margin: 2px 0;
    }
}