﻿/* ===== 首页独有样式 ===== */

/* 区块标题 */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-1);
}

.section-title .more {
    font-size: 14px;
    color: var(--text-3);
}

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

/* 通用卡片hover */
.card {
    background: var(--bg-1);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 搜索区域 */
.search-section {
    background: linear-gradient(135deg, #E8F3FF 0%, #E6FFFB 100%);
    padding: 56px 0;
}

.search-title {
    text-align: center;
    margin-bottom: 28px;
}

.search-title h1 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-1);
}

.search-title p {
    color: var(--text-3);
    font-size: 15px;
}

.search-box {
    max-width: 760px;
    margin: 0 auto;
    background: var(--bg-1);
    padding: 12px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(22,93,255,0.08);
}

.search-row {
    display: flex;
    gap: 10px;
}

.search-select {
    position: relative;
    flex-shrink: 0;
}

.search-select select {
    appearance: none;
    background: var(--bg-3);
    padding: 0 36px 0 16px;
    height: 48px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-2);
    cursor: pointer;
    min-width: 140px;
}

.search-select::after {
    content: "▾";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
}

.search-input-wrap {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    height: 48px;
    padding: 0 60px 0 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
}

.search-input-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    font-size: 14px;
}

.search-btn {
    height: 48px;
    padding: 0 28px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #0E42D2;
}

.suffix-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 0 4px;
}

.suffix-tags span {
    font-size: 13px;
    color: var(--text-3);
}

.suffix-tags button {
    font-size: 13px;
    color: var(--text-2);
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.suffix-tags button:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* 工具导航区 */
.tool-nav-section {
    padding: 36px 0;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 12px;
    background: var(--bg-2);
    border-radius: var(--radius-md);
    transition: all 0.3s;
}

.tool-item:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 10px;
}

.tool-item h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-1);
}

.tool-item p {
    font-size: 12px;
    color: var(--text-3);
}

.icon-blue { background: #E8F3FF; color: var(--primary); }
.icon-green { background: #E8FFEA; color: var(--success); }
.icon-orange { background: #FFF3E8; color: var(--warning); }
.icon-purple { background: #F3E8FF; color: #722ED1; }
.icon-red { background: #FFECE8; color: var(--danger); }
.icon-cyan { background: #E8FFFB; color: #0FC6C2; }

.common-websites {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--bg-3);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
}

.common-websites .label {
    color: var(--text-2);
    font-weight: 500;
    flex-shrink: 0;
}

.common-websites a {
    color: var(--text-3);
}

.common-websites a:hover {
    color: var(--primary);
}

/* 首页主内容区 */
.main-content {
    padding: 36px 0;
}

.content-left {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* 域名知识列表 */
.knowledge-list {
    background: var(--bg-1);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
}

.knowledge-item {
    padding: 18px 20px;
    border-bottom: 1px solid var(--bg-3);
    transition: background 0.2s;
}

.knowledge-item:last-child {
    border-bottom: none;
}

.knowledge-item:hover {
    background: var(--bg-2);
}

.knowledge-item-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.knowledge-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.knowledge-text {
    flex: 1;
    min-width: 0;
}

.knowledge-text h4 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-1);
    line-height: 1.5;
}

.knowledge-text p {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.knowledge-meta-wrap {
  display: flex;
  justify-content: space‑between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 10px;
  padding-left: 54px;
}
.knowledge-date {
  font-size: 12px;
  color: var(--text-3);
  opacity:0.8; 
  flex-shrink: 0;
  order: 2;
}
.knowledge-meta-wrap .item-tags {
  padding-left: 0;
  margin-top: 0;
  flex: 1;
  order: 1;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-left: 54px;
}

.item-tags a {
    font-size: 12px;
    color: var(--text-2);
    background: var(--bg-3);
    padding: 2px 10px;
    border-radius: 10px;
    transition: all 0.2s;
}

.item-tags a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* 扩展百科网格 */
.encyclopedia-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ency-card {
    background: var(--bg-1);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s;
}

.ency-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ency-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--bg-3);
}

.ency-cat-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.ency-cat-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
}

.ency-cat-more {
    font-size: 12px;
    color: var(--text-3);
    margin-left: auto;
    transition: color 0.2s;
}

.ency-cat-more:hover {
    color: var(--primary);
}

.ency-card-body {
    padding: 16px 18px;
}

.ency-card-body h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-1);
    line-height: 1.5;
    margin-bottom: 8px;
}

.ency-card-body h4 a:hover {
    color: var(--primary);
}

.ency-card-body .desc {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.ency-card-meta {
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.ency-card-meta a.tag {
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.ency-card-meta a.tag:hover {
    background: #D0E4FF;
}

/* 友情链接 */
.friend-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2E3440;
    font-size: 13px;
}

.friend-links .friend-label {
    color: #C9CDD4;
    font-weight: 500;
}

.friend-links a {
    color: #86909C;
    transition: color 0.2s;
}

.friend-links a:hover {
    color: white;
}

/* ===== 首页响应式 ===== */
@media (max-width: 992px) {
    .tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .search-section {
        padding: 36px 0;
    }

    .search-title h1 {
        font-size: 24px;
    }

    .search-row {
        flex-direction: column;
    }

    .search-select select {
        width: 100%;
    }

    .encyclopedia-grid {
        grid-template-columns: 1fr;
    }

    .item-tags {
        padding-left: 0;
    }
    .knowledge-text p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .common-websites {
        gap: 12px 16px;
    }

    .download-btns {
        flex-wrap: wrap;
    }
}
