/* 基础全局样式 */
body {
    margin: 0;
    font-family: Segoe UI, Arial, sans-serif;
    background: #f5f6fa;
    color: #222;
}

/* 导航容器 */
.nav-container {
    max-width: 980px;
    margin: 2.5rem auto;
    padding: 0 1rem;
}

/* 头部样式 */
.site-header {
    text-align: center;
    margin-bottom: 1rem;
}
.site-title {
    margin: 0;
    font-size: 1.6rem;
    color: #233047;
}
.desc {
    color: #556070;
    margin-top: 0.4rem;
}

/* 搜索区域 */
.nav-search {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin: 1rem auto;
    max-width: 720px;
    width: 100%;
}
.nav-search select,
.nav-search input[type=search] {
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    border: 1px solid #d8dbe0;
}
.nav-search input[type=search] {
    min-width: 480px;
    flex: 1;
    box-sizing: border-box;
}
.nav-search button {
    padding: 0.6rem 1rem;
    background: #00b894;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* 卡片容器 */
.nav-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

/* 链接卡片 */
.link-card {
    --card-height: 84px; /* 卡片高度变量 */
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(35, 48, 71, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    min-height: var(--card-height);
    display: flex;
    align-items: stretch;
}
.link-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(35, 48, 71, 0.1);
}
.link-card-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: inherit;
    text-decoration: none;
    width: 100%;
}

/* 图标样式 */
.link-icon {
    --icon-size: 36px; /* 图标尺寸变量 */
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: 6px;
    flex: 0 0 var(--icon-size);
    object-fit: contain;
    background: #f5f6f8;
    border: 1px solid #eee;
    box-sizing: border-box;
}

/* 卡片文字样式 */
.link-card-title {
    font-weight: 600;
    color: #1f3a4a;
    margin-bottom: 0;
}
.link-card-desc {
    color: #66707a;
    font-size: 0.92rem;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 1.5rem 0;
    background: #2d3e50;
    color: #fff;
    font-size: 0.95rem;
    margin-top: 2rem;
}

/* 辅助功能类 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 响应式适配 */
@media (max-width: 720px) {
    .nav-search {
        flex-direction: column;
        max-width: 92%;
        gap: 0.5rem;
    }
    .nav-search input[type=search],
    .nav-search select,
    .nav-search button {
        width: 100%;
    }
    .nav-search input[type=search] {
        min-width: 0;
    }
}

@media (max-width: 520px) {
    .link-card {
        --card-height: 72px;
    }
    .nav-search input[type=search] {
        min-width: 140px;
    }
    footer {
        padding: 1.25rem 0;
        font-size: 0.9rem;
    }
}

/* 自定义卡片按钮样式 */
.btn {
    background: #1e90ff;
    color: #fff;
    border: none;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
}
.btn:active { transform: translateY(1px); }

/* 编辑/删除小按钮 */
.btn-edit, .btn-del{
    background: transparent;
    border: 1px solid #d8dbe0;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}
.btn-edit{ background: #fff8e1; }
.btn-del{ background: #ffeef0; border-color:#ffd6dd }

/* 模态样式 */
.modal{
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,12,16,0.45);
    align-items: center;
    justify-content: center;
    z-index: 1200;
}
.modal-content{
    background: #fff;
    padding: 1rem;
    border-radius: 10px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 10px 40px rgba(16,24,40,0.25);
}
.modal-content h3{ margin-top:0 }
.modal-content form{ display:flex; flex-direction:column; gap:0.5rem }
.modal-content label{ display:flex; flex-direction:column; font-size:0.9rem; color:#34414a }
.modal-content input[type="text"], .modal-content input[type="url"]{ padding:0.5rem 0.6rem; border-radius:6px; border:1px solid #e6e9ee }