/* 文件共享平台 - 样式表 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

a { color: #4a90d9; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶部导航 */
.navbar {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.navbar .logo {
    font-size: 20px;
    font-weight: 700;
    color: #4a90d9;
}
.navbar .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}
.navbar .user-info span { color: #666; }
.navbar .user-info a {
    color: #e74c3c;
    font-size: 14px;
}

/* 容器 */
.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 30px;
    margin-bottom: 20px;
}

/* 登录/注册表单 */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.auth-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 40px;
    width: 400px;
    max-width: 90vw;
}
.auth-card h2 {
    text-align: center;
    margin-bottom: 8px;
    color: #333;
    font-size: 24px;
}
.auth-card .subtitle {
    text-align: center;
    color: #999;
    margin-bottom: 28px;
    font-size: 14px;
}
.auth-card .form-group {
    margin-bottom: 18px;
}
.auth-card label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}
.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}
.auth-card input:focus {
    outline: none;
    border-color: #667eea;
}
.auth-card .btn-primary {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}
.auth-card .btn-primary:hover { opacity: 0.9; }
.auth-card .auth-link {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 14px;
}

/* 消息提示 */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* 上传区域 */
.upload-area {
    border: 2px dashed #c0c8d8;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafbff;
    margin-bottom: 24px;
}
.upload-area:hover, .upload-area.dragover {
    border-color: #667eea;
    background: #f0f2ff;
}
.upload-area .icon { font-size: 42px; margin-bottom: 10px; }
.upload-area p { color: #888; font-size: 15px; }
.upload-area .hint { font-size: 12px; color: #bbb; margin-top: 6px; }

/* 上传表单 */
.upload-form {
    display: none;
    margin-top: 16px;
}
.upload-form.show { display: block; }
.upload-form .form-group { margin-bottom: 14px; }
.upload-form label { display: block; font-weight: 600; margin-bottom: 6px; color: #555; font-size: 14px; }
.upload-form input[type="text"],
.upload-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
.upload-form textarea { resize: vertical; min-height: 60px; }
.upload-form input:focus, .upload-form textarea:focus {
    outline: none;
    border-color: #667eea;
}
.upload-form .checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.upload-form .checkbox-group input { width: 18px; height: 18px; }
.upload-form .btn-primary {
    padding: 10px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 600;
}
.upload-form .btn-primary:hover { opacity: 0.9; }

/* 文件列表 */
.file-list { margin-top: 10px; }
.file-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #e8ecf2;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: box-shadow 0.2s;
    background: #fff;
}
.file-item:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.file-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 14px;
    flex-shrink: 0;
}
.file-icon.img { background: #fff3e0; }
.file-icon.doc { background: #e3f2fd; }
.file-icon.zip { background: #fce4ec; }
.file-icon.video { background: #e8f5e9; }
.file-icon.audio { background: #f3e5f5; }
.file-icon.other { background: #f5f5f5; }
.file-info { flex: 1; min-width: 0; }
.file-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-meta {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}
.file-meta span { margin-right: 12px; }
.file-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.file-actions .btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}
.file-actions .btn-download {
    background: #4a90d9;
    color: #fff;
}
.file-actions .btn-share {
    background: #27ae60;
    color: #fff;
}
.file-actions .btn-delete {
    background: #e74c3c;
    color: #fff;
}
.file-actions .btn:hover { opacity: 0.85; }

/* 公开分享标记 */
.public-badge {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

/* 分享弹窗 */
.share-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.share-modal.show { display: flex; }
.share-content {
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.share-content h3 { margin-bottom: 16px; font-size: 18px; }
.share-link-box {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.share-link-box input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
}
.share-link-box .btn-copy {
    padding: 10px 18px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}
.share-content .btn-close {
    margin-top: 16px;
    padding: 8px 20px;
    background: #eee;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}
.search-box input:focus { outline: none; border-color: #667eea; }
.search-box button {
    padding: 10px 20px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #bbb;
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 16px; }

/* 统计栏 */
.stats-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.stat-item {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 16px 24px;
    text-align: center;
    flex: 1;
}
.stat-item .num {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}
.stat-item .label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}
