@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&display=swap');

body {
    font-family: 'Montserrat', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    margin: 0; padding: 0;
    background: #f6f8fa;
    color: #222;
}
header, footer {
    background: #1765d8;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
}
header h1 {
    margin: 0;
    font-family: 'Montserrat', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    font-size: 2.2em;
    letter-spacing: 2px;
    font-weight: 800;
}
footer p {
    margin: 0;
}
nav {
    margin: 10px 0;
}
nav a {
    color: #fff;
    margin: 0 1em;
    text-decoration: none;
}
nav a:hover { text-decoration: underline; }
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1em;
}
.site-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em;
}
.site-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 6px #0001;
    padding: 1em;
    transition: 
        box-shadow .28s cubic-bezier(.5,1.8,.5,1), 
        transform .28s cubic-bezier(.5,1.8,.5,1),
        border-color .2s,
        background 0.3s;
    min-height: 80px;
    display: block;
    position: relative;
    border: 2px solid transparent;
    z-index: 0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.site-card:visited {
    color: inherit;
}
.site-card:hover, .site-card:focus-within {
    box-shadow: 0 10px 32px 0 #1765d855, 0 1.5px 8px #49e0e6bb;
    transform: translateY(-6px) scale(1.045) rotate(-1.5deg);
    border-color: #49e0e6;
    background: linear-gradient(105deg, #eaf5ff 84%, #49e0e625 100%);
    text-decoration: none;
}
.site-card::before {
    content: "";
    display: block;
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    z-index: 1;
    border-radius: 16px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .28s;
    background: radial-gradient(circle at 70% 20%, #49e0e6 0%, #1765d8 70%, transparent 100%);
}
.site-card:hover::before, .site-card:focus-within::before {
    opacity: 0.13;
}

.site-title {
    color: #1765d8;
    font-size: 1.1em;
    font-family: 'Montserrat', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    font-weight: 700;
    margin-bottom: 0.3em;
    letter-spacing: 0.5px;
}

.site-card p {
    font-size: 0.75em;   /* 简介文字更小 */
    color: #555;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 0;
    max-height: 3.2em;
    word-break: break-all;
    border-bottom: none; /* 彻底取消下划线 */
    text-decoration: none; /* 防止p被a继承下划线 */
}

/* 分类标题美化与圆点距离优化 */
section > h2 {
    position: relative;
    display: inline-block;
    padding: 0.5em 2em 0.5em 2.3em;  /* 左padding加宽以拉开圆点与文字间距 */
    margin-bottom: 1em;
    font-size: 1.45em;
    font-weight: bold;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(90deg, #1765d8 80%, #49e0e6 100%);
    border-radius: 0 2em 2em 0;
    box-shadow: 2px 2px 16px #1765d822;
    overflow: hidden;
    z-index: 1;
    margin-left: -1em;
    margin-top: 2em;
    transition: transform 0.18s cubic-bezier(.5,1.8,.5,1), box-shadow 0.18s;
    font-family: 'Montserrat', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
}
section > h2::before {
    content: "";
    position: absolute;
    left: 1.1em;         /* 圆点更靠左，和文字有更宽距离 */
    top: 50%;
    width: 0.6em;
    height: 0.6em;
    background: #fff;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 5px #49e0e6aa, 0 0 8px 4px #1765d875;
}
section > h2:hover {
    transform: scale(1.04) rotate(-2deg);
    box-shadow: 4px 4px 28px #1765d844;
    background: linear-gradient(90deg, #49e0e6 0%, #1765d8 100%);
}
section {
    margin-bottom: 1.2em;
}

/* 响应式优化：移动端分类标题依然保持美观和圆点间距 */
@media (max-width: 1200px) {
    .site-list {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 950px) {
    .site-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 700px) {
    .site-list {
        grid-template-columns: 1fr;
    }
    main { padding: 0.5em; }
    section > h2 {
        font-size: 1.08em;
        padding: 0.4em 1.4em 0.4em 1.7em; /* 左padding加宽 */
    }
    section > h2::before {
        left: 0.7em;  /* 移动端圆点更靠左边缘，避免溢出 */
    }
}

form {
    margin-bottom: 2em;
    background: #fff;
    padding: 1em;
    border-radius: 6px;
    box-shadow: 0 1px 4px #0001;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}
form input, form select, form button {
    padding: 0.5em;
    margin-right: 0.5em;
    border-radius: 4px;
    border: 1px solid #ccc;
}
form button {
    background: #1765d8;
    color: #fff;
    border: none;
    cursor: pointer;
}
form button:hover {
    background: #124f9a;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-top: 1em;
}
th, td {
    padding: 0.5em 1em;
    border: 1px solid #e1e4e8;
    text-align: left;
}
/* 彻底禁用卡片及其内容下划线 */
.site-card,
.site-card *,
.site-card a,
.site-card a:visited,
.site-card a:hover,
.site-card a:active {
    text-decoration: none !important;
}