:root {
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --accent: #4cc9f0;
    --secondary: #ffffff;
    --dark: #2b2d42;
    --darker: #1d1e2c;
    --light: #f8f9fa;
    --lighter: #ffffff;
    --border-radius: 0.75rem;
    --transition: all 0.3s ease;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 20px rgba(67, 97, 238, 0.2);
}

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--secondary);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 125px;
}

/* 导航栏 */
.navbar {
    background: var(--lighter);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(67, 97, 238, 0.1);
    transition: var(--transition);
    padding: 0.8rem 0;
    box-shadow: var(--shadow);
    z-index: 100;
}

.navbar.scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--darker) !important;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
    margin-right: 8px;
}

.nav-link {
    position: relative;
    color: var(--dark) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 0.75rem;
    transition: var(--transition);
}

.nav-link:hover, 
.nav-link.active {
    color: var(--primary) !important;
}

.nav-link.active {
    background: rgba(67, 97, 238, 0.1);
}

/* 移动端菜单 */
.navbar-collapse {
    margin-top: 0.5rem;
}

/* 滚动公告栏 */
.announcement-bar {
    position: fixed;
    top: 85px;
    width: 100%;
    background-color: var(--primary);
    color: var(--lighter);
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 99;
}

.announcement-bar marquee {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

/* 百度广告容器优化 */
.tools-grid > div:not([class]) {
    grid-column: 1 / -1;
    margin: 2.5rem 0;
    background: rgba(67, 97, 238, 0.03);
    padding: 20px;
    border-radius: var(--border-radius);
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 工具网格区域 */
.tools-section {
    padding: 3rem 0 4rem;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 2.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2.3rem;
    color: var(--darker);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--lighter);
    border-radius: var(--border-radius);
    padding: 1.7rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(67, 97, 238, 0.2);
}

.tool-link {
    text-decoration: none;
    color: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tool-icon {
    font-size: 2.6rem;
    margin-bottom: 1.3rem;
    color: var(--primary);
    transition: var(--transition);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
    color: var(--accent);
}

.tool-title {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--darker);
}

.tool-desc {
    font-size: 0.95rem;
    color: #546376;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 1.3rem;
}

/* 工具分类标题 */
.category-title {
    grid-column: 1 / -1;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--darker);
    padding: 1rem 0;
    margin: 1.5rem 0 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
}

.category-title i {
    margin-right: 12px;
    color: var(--primary);
    font-size: 1.5rem;
}

/* 页脚 */
.footer {
    background: var(--dark);
    color: var(--lighter);
    padding: 4rem 0 2rem;
}

.footer h5 {
    color: var(--lighter);
    font-weight: 600;
    margin-bottom: 1.3rem;
    font-size: 1.25rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.footer h5:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    margin-bottom: 0.6rem;
}

.footer a:hover {
    color: var(--primary);
    padding-left: 6px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--lighter);
    font-size: 1.1rem;
    margin-right: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.8rem;
    margin-top: 2.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.beian-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.beian-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
}

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

.police-icon {
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
}

/* 文心智能体悬浮窗样式 */
.ai-float-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1000;
    border: none;
}

.ai-float-button:hover {
    transform: scale(1.1);
    background-color: var(--primary-dark);
}

.ai-chat-window {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    max-width: 90vw;
    height: 550px;
    max-height: 80vh;
    background-color: var(--lighter);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.ai-chat-header {
    background-color: var(--primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.ai-close-button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ai-close-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.ai-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: var(--secondary);
}

.ai-message {
    margin-bottom: 15px;
    max-width: 80%;
}

.ai-message.bot {
    margin-right: auto;
}

.ai-message.user {
    margin-left: auto;
}

.ai-message-content {
    padding: 10px 15px;
    border-radius: 18px;
    line-height: 1.5;
}

.ai-message.bot .ai-message-content {
    background-color: white;
    border: 1px solid rgba(67, 97, 238, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.ai-message.user .ai-message-content {
    background-color: var(--primary);
    color: white;
}

.ai-chat-input {
    padding: 15px;
    border-top: 1px solid rgba(67, 97, 238, 0.1);
    background-color: white;
}

.ai-input-container {
    display: flex;
    gap: 10px;
}

.ai-input-field {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(67, 97, 238, 0.2);
    border-radius: 25px;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.ai-input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.ai-send-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.ai-send-button:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.ai-loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ai-loading-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    opacity: 0.6;
}

.ai-loading-dot:nth-child(1) {
    animation: dot-pulse 1.2s infinite ease-in-out;
    animation-delay: 0s;
}

.ai-loading-dot:nth-child(2) {
    animation: dot-pulse 1.2s infinite ease-in-out;
    animation-delay: 0.15s;
}

.ai-loading-dot:nth-child(3) {
    animation: dot-pulse 1.2s infinite ease-in-out;
    animation-delay: 0.3s;
}

@keyframes dot-pulse {
    0%, 40%, 100% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    20% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 滚动条样式 */
.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(67, 97, 238, 0.3);
    border-radius: 3px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(67, 97, 238, 0.5);
}

/* 响应式调整 */
@media (max-width: 992px) {
    .tools-section {
        padding: 2.5rem 0 3rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .navbar {
        padding: 0.7rem 0;
    }
}

@media (max-width: 768px) {
    .announcement-bar {
        top: 70px;
    }
    body {
        padding-top: 110px;
    }
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    .tools-grid {
        gap: 1.2rem;
    }
    .tool-card {
        padding: 1.5rem 1.2rem;
    }
    .tool-title {
        font-size: 1.1rem;
    }
    .category-title {
        font-size: 1.4rem;
    }
    .nav-link {
        margin: 0.2rem 0;
        padding: 0.7rem 1rem !important;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.6rem;
    }
    .tool-icon {
        font-size: 2.2rem;
    }
    .announcement-bar {
        top: 60px;
    }
    body {
        padding-top: 100px;
    }
    .category-title {
        font-size: 1.3rem;
    }
    .ai-chat-window {
        width: 90%;
        right: 5%;
    }
    

