/* /css/styles.css - 完整样式表（修复图标显示问题 + 添加Footer） */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: #f4f6fa;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dashboard {
    max-width: 1600px;
    width: 100%;
    min-height: calc(100vh - 4rem); /* 确保内容撑开 */
    display: flex;
    flex-direction: column;
}

/* 标题区 - 修复图标显示问题 */
.header-title {
    margin-bottom: 2rem;
}

.header-title h1 {
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    border-left: 6px solid #2b7a4b;
    padding-left: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-title h1 span {
    background: none;
    -webkit-text-fill-color: initial;
    color: #2b7a4b; /* 给图标一个绿色，使其更醒目 */
    font-size: 2.5rem;
}

.header-title h1 .icon {
    font-size: 2.5rem;
    color: #f6b83e; /* 亮金色 */
    background: none;
    -webkit-text-fill-color: initial;
    filter: drop-shadow(0 2px 4px rgba(246,184,62,0.3));
}

.header-title h1 .text {
    background: linear-gradient(145deg, #1e2b3c, #1f3a5f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 控制栏 */
.toolbar {
    background: white;
    border-radius: 24px;
    padding: 1.25rem 1.8rem;
    box-shadow: 0 10px 25px rgba(0,10,30,0.05);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0,0,0,0.03);
    backdrop-filter: blur(2px);
}

.file-selector {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.file-selector label {
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.95rem;
    background: #eef2f7;
    padding: 0.3rem 1rem;
    border-radius: 40px;
}

.file-selector select {
    padding: 0.6rem 1.8rem 0.6rem 1rem;
    border-radius: 40px;
    border: 1px solid #cdd9e9;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 1rem center;
    background-size: 14px;
    appearance: none;
    font-size: 0.95rem;
    min-width: 210px;
    cursor: pointer;
    transition: all 0.15s;
}

.file-selector select:hover {
    border-color: #2b7a4b;
    box-shadow: 0 2px 8px rgba(43,122,75,0.1);
}

.file-selector select:focus {
    outline: none;
    border-color: #1f5e38;
    box-shadow: 0 0 0 3px rgba(43,122,75,0.2);
}

/* 搜索框 */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: 40px;
    border: 1px solid #cdd9e9;
    width: 250px;
    font-size: 0.95rem;
    transition: all 0.15s;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: #2b7a4b;
    box-shadow: 0 0 0 3px rgba(43,122,75,0.1);
    width: 300px;
}

.search-box svg {
    position: absolute;
    left: 12px;
    fill: none;
    stroke: #7f8fa4;
    pointer-events: none;
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #eef2f7;
    padding: 0.35rem 1rem 0.35rem 0.8rem;
    border-radius: 40px;
    text-decoration: none;
    color: #d13a3a; /* 抖音风格红色 */
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.video-link:hover {
    background: #d13a3a;
    color: white;
    border-color: #a52a2a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(209,58,58,0.2);
}

.video-link svg {
    stroke: currentColor;
    fill: none;
}

/* 时间筛选 */
.time-filter select {
    padding: 0.6rem 2rem 0.6rem 1.2rem;
    border-radius: 40px;
    border: 1px solid #cdd9e9;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") no-repeat right 0.8rem center/14px;
    appearance: none;
    font-size: 0.95rem;
    cursor: pointer;
    background-color: white;
}

.time-filter select:focus {
    outline: none;
    border-color: #2b7a4b;
    box-shadow: 0 0 0 3px rgba(43,122,75,0.1);
}

/* 统计数字 */
.stats {
    font-size: 0.95rem;
    background: #eef2f7;
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
    color: #1e3a5f;
    font-weight: 500;
    margin-left: auto;
}

.stats span {
    font-weight: 700;
    color: #1f5e38;
    font-size: 1.2rem;
}

/* 导出按钮 */
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(145deg, #2b7a4b, #1f5e38);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 12px rgba(43,122,75,0.3);
}

.export-btn:hover {
    background: linear-gradient(145deg, #1f5e38, #154c2d);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(43,122,75,0.4);
}

.export-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(43,122,75,0.3);
}

.export-btn svg {
    stroke: currentColor;
}

.export-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 表格容器 */
.table-container {
    background: white;
    border-radius: 28px;
    box-shadow: 0 20px 40px -10px rgba(10,30,50,0.12);
    padding: 0.2rem 0.2rem 0.2rem 0.2rem;
    overflow-x: auto;
    border: 1px solid rgba(0,0,0,0.02);
    flex: 1; /* 让表格容器占据剩余空间 */
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 950px;
}

thead tr {
    background: #f8fafd;
    border-bottom: 2px solid #e2e9f2;
}

th {
    text-align: left;
    padding: 1.2rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1f3a5f;
    white-space: nowrap;
}

td {
    padding: 1rem 1rem;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
    color: #1e2b3c;
}

tbody tr:hover td {
    background-color: #fafcff;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* 特定列样式 */
td:nth-child(1) {  /* 发布时间 */
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    white-space: nowrap;
    color: #115b63;
}

td:nth-child(2) {  /* IP属地 */
    font-weight: 500;
    color: #4a5b6e;
}

td:nth-child(3) {  /* 评论内容 */
    max-width: 350px;
    word-break: break-word;
    color: #1a2634;
    line-height: 1.45;
}

td:nth-child(4) {  /* 昵称 */
    font-weight: 500;
    white-space: nowrap;
}

td:nth-child(5) {  /* 主页链接 */
    white-space: nowrap;
}

td:nth-child(6) {
    white-space: nowrap;
}

/* 链接按钮样式 */
.user-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #eef2f7;
    padding: 0.35rem 1rem 0.35rem 0.8rem;
    border-radius: 40px;
    text-decoration: none;
    color: #1f3a5f;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.user-link:hover {
    background: #2b7a4b;
    color: white;
    border-color: #1f5e38;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(43,122,75,0.2);
}

.user-link svg {
    stroke: currentColor;
    fill: none;
}

.loading-cell {
    text-align: center;
    padding: 3rem !important;
    color: #7f8fa4;
    font-style: italic;
}

/* 空状态 */
.empty-row td {
    text-align: center;
    padding: 2.5rem !important;
    color: #8f9fb1;
}

/* Footer 样式 - 新增 */
.site-footer {
    margin-top: 2rem;
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.site-footer p {
    font-size: 1rem;
}

.site-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #1e3a5f;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 40px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

.site-footer a:hover {
    color: #2b7a4b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(43,122,75,0.15);
    background: #f8fafd;
}

.site-footer a span {
    font-size: 1.2rem;
}

/* 响应式微调 */
@media (max-width: 900px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .file-selector, .search-box, .time-filter, .stats, .export-btn {
        width: 100%;
    }
    .search-box input {
        width: 100%;
    }
    .search-box input:focus {
        width: 100%;
    }
    .stats {
        margin-left: 0;
        text-align: center;
    }
    .header-title h1 {
        font-size: 1.8rem;
    }
}