/* 基础样式 - Olive Leaf 自然配色方案 */
:root {
    --primary-color: #bc6c25;
    --secondary-color: #dda15e;
    --accent-color: #dda15e;
    --submit-color: #bc6c25;
    --text-primary: #fefae0;
    --text-secondary: #dda15e;
    --text-muted: #606c38;
    --bg-primary: #283618;
    --bg-secondary: #1e2a0f;
    --bg-card: #283618;
    --border-color: #606c38;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 - 简洁暗色 */
.header {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-primary);
}

.logo i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* 导航容器 - 包含分类导航和提交按钮 */
.nav-container {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(40, 54, 24, 0.9);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
}

.category-filter {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.category-filter:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.category-filter.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--bg-secondary);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(184, 230, 184, 0.3);
}

/* 提交按钮 - Copper 铜色 */
.submit-btn {
    background: var(--submit-color);
    color: var(--text-primary);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(188, 108, 37, 0.4);
}

.submit-btn:hover {
    background: #a85a1f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(188, 108, 37, 0.5);
}

/* 主要内容区域 */
.main {
    padding: 40px 0;
}

.section-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-color);
}

/* 分类筛选 - 已移到导航栏，这里保留样式兼容 */
.filter-section {
    display: none;
}

/* 无结果提示 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results p {
    font-size: 1.2rem;
}

/* 普通作品卡片 - 图片铺满，信息覆盖 */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.site-card {
    display: block;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    position: relative;
    aspect-ratio: 16/9;  /* 固定 16:9 比例 */
}

.site-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* 置顶角标 - 左上角丝带 */
.pinned-badge {
    position: absolute;
    top: 12px;
    left: -28px;
    background: var(--primary-color);
    color: var(--text-primary);
    padding: 4px 24px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transform: rotate(-45deg);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pinned-badge::before,
.pinned-badge::after {
    content: '';
    position: absolute;
    top: 100%;
    width: 0;
    height: 0;
    border-top: 3px solid var(--primary-color);
}

.pinned-badge::before {
    left: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid var(--primary-color);
}

.pinned-badge::after {
    right: 0;
    border-right: 3px solid transparent;
    border-left: 3px solid var(--primary-color);
}

.pinned-badge i {
    margin-right: 4px;
}

/* 图片覆盖容器 */
.card-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.card-image-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* 裁剪以填充 16:9 容器 */
    object-position: center;
    transition: transform 0.3s ease;
}

.site-card:hover .card-image-overlay img {
    transform: scale(1.03);
}

/* 信息覆盖层 - 半透明背景 */
.card-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(40, 54, 24, 0.3); /* 30% 透明度的深森林绿背景 */
    padding: 16px;
    backdrop-filter: blur(4px);
}

/* 站点标题 */
.site-title {
    font-size: 1.1rem;
    margin-bottom: 4px;
    margin-top: 0;
    line-height: 1.3;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-title i {
    font-size: 0.8rem;
    opacity: 0.7;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* 站点URL */
.site-url {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 页脚 - 包含鸣谢内容 */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer p {
    margin: 8px 0;
}

.footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.footer a:hover {
    color: var(--text-primary);
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: width 0.2s ease;
}

.footer a:hover::after {
    width: 100%;
}

.footer-links {
    margin: 12px 0;
    font-weight: 500;
}

.footer-links a {
    margin: 0 12px;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-links .beian-link {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links .beian-link:hover {
    color: var(--accent-color);
}

.footer-credits {
    margin-top: 16px;
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式设计 - 一行三个变为自适应 */
@media (max-width: 1024px) {
    .sites-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .header {
        padding: 30px 0;
    }

    .logo {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .sites-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .category-cloud {
        justify-content: flex-start;
    }

    .site-meta {
        flex-direction: column;
        gap: 6px;
    }
}

/* 加载动画 - 更简洁 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-card {
    animation: fadeIn 0.4s ease-out;
}
