.keyword-root-helper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.krh-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.krh-header h2 {
    font-size: 1.8em;
    margin: 0 0 10px;
    color: #333;
}

.krh-header p {
    font-size: 1em;
    margin: 0 0 15px;
    color: #666;
}

.krh-instructions {
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 20px 30px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.95em;
    color: #555;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.krh-instructions ul {
    margin: 15px 0;
    padding-left: 0;
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.krh-instructions li {
    position: relative;
    padding: 0 10px;
    line-height: 1.6;
    display: inline-block;
}

.krh-instructions li:before {
    display: none;
}

.krh-instructions li strong {
    color: #333;
    margin-right: 8px;
}

.krh-instructions .tag {
    display: inline-block;
    padding: 2px 8px;
    margin: 0 4px;
    border-radius: 12px;
    font-size: 0.9em;
}

.krh-instructions .shortcode {
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-family: monospace;
    margin: 0 3px;
}

.krh-header .version-info {
    font-size: 0.8em;
    color: #999;
    margin-top: 5px;
}

.krh-search-section {
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.krh-search {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}

#krh-search-input {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
    min-width: 300px;
}

#krh-search-input:focus {
    border-color: #6e8efb;
    box-shadow: 0 0 0 3px rgba(110, 142, 251, 0.2);
}

#krh-search-btn {
    padding: 15px 30px;
    font-size: 16px;
    background: #6e8efb;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#krh-search-btn:hover {
    background: #5d7ce0;
    transform: translateY(-2px);
}

.krh-visualization {
    position: relative;
    width: 100%;
    height: 600px;
    margin: 30px 0;
    border-radius: 10px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

#krh-3d-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000000;
    touch-action: none;
}

#krh-3d-container canvas {
    width: 100% !important;
    height: 100% !important;
    outline: none;
    display: block;
    touch-action: none;
}

#krh-3d-container .error,
#krh-3d-container .no-data {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 16px;
    z-index: 1000;
}

#krh-3d-container .error {
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

#krh-3d-container .no-data {
    color: #7f8c8d;
    border-left: 4px solid #7f8c8d;
}

.krh-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.krh-loading .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #6e8efb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.krh-loading p {
    color: #2c3e50;
    font-size: 16px;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.krh-search-results {
    margin-top: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.results-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.back-to-3d {
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.back-to-3d:hover {
    background: #e9ecef;
    color: #333;
}

.krh-results-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* 搜索结果卡片和分类卡片共享样式 */
.keyword-card,
.category-keyword-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.keyword-card:hover,
.category-keyword-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
}

.keyword-header,
.category-keyword-header {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.keyword-name,
.category-keyword-name {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    flex: 1;
    padding-right: 10px;
    color: #333;
    font-weight: 500;
}

.search-count,
.category-keyword-count {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

.tags,
.category-keyword-tags {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.actions,
.category-keyword-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    color: white;
}

.tag-hot {
    background: linear-gradient(135deg, #ff4444, #ff6b6b);
}

.tag-blue {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.tag-quality {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.tag-gray-800 {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.copy-btn,
.favorite-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    background: #f0f2f5;
    color: #666;
}

.copy-btn:hover {
    background: #e4e6e8;
    color: #333;
}

.favorite-btn {
    background: #fff0f6;
    color: #eb2f96;
}

.favorite-btn:hover {
    background: #ffadd2;
}

.favorite-btn.favorited {
    background: #eb2f96;
    color: white;
}

.favorite-btn.favorited:hover {
    background: #c41d7f;
}

/* 禁用状态的收藏按钮样式 */
.favorite-btn.disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border: 1px solid #ddd;
}

.favorite-btn.disabled:hover {
    background: #f5f5f5;
    box-shadow: none;
    transform: none;
}

.krh-footer {
    margin-top: 50px;
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
}

.krh-footer p {
    margin: 5px 0;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .krh-search {
        flex-direction: column;
    }

    #krh-search-input {
        width: 100%;
    }

    .krh-3d-container {
        height: 400px;
    }

    .keyword-card {
        margin: 10px 0;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.keyword-card {
    animation: fadeIn 0.5s ease-out;
}

/* 工具提示样式 */
.tooltip {
    position: absolute;
    z-index: 1000;
    background: rgba(51, 51, 51, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: tooltipFadeIn 0.3s ease forwards;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.loading:after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6e8efb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 3D控制器 */
.krh-3d-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.krh-3d-controls button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.krh-3d-controls button:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    animation: fadeOut 2s ease-in-out;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* 趋势图表 */
.trend-chart {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.trend-chart canvas {
    width: 100%;
    height: 200px;
}

/* 分类显示容器样式 */
.krh-category-view {
    margin-top: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.category-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.category-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

#krh-sort-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.toggle-view-btn {
    padding: 8px 15px;
    background: #6e8efb;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.toggle-view-btn:hover {
    background: #5d7ce0;
    transform: translateY(-2px);
}

.category-content {
    margin-top: 20px;
}

.category-list {
    display: grid;
    gap: 20px;
}

.category-section {
    margin-bottom: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
}

.category-section:last-child {
    margin-bottom: 0;
}

.category-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-section .keyword-count {
    font-size: 0.8em;
    color: #666;
}

.category-keywords {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 15px;
    width: 100%;
}

.category-keyword-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-keyword-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-keyword-header {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.category-keyword-name {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    flex: 1;
    padding-right: 10px;
}

.category-keyword-count {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.category-keyword-tags {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-keyword-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

/* 加载指示器样式 */
.loading-indicator {
    text-align: center;
    padding: 40px 20px;
}

.loading-indicator .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6e8efb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-indicator p {
    color: #666;
    margin: 10px 0 0;
}

/* 错误消息样式 */
.error-message {
    color: #e74c3c;
    text-align: center;
    padding: 20px;
    background: #fdf0ed;
    border-radius: 8px;
    margin: 20px 0;
}

/* 无数据提示样式 */
.no-data {
    color: #666;
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* 响应式布局优化 */
@media (max-width: 1200px) {
    .category-keywords,
    .krh-results-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .krh-instructions {
        margin: 0 20px 20px;
        padding: 15px 20px;
    }
}

@media (max-width: 992px) {
    .category-keywords,
    .krh-results-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .category-keywords,
    .krh-results-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .krh-instructions {
        font-size: 0.9em;
        padding: 15px;
    }

    .category-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .expand-category {
        width: 100%;
        justify-content: center;
    }

    .krh-visualization {
        height: 400px;
        margin: 20px 0;
        border-radius: 8px;
    }

    .krh-3d-controls {
        bottom: 15px;
        right: 15px;
        gap: 12px;
    }

    .krh-3d-controls button {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    /* 添加触摸提示 */
    .touch-hint {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 10px 20px;
        border-radius: 20px;
        font-size: 14px;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
        white-space: nowrap;
        z-index: 1001;
    }

    .touch-hint.show {
        opacity: 1;
        animation: fadeInOut 3s ease-in-out;
    }

    @keyframes fadeInOut {
        0% { opacity: 0; }
        20% { opacity: 1; }
        80% { opacity: 1; }
        100% { opacity: 0; }
    }
}

/* 分类标题行样式 */
.category-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.category-header-row h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 展开按钮样式 */
.expand-category {
    padding: 6px 12px;
    background: #f0f2f5;
    border: 1px solid #e4e6e8;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.expand-category:hover {
    background: #e4e6e8;
    color: #333;
}

.expand-category[data-expanded="true"] .expand-text {
    display: none;
}

.expand-category[data-expanded="false"] .collapse-text {
    display: none;
}

/* 折叠容器样式 */
.collapsible-keywords {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    grid-column: 1 / -1;
}

/* 动画效果 */
.category-keywords {
    transition: all 0.3s ease-in-out;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .category-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .expand-category {
        width: 100%;
        justify-content: center;
    }
}

/* 分类控制栏样式 */
.category-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    gap: 20px;
}

/* 筛选按钮组样式 */
.keyword-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

/* 分类排序选择器样式 */
.category-sort-options {
    flex-shrink: 0;
}

.category-sort-options select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background-color: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    min-width: 140px;
}

.category-sort-options select:hover {
    border-color: #6e8efb;
    box-shadow: 0 2px 8px rgba(110, 142, 251, 0.1);
}

.category-sort-options select:focus {
    border-color: #6e8efb;
    box-shadow: 0 2px 8px rgba(110, 142, 251, 0.2);
}

/* 响应式布局优化 */
@media (max-width: 768px) {
    .category-control-bar {
        flex-direction: column;
        gap: 15px;
    }

    .keyword-filter-buttons {
        justify-content: center;
        width: 100%;
    }

    .category-sort-options {
        width: 100%;
    }

    .category-sort-options select {
        width: 100%;
    }
}

/* 筛选按钮样式 */
.filter-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    transition: all 0.3s ease;
    transform: translateY(100%);
}

.filter-btn:hover::before {
    transform: translateY(0);
}

.filter-btn.active {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 不同类型按钮的颜色 */
.filter-btn.all {
    background: #666;
}

.filter-btn.all.active {
    background: #888;
}

.filter-btn.blue-ocean {
    background: #3498db;
}

.filter-btn.blue-ocean.active {
    background: #2980b9;
}

.filter-btn.hot {
    background: #e74c3c;
}

.filter-btn.hot.active {
    background: #c0392b;
}

.filter-btn.quality {
    background: #2ecc71;
}

.filter-btn.quality.active {
    background: #27ae60;
}

.filter-btn.normal {
    background: #95a5a6;
}

.filter-btn.normal.active {
    background: #7f8c8d;
}

/* 添加计数标签样式 */
.filter-btn .count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* 优化分类区块容器样式 */
.category-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 优化词根卡片过渡效果 */
.category-keyword-card {
    transition: all 0.3s ease;
}

.category-keyword-card.hidden {
    opacity: 0;
    transform: scale(0.9);
}

.keyword-sort-options {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

.keyword-sort-options select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
}

.keyword-sort-options select:hover {
    border-color: #999;
}

/* 移动端适配优化 */
@media (max-width: 768px) {
    .keyword-root-helper {
        padding: 10px;
    }

    .krh-header {
        padding: 15px 10px;
        margin-bottom: 20px;
    }

    .krh-header h2 {
        font-size: 1.5em;
    }

    .krh-instructions {
        padding: 15px;
        margin: 0 10px 20px;
        font-size: 0.9em;
    }

    .krh-search {
        flex-direction: column;
        padding: 0 10px;
    }

    #krh-search-input {
        width: 100%;
        min-width: unset;
        padding: 12px;
        font-size: 15px;
    }

    #krh-search-btn {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .krh-visualization {
        height: 400px;
        margin: 20px 0;
    }

    .category-control-bar {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .keyword-filter-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 13px;
        flex: 1 1 auto;
        min-width: calc(50% - 8px);
        max-width: calc(50% - 8px);
    }

    .category-sort-options {
        width: 100%;
    }

    .category-sort-options select {
        width: 100%;
        padding: 10px;
    }

    .category-section {
        padding: 15px;
    }

    .category-section h4 {
        font-size: 1.1em;
    }

    .category-keywords,
    .collapsible-keywords {
        grid-template-columns: repeat(1, 1fr);
        gap: 15px;
    }

    .category-keyword-card {
        padding: 12px;
    }

    .category-keyword-name {
        font-size: 13px;
    }

    .category-keyword-tags {
        gap: 4px;
    }

    .tag {
        padding: 3px 8px;
        font-size: 11px;
    }

    .copy-btn,
    .favorite-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .expand-category {
        width: 100%;
        justify-content: center;
        padding: 8px;
    }
}

/* 小屏幕设备优化 */
@media (max-width: 576px) {
    .krh-header h2 {
        font-size: 1.3em;
    }

    .krh-instructions {
        font-size: 0.85em;
    }

    .filter-btn {
        min-width: 100%;
        max-width: 100%;
    }

    .category-keyword-card {
        margin: 0;
    }

    .category-keyword-actions {
        flex-direction: column;
        gap: 6px;
    }

    .copy-btn,
    .favorite-btn {
        width: 100%;
        text-align: center;
    }
}

/* 中等屏幕设备优化 */
@media (min-width: 577px) and (max-width: 992px) {
    .category-keywords,
    .collapsible-keywords {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-btn {
        min-width: calc(33.33% - 8px);
        max-width: calc(33.33% - 8px);
    }
}

/* 平板设备横屏优化 */
@media (min-width: 993px) and (max-width: 1200px) {
    .category-keywords,
    .collapsible-keywords {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 触摸设备交互优化 */
@media (hover: none) {
    .category-keyword-card:hover {
        transform: none;
    }

    .filter-btn:hover::before {
        transform: none;
    }

    .copy-btn:active,
    .favorite-btn:active {
        transform: scale(0.95);
    }

    .krh-3d-controls button:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 1);
    }
} 