:root {
    --primary-color: #50C4ED;
    --primary-hover: #62CDEF;
    --primary-active: #3DB4DC;
    --secondary-color: #41B5E0;
    --text-primary: #2C3E50;
    --text-secondary: #34495E;
    --text-light: #7F8C8D;
    --bg-color: #F0F4F8;
    --card-bg: #ffffff;
    --border-color: #E1EEF6;
    --shadow-color: rgba(80, 196, 237, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-color);
    line-height: 1.5;
}

.container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 65px;
}

.logo {
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.main-nav {
    margin-left: auto;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 15px;
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(80, 196, 237, 0.3);
}

.user-area {
    display: none;
}

.btn-login,
.btn-register {
    padding: 8px 24px;
    font-weight: 500;
    border-radius: 20px;
    transition: var(--transition);
}

.btn-login {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-login:hover {
    background: rgba(24, 144, 255, 0.1);
    border-color: var(--primary-hover);
    color: var(--primary-hover);
}

.btn-register {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-register:hover {
    background: var(--primary-hover);
}

/* 更新搜索区域样式 */
.search-section {
    margin-top: 70px;
    padding: 55px 0 10px;
    background: linear-gradient(
        -45deg,
        #40E0D0 0%,    /* 浅蓝色 */
        #00BFFF 20%,   /* 亮蓝色 */
        #4169E1 40%,   /* 深蓝 */
        #9370DB 60%,   /* 浅紫色 */
        #8A2BE2 80%,   /* 紫色 */
        #9932CC 100%   /* 深紫色 */
    );
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
    position: relative;
    overflow: hidden;
}

/* 添加渐变色移动动画 */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 更新浮动粒子的颜色透明度，使其在深色背景上更明显 */
.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* 大粒子 */
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 15%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.3) 0%, transparent 15%),
        /* 中等粒子 */
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.25) 0%, transparent 12%),
        radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.25) 0%, transparent 12%),
        radial-gradient(circle at 60% 20%, rgba(255, 255, 255, 0.25) 0%, transparent 12%),
        /* 小粒子 */
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 8%),
        radial-gradient(circle at 90% 40%, rgba(255, 255, 255, 0.2) 0%, transparent 8%),
        radial-gradient(circle at 15% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 8%),
        radial-gradient(circle at 75% 85%, rgba(255, 255, 255, 0.2) 0%, transparent 8%);
    background-size: 150% 150%;
    animation: floating-left 12s ease-in-out infinite;
    pointer-events: none;
}

/* 更新第二层浮动粒子的透明度 */
.search-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.25) 0%, transparent 20%),
        radial-gradient(circle at 25% 75%, rgba(255, 255, 255, 0.25) 0%, transparent 15%),
        radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.25) 0%, transparent 15%),
        radial-gradient(circle at 10% 40%, rgba(255, 255, 255, 0.2) 0%, transparent 10%),
        radial-gradient(circle at 90% 60%, rgba(255, 255, 255, 0.2) 0%, transparent 10%);
    background-size: 150% 150%;
    animation: floating-right 10s ease-in-out infinite;
    pointer-events: none;
}

/* 从左向右的浮动动画 */
@keyframes floating-left {
    0% {
        background-position: 0% 50%;
        transform: scale(1);
    }
    50% {
        background-position: 100% 50%;
        transform: scale(1.05);
    }
    100% {
        background-position: 0% 50%;
        transform: scale(1);
    }
}

/* 从右向左的浮动动画 */
@keyframes floating-right {
    0% {
        background-position: 100% 50%;
        transform: scale(1.05);
    }
    50% {
        background-position: 0% 50%;
        transform: scale(1);
    }
    100% {
        background-position: 100% 50%;
        transform: scale(1.05);
    }
}

/* 更新搜索框样式 */
.search-box {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.search-box input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 更新搜索类型切换样式 */
.search-type {
    width: calc(100% - 110px);
    max-width: 800px;
    margin: 15px auto 100px;
    display: flex;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.type-item {
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    background: #fff;  /* 默认白色背景 */
    color: var(--primary-color);  /* 默认主色调文字 */
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(80, 196, 237, 0.3);
}

.type-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(80, 196, 237, 0.4);
}

.type-item.active {
    background: var(--primary-color);  /* 激活状态使用主色调背景 */
    color: #fff;  /* 激活状态使用白色文字 */
    box-shadow: 0 4px 12px rgba(80, 196, 237, 0.5);
}

.search-box input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.search-box input::placeholder {
    color: #999;
    font-size: 15px;
}

.search-box button {
    width: 48px;
    height: 48px;
    background: #fff;
    color: var(--primary-color);
    border: none;
    border-radius: 24px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box button:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.search-box button i {
    font-size: 20px;
}

/* 移除热门搜索样 */
.hot-words {
    display: none;
}

/* 更新分类导航样式 */
.category-nav {
    width: 100%;
    padding: 15px 0;
    margin: -10px 0;
}

.category-nav ul {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.category-nav li {
    list-style: none;
    margin: 0 10px;
}

.category-nav a {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #f5f5f5;
    text-decoration: none;
}

.category-nav a:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translateY(-2px);
}

.category-nav li.active a {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(80, 196, 237, 0.2);
}

/* 固定导航样式 */
.category-nav.fixed {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    margin: 0;
    z-index: 99;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 添加容器限制 */
.category-nav.fixed ul {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    justify-content: space-between;
    gap: 0;
}

/* 固定状态下的导航项样式 */
.category-nav.fixed li {
    margin: 0 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .category-nav.fixed ul {
        padding: 0 15px;
    }
}

/* 更新内容区域样式 */
.section {
    margin: 20px 0;
    padding: 15px;
    background: transparent;
    border-radius: var(--border-radius);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
}

.more {
    color: #666;
    transition: var(--transition);
}

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

/* 更新卡片样式 */
.card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    overflow: visible;
}

/* 移除 card-link 的特殊样式 */
.card a {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    z-index: 1;
}

/* 更新标签样式 */
.card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding-left: 0;
    margin-top: 2px;
}

.card-tags span {
    padding: 2px 8px;
    background: rgba(80, 196, 237, 0.08);
    border-radius: 15px;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

/* 更新卡片内容布局 */
.card-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 2px;
}

/* 卡片悬停效果 */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

/* 更新图标样式 */
.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(80, 196, 237, 0.1);
    padding: 2px;
    background: #fff;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    border-color: rgba(80, 196, 237, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card:hover .card-icon img {
    transform: scale(1.1);
}

/* 信息区域样式 */
.card-info {
    flex: 1;
    min-width: 0;  /* 防止文本溢出 */
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 更新卡片网格布局 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 5px;
}

/* 更新底部样式 */
.footer {
    background: #f8f9fa;
    padding: 40px 0 20px;
    margin-top: 50px;
    border-top: 1px solid #eee;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-logo {
    flex: 0 0 200px;
}

.footer-logo img {
    max-width: 150px;
    height: auto;
}

.footer-info {
    flex: 1;
    display: flex;
    justify-content: space-around;
    max-width: 600px;
}

.footer-contact, .footer-links {
    padding: 0 20px;
}

.footer-contact h4, .footer-links h4 {
    color: #333;
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-contact p {
    color: #666;
    margin: 8px 0;
    font-size: 14px;
}

.footer-contact i {
    width: 20px;
    color: #666;
    margin-right: 8px;
}

.footer-contact a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--primary-color);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin: 8px 0;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 13px;
}

.copyright p {
    margin: 5px 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-logo {
        margin-bottom: 20px;
    }

    .footer-info {
        flex-direction: column;
    }

    .footer-contact, .footer-links {
        margin-bottom: 20px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        height: 60px;
    }
    
    .main-nav {
        display: none;
    }
    
    .search-section {
        margin-top: 60px;
        padding: 20px 0;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
} 

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #bfbfbf;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
} 

/* 更新内容区域的margin */
.main-content {
    margin-top: 5px;
} 

/* 更新标 */
.search-slogan {
    text-align: center;
    color: #fff;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
} 

/* 添加自定义区域样式 */
.custom-add-btns {
    display: flex;
    gap: 15px;
}

.btn-add,
.btn-edit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add {
    background: var(--primary-color);
    color: #fff;
}

.btn-add:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-edit {
    background: #f0f0f0;
    color: var(--text-secondary);
}

.btn-edit:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}



/* 添加弹窗样式 */
.modal {
    display: none !important;  /* 强制 */
    visibility: hidden;        /* 双重保险 */
    pointer-events: none;      /* 确保不会拦截点击事件 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* 只有显示时才启用 */
.modal.show {
    display: flex !important;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: #fff;
    border-radius: 15px;
    width: 1000px;         /* 固定宽度 */
    height: 700px;         /* 固定高度 */
    display: flex;
    flex-direction: column;
}

.modal-header {
    text-align: center;  /* 标题居中 */
    padding: 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
    /* 确保标题完全居中，不受关闭按钮影响 */
    width: 100%;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding-right: 30px; /* 为关闭按钮留出空间 */
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1; /* 确保关闭按钮在标上层 */
}

.modal-body {
    flex: 1;              /* 占据剩余空间 */
    overflow-y: auto;     /* 内容超出时显示滚动条 */
    padding: 20px;
    min-height: 0;        /* 确保内容区域可以滚动 */
}

.card-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.modal-search {
    margin-bottom: 20px;
}

.modal-search input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

.modal-tabs {
    display: flex;
    justify-content: space-between;
    padding: 0 10px 15px;
    margin: 0 -10px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: hidden;
}

.modal-tabs .tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    margin: 0 5px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    color: var(--text-secondary);
}

.modal-tabs .tab:hover {
    background: rgba(80, 196, 237, 0.1);
    color: var(--primary-color);
}

.modal-tabs .tab.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(80, 196, 237, 0.2);
}

.card-selection-grid .card {
    cursor: pointer;
    position: relative;
}

.card-selection-grid .card.selected {
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(80, 196, 237, 0.15);
}

.card-selection-grid .card.selected::before {
    content: '\f00c';  /* Font Awesome 勾选图标 */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 3;
}

/* 已添加卡片的样式 */
.card-selection-grid .card.added {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #f5f5f5;
    border-color: #ddd;
}

.card-selection-grid .card.added::after {
    content: '已添加';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #999;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 3;
}

/* 保卡片内容不会被勾选图标遮挡 */
.card-selection-grid .card-content {
    position: relative;
    z-index: 2;
}

/* 更新底部按钮样式 */
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #fff;
    border-radius: 0 0 15px 15px;
}

.modal-footer button {
    padding: 8px 24px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #f0f0f0;
    color: var(--text-secondary);
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-confirm {
    background: var(--primary-color);
    color: #fff;
}

.btn-confirm:hover {
    background: var(--primary-hover);
}

/* 添加编辑模式样式 */
.edit-mode .card {
    position: relative;
}

.edit-mode .card::before {
    content: '×';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #ff4757;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

.edit-mode .card:hover::before {
    opacity: 1;
} 

/* 新搜索和分类导航区域样式 */
.modal-search-area {
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

/* 更新弹窗主体内容区域 */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* 更新底部按钮样式 */
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #fff;
    border-radius: 0 0 15px 15px;
}

/* 添加响应式支持 */
@media (max-width: 1200px) {
    .modal-content {
        width: 90%;
        height: 80vh;
    }
} 

/* 添加已选择卡片的样式 */
.card-selection-grid .card.added {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #f5f5f5;
    border-color: #ddd;
}

.card-selection-grid .card.added::after {
    content: '已添加';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #999;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
} 

/* 自定义域卡片样式 */
#customCardGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
    min-height: 120px;
    background: rgba(0,0,0,0.02);
    border-radius: 15px;
    border: 2px dashed #ddd;
    margin: 10px 0;
}

#customCardGrid .empty-tip {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

/* 自定义区域的卡片样式 */
#customCardGrid .card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    height: 60px; /* 修改为60px */
}

#customCardGrid .card-content {
    display: flex;
    align-items: center; /* 改为居中对齐 */
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

#customCardGrid .card-icon {
    width: 32px; /* 稍微减小图尺寸 */
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(80, 196, 237, 0.1);
    padding: 2px;
    background: #fff;
}

#customCardGrid .card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#customCardGrid .card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#customCardGrid .card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#customCardGrid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

#customCardGrid .card:hover .card-icon {
    border-color: rgba(80, 196, 237, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#customCardGrid .card:hover .card-icon img {
    transform: scale(1.1);
}

/* 确保链接样式正确 */
#customCardGrid .card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* 添加底部弹出域样式 */
.bottom-popup {
    position: fixed;
    bottom: -80px;  /* 初始位置在视口下方 */
    left: 0;
    width: 100%;
    height: 80px;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.bottom-popup.show {
    bottom: 0;  /* 显示时的位置 */
}

.popup-content {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    color: #999;
    font-size: 16px;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-popup:hover {
    color: #333;
    transform: rotate(90deg);
} 

/* 更广告位样式 */
.ad-banner {
    display: none !important;
}

.section-ad {
    display: none !important;
}

.floating-ad {
    display: none !important;
}

.bottom-popup {
    display: none !important;
}

.ad-card {
    display: none !important;
}

.ad-placeholder {
    display: none !important;
}

.ad-tag {
    display: none !important;
} 

/* 添加搜索结果高亮动画 */
@keyframes highlight {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(80, 196, 237, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(80, 196, 237, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(80, 196, 237, 0.4);
    }
} 

/* 更新关于本站弹窗样 */
.modal#aboutModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    /* padding-top: 50px; */
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal#aboutModal.show {
    display: flex;
    opacity: 1;
}

.modal-content.about-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;  /* 增加最大宽度，从500px改为600px */
    margin: auto;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    height: auto;
    padding: 10px 0;  /* 添加上下内边距 */
}

.modal#aboutModal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    text-align: center;  /* 标题居中 */
    padding: 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.modal-header h3 {
    font-size: 1.3rem;  /* 减小标题字体 */
    color: #333;
    margin: 0;
    /* 确保标题完全居中，不受关闭按钮影响 */
    width: 100%;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding-right: 30px; /* 为关闭按钮留出空间 */
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1; /* 确保关闭按钮在标题上层 */
}

.about-section {
    margin-bottom: 25px;  /* 增加段落间距 */
    text-align: center;  /* 内容居中 */
}

.about-section:last-child {
    margin-bottom: 10px;  /* 最后一个段落的底部间距 */
}

.about-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.about-section p {
    color: #666;
    line-height: 1.8;    /* 增加行高 */
    margin-bottom: 12px;
    padding: 0 20px;
    text-align: center;
}

.about-section p br {
    display: block;
    margin: 8px 0;  /* 调整换行间距 */
}

.about-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;  /* 文本居中 */
    width: 100%;        /* 确保宽度占满 */
}

.about-section ul li {
    color: #666;
    padding: 6px 0;
    position: static;
    /* 确保文本居中 */
    text-align: center;
}

.about-section ul li:before {
    display: none;
}

.modal-footer {
    text-align: center;  /* 按钮居中 */
    padding: 15px;
    margin-top: 10px;
}

.modal-footer .btn-confirm {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 30px;    /* 增加按钮内边距 */
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;      /* 增加按钮字体大小 */
    transition: background-color 0.3s;
}

.modal-footer .btn-confirm:hover {
    background: var(--primary-hover);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content.about-modal {
        width: 92%;  /* 移动端稍微整宽度比例 */
        margin: 15px auto;
    }
} 

/* Logo上传区域样式优化 */
.logo-upload {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.logo-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.logo-actions-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-upload {
    padding: 8px 15px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-upload:hover {
    background: var(--primary-hover);
}

.logo-tips {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
} 

/* 广告卡片式 */
.card[data-ad="true"] {
    border: 2px dashed rgba(0, 0, 0, 0.1);
    background: rgba(245, 245, 245, 0.5);
    padding: 0;
    overflow: hidden;
    position: relative;
    min-height: 100px; /* 添加小高度 */
}

.card[data-ad="true"]:hover {
    border-color: var(--primary-color);
    background: rgba(245, 245, 245, 0.8);
}

/* 广告卡片链接样式 */
.card[data-ad="true"] a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 广告卡片图片样式 */
.card[data-ad="true"] img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 填充整个容器空间 */
    display: block;
}

/* 隐藏广告卡片的其他元素 */
.card[data-ad="true"] .card-content,
.card[data-ad="true"] .card-info,
.card[data-ad="true"] .card-tags {
    display: none;
} 

/* 模态框基础样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

/* 模态框内容样式 */
.modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    border-radius: 12px;
    position: relative;
    transform: translateY(-30px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
} 

/* 备案样式 */
.beian {
    margin-top: 10px;
    text-align: center;
}

.beian a {
    color: #666;
    text-decoration: none;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.beian img {
    width: 14px;
    height: 14px;
}

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

/* 广告卡片排序 */
.card[data-ad="true"] {
    order: 999; /* 使用较大的数值确保排在最后 */
}

/* 确保其他卡片保持原有顺序 */
.card:not([data-ad="true"]) {
    order: 0;
} 

/* 广告卡片样式 */
.card[data-ad="true"] {
    border: 2px dashed #ddd;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    /* min-height: 120px; */
}

.ad-contact {
    text-align: center;
    color: rgba(102, 102, 102, 0.6);
    font-size: 16px;
}

.ad-contact p {
    margin: 0;
} 

/* 收藏按钮样�� */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
}

.favorite-btn i {
    color: #ccc;
    font-size: 14px;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    transform: scale(1.15);
}

.favorite-btn:hover i {
    color: #FFD700;
}

.favorite-btn.active i {
    color: #FFD700;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* 提示框样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1100;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast i {
    color: #50C4ED;
    font-size: 18px;
} 

/* 在弹窗中隐藏收藏按钮 */
.modal .favorite-btn {
    display: none;
} 

/* 调整搜索区域下方的margin */
.search-section {
    margin-bottom: 15px;
}

/* 调整分类导航的margin */
.category-nav {
    margin-bottom: 10px;
} 