* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0eee6;
    color: #1d1d1f;
    line-height: 1.5;
}

.container {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 104px 20px 40px;
}

.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;
}

.nav-buttons {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 0;
    padding: 16px 20px;
    background-color: rgba(240, 238, 230, 0.82);
    border-bottom: 1px solid #e7e1d8;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-button {
    padding: 10px 20px;
    background-color: transparent;
    border: none;
    border-radius: 12px;
    color: #1d1d1f;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background-color: #ffffff;
    color: #D97757;
}

.nav-button.active {
    background-color: #ffffff;
    color: #1d1d1f;
}

.nav-button:focus-visible,
.card:focus-visible,
.footer a:focus-visible {
    outline: 3px solid #D97757;
    outline-offset: 3px;
}

.content-section {
    display: none;
    min-height: calc(100vh - 200px);
}

.content-section[hidden] {
    display: none !important;
}

.content-section.active {
    display: block;
}

.category {
    margin-bottom: 32px;
}

.category h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #1d1d1f;
    font-weight: 600;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.card {
    position: relative;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #1d1d1f;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 70px;
    background-color: #FFFFFF;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card .tag {
    position: absolute;
    top: 10px;
    right: 12px;
    background-color: #EBDBBC;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: #1d1d1f;
}

.card .icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card .icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
}

.card .icon-text {
    font-size: 18px;
    line-height: 1;
}

.card h3 {
    font-size: 16px;
    margin-bottom: 0;
    font-weight: 600;
}

.card p {
    font-size: 12px;
    color: #484848;
    margin-top: 2px;
    line-height: 1.3;
}

.card .content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card .title {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 22px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-buttons {
        gap: 12px;
    }

    .nav-button {
        padding: 9px 16px;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 76px 16px 24px;
    }

    .nav-buttons {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 12px 16px;
    }

    .nav-button {
        flex: 0 0 auto;
        font-size: 14px;
        padding: 8px 14px;
    }

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

/* 添加页脚样式 */
.footer {
    text-align: center;
    margin-top: auto;
    padding: 20px 0 0 0;
    color: #666;
    font-size: 14px;
}

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

.footer a:hover {
    color: #333;
    text-decoration: underline;
} 

#dify-chatbot-bubble-button {
    background-color: #d97757 !important;
}

#dify-chatbot-bubble-window {
    width: 24rem !important;
    height: 40rem !important;
}
