/* css/style.css */

/* 基础全局重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

/* 主容器 */
.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏优化 */
.sidebar {
    width: 240px;
    background: #2c3e50;
    color: #ecf0f1;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 24px 20px;
    background: #1a252f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
}

.sidebar ul {
    list-style: none;
    padding: 15px 0;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sidebar ul li a i {
    margin-right: 12px;
    width: 18px;
    text-align: center;
}

.sidebar ul li a:hover,
.sidebar ul li.active a {
    color: #fff;
    background: #34495e;
    border-left: 4px solid #3498db;
}

/* 主内容区域 */
.main-content {
    flex-grow: 1;
    padding: 30px 40px;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.header h1 {
    font-size: 24px;
    color: #1e293b;
    font-weight: 600;
}

/* 按钮样式强化 */
.button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.button.logout {
    background-color: #e74c3c;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

.button.logout:hover {
    background-color: #c0392b;
}

.button.login {
    background-color: #2ecc71;
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.2);
}

.button.login:hover {
    background-color: #27ae60;
}

/* 列表表格视图优化 */
.file-list {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.file-list table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.file-list th {
    background-color: #f8fafc;
    color: #64748b;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
}

.file-list td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #334155;
}

.file-list tr:last-child td {
    border-bottom: none;
}

.file-list tr:hover {
    background-color: #f8fafc;
}

/* 表格内获取链接与删除按钮 */
.show-link-card {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.show-link-card:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ==================== 图片网格高级优化 ==================== */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.image-item {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.image-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.image-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background-color: #f1f5f9;
    transition: transform 0.3s ease;
}

.image-item:hover img {
    transform: scale(1.04);
}

.image-title {
    padding: 10px 12px;
    font-size: 12px;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    z-index: 2;
}

/* 弹窗及其他基础组件适配 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 24px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.close-button {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
}

.close-button:hover {
    color: #0f172a;
}