:root {
    --bg-color: #f2f2f2;
    --card-bg: #ffffff;
    --text-main: #000000;
    --text-muted: #4a4a4a;
    --gap: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important;
}

body {
    background-color: var(--bg-color);
    font-family: "PingFang SC", "STHeiti", sans-serif;
    color: var(--text-main);
}

a {
    text-decoration: none !important;
    color: inherit;
}

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #ddd;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#headerInput {
    width: 30%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #000;
}

main {
    width: 100%;
    padding: var(--gap);
}

/* --- Hero P1 布局 --- */
#hero-section {
    margin-bottom: var(--gap);
}

.hero-tile {
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
}

.hero-tile .content {
    padding: 50px 20px 30px 20px;
    /* 增加上下内边距 */
    text-align: center;
}

.hero-tile h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
}

.hero-tile p {
    font-size: 1.4rem;
    color: var(--text-muted);
}

.hero-tile .cover-wrapper {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    /* 减小与文字的视觉距离 */
}

/* --- 普通两列磁贴 --- */
#section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
}

article {
    background: var(--card-bg);
    aspect-ratio: 16 / 12;
    /* 稍微增加高度，确保文字完整 */
    display: flex;
    flex-direction: column;
}

article a {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cover-wrapper {
    flex: 7;
    /* 图片区域比例 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    /* 与边缘和文字保持微小间隔 */
    overflow: hidden;
}

.cover-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.content {
    flex: 3;
    /* 文字区域比例 */
    padding: 10px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* 垂直居中 */
    text-align: center;
    /* 水平居中 */
}

article h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    /* 允许标题换行以显示完整 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

article p {
    font-size: 1rem;
    color: var(--text-muted);
    /* 允许描述换行以显示完整 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    #section {
        grid-template-columns: 1fr;
    }

    .hero-tile h1 {
        font-size: 2rem;
    }
}