/* 基础样式 - 多端适配核心 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    /* 背景属性简写：颜色 图片 重复 附着 位置 / 尺寸 */
    background: url('./assets/bg.jpg') no-repeat fixed center center / cover;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    min-height: 100vh;
    padding: 20px 0;
    margin: 0;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4vw; /* 用vw适配移动端 */
}

/* 搜索和分类栏样式 - 多端适配 */
.search-category-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px 0 32px;
    align-items: center;
    width: 100%;
}
.search-box {
    flex: 1;
    min-width: 280px;
    width: 100%; /* 移动端占满宽度 */
}
.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none; /* 去除移动端默认样式 */
}
.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}
.category-tag {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    color: white;
    -webkit-tap-highlight-color: transparent; /* 去除移动端点击高亮 */
}
.category-tag.active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.category-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.category-tag.all {
    background-color: #666;
}

/* 域名卡片样式 - 多端适配 */
.domain-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    background: white;
    padding: 20px;
    width: 100%;
}
.domain-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.domain-card:active {
    transform: translateY(-2px); /* 移动端点击反馈 */
}
.domain-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}
.domain-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2937;
}
.domain-name a {
    color: #3b82f6;
    text-decoration: none;
}
.domain-name a:hover {
    text-decoration: underline;
}
.domain-desc {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* 分类标题样式 */
.category-title {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 16px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}
.category-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    border-radius: 2px;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
    width: 100%;
}

/* 网格布局 - 多端适配核心 */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(280px, 100%, 350px), 1fr));
    gap: clamp(16px, 3vw, 20px); /* 自适应间距 */
    margin-bottom: 24px;
    width: 100%;
}

/* 响应式断点适配 */
@media screen and (max-width: 768px) {
    h1 {
        font-size: 24px !important;
    }
    .search-category-bar {
        gap: 12px;
        margin: 16px 0 24px;
    }
    .category-title {
        font-size: 18px;
        margin: 20px 0 12px;
    }
    .domain-card {
        padding: 16px;
    }
    .domain-name {
        font-size: 16px;
    }
    .domain-badge {
        font-size: 11px;
        padding: 3px 6px;
    }
}

@media screen and (min-width: 2560px) {
    .container {
        max-width: 2000px;
    }
    .domain-card {
        padding: 2rem;
    }
    .domain-badge {
        font-size: 14px;
        padding: 6px 10px;
    }
}