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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

/* 顶部导航栏 */
.top-bar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1001;
    transition: box-shadow 0.3s ease;
}

.top-bar.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.top-bar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 18px;
    transition: opacity 0.2s ease;
}

.logo-link:hover {
    opacity: 0.7;
}

.logo-emoji {
    font-size: 24px;
}

.logo-text {
    font-size: 16px;
    color: #374151;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-nav-link {
    display: flex;
    align-items: center;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 5px;
}

.top-nav-link:hover {
    color: #374151;
}

.top-nav-divider {
    color: #d1d5db;
    font-size: 14px;
}

/* 顶部菜单按钮样式 */
.menu-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 5px 8px;
    position: relative;
}

.menu-btn::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    height: 15px;
}

.menu-btn:hover {
    color: #374151;
}

.menu-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.menu-btn:hover .menu-arrow {
    transform: translateY(2px);
}

/* hover时显示下拉菜单 - 仅桌面端 */
@media (min-width: 769px) {
    .menu-btn:hover + .menu-panel-dropdown {
        display: block;
    }

    .menu-panel-dropdown:hover {
        display: block;
    }
}

/* 移动端点击显示 */
.menu-panel-dropdown.show {
    display: block !important;
}

.container {
    max-width: 1400px;
    margin: 20px auto 0;
    background: white;
    overflow: hidden;
}

/* 头部样式 - 全面隐藏 */
.header {
    display: none;
}

/* 菜单面板样式 - hover下拉菜单 */
.menu-panel-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 750px;
    max-height: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: none;
    z-index: 9999;
    margin-top: 15px;
}

/* 分类网格 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #374151;
}

.category-item:hover {
    background: #3B82F6;
    border-color: #3B82F6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.category-item-icon {
    display: none;
}

.category-item-name {
    font-size: 14px;
    font-weight: 500;
}

/* 语言选择器样式 */
.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    border-color: #6b7280;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lang-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.lang-btn:hover .lang-arrow {
    transform: translateY(2px);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    min-width: 180px;
    display: none;
    z-index: 9999;
}

.lang-dropdown.show {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lang-option:hover {
    background: #f5f5f5;
}

.lang-option.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.lang-flag {
    font-size: 20px;
}

.lang-name {
    font-size: 14px;
}

/* 搜索框样式 */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 15px;
}

.search-input {
    width: 100%;
    padding: 18px 50px 18px 20px;
    font-size: 16px;
    border: none;
    border-radius: 50px;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 5px 10px;
    display: none;
}

.clear-btn:hover {
    color: #333;
}

.notice {
    font-size: 14px;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    display: inline-block;
}

/* 标签页样式 */
.tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-top: 20px;
}

.tab-btn {
    flex: 1;
    padding: 18px 30px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    background: #ebebeb;
    color: #333;
}

.tab-btn.active {
    color: #6b7280;
    background: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #d1d5db;
}

/* 标签页内容 */
.tab-content {
    display: none;
}

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

/* 分类浏览标签页不需要padding（使用内部布局） */
#categoriesTab {
    padding: 0;
}

/* ASCII符号区域 */
#asciiTab {
    padding: 30px;
    background: white;
}

/* 为ASCII区域添加标题样式 */
#asciiTab h2 {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d1d5db;
}

/* 搜索结果 - 全面隐藏 */
.search-results {
    display: none !important;
}

.search-results h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* 分类容器 */
.category {
    margin-bottom: 40px;
}

.category:first-child {
    margin-top: 0;
}

.category-title {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d1d5db;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Emoji 网格 */
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
}

.emoji-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.emoji-item:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: #6b7280;
    z-index: 10;
}

.emoji-item:active {
    transform: scale(1.05);
}

/* 热门榜单样式 */
.trending-header {
    text-align: center;
    margin-bottom: 30px;
}

.trending-header h2 {
    font-size: 2em;
    color: #333;
    margin-bottom: 10px;
}

.trending-desc {
    color: #666;
    font-size: 1em;
}

/* 复制提示 */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #4caf50;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .top-bar-container {
        padding: 8px 12px;
    }

    .logo-text {
        display: none;
    }

    .logo-emoji {
        font-size: 18px;
    }

    .top-bar-right {
        gap: 8px;
        font-size: 13px;
    }

    .top-nav-link {
        padding: 4px 6px;
        font-size: 13px;
    }

    .top-nav-link svg {
        width: 18px;
        height: 18px;
    }

    .top-nav-divider {
        font-size: 12px;
        margin: 0 -2px;
    }

    /* 移动端菜单按钮 */
    .menu-btn {
        padding: 4px 6px;
        font-size: 11px;
    }

    .menu-arrow {
        font-size: 10px;
    }

    #currentLangName {
        display: none;
    }

    .lang-btn {
        padding: 4px 6px;
        font-size: 11px;
    }

    /* 移动端菜单面板 */
    .menu-panel-dropdown {
        position: fixed !important;
        top: 50px !important;
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        margin: 0 !important;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        padding: 15px;
    }

    .category-item {
        padding: 12px 14px;
    }

    .category-item-icon {
        font-size: 1.5em;
    }

    .category-item-name {
        font-size: 14px;
    }

    .container {
        margin: 0;
        overflow: visible; /* 移动端允许sticky定位工作 */
    }

    .search-input {
        font-size: 14px;
        padding: 15px 45px 15px 15px;
    }

    .tab-btn {
        padding: 15px 20px;
        font-size: 14px;
    }

    #asciiTab {
        padding: 20px;
    }

    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }

    .emoji-item {
        font-size: 2em;
    }

    .category-title {
        font-size: 1.1em;
    }

    .notice {
        font-size: 12px;
        padding: 8px 15px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }

    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 6px;
    }

    .emoji-item {
        font-size: 1.8em;
    }
}

/* 空搜索结果样式 */
.empty-search-result {
    text-align: center;
    padding: 60px 20px;
    writing-mode: horizontal-tb;
    direction: ltr;
    grid-column: 1 / -1;
    width: 100%;
    display: block;
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
    writing-mode: horizontal-tb;
}

.empty-search-result h3 {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 10px;
    writing-mode: horizontal-tb;
    white-space: normal;
}

.empty-search-result p {
    color: #666;
    font-size: 1em;
    margin-bottom: 20px;
    writing-mode: horizontal-tb;
}

.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    align-items: center;
}

.suggestion-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    writing-mode: horizontal-tb;
}

.suggestion-tag:hover {
    background: #6b7280;
    color: white;
    border-color: #6b7280;
    transform: translateY(-2px);
}

/* 分类容器 - 直接显示 */
#categoriesContainer {
    padding: 30px;
}

/* Emoji计数 */
.emoji-count {
    font-size: 0.7em;
    color: #9ca3af;
    font-weight: normal;
    margin-left: 5px;
}

/* 展开按钮 */
.expand-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin: 15px auto 0;
    padding: 8px 0;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.expand-btn:hover {
    color: #374151;
    text-decoration: underline;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #4b5563;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* 响应式优化 - 移动端 */
@media (max-width: 768px) {
    #categoriesContainer {
        padding: 20px 15px;
    }
}

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .expand-btn {
        font-size: 13px;
        padding: 6px 0;
        margin: 10px auto 0;
    }
}

/* SEO页脚样式 */
.seo-footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 40px 30px 30px;
    margin-top: 60px;
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
}

.seo-content h2 {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

.seo-content p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 14px;
}

.seo-content a {
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.seo-content a:hover {
    color: #2563EB;
    text-decoration: underline;
}

.seo-content strong {
    color: #333;
    font-weight: 600;
}

.seo-links {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    font-size: 14px;
}

.seo-links a {
    margin: 0 8px;
    color: #555;
}

.seo-links a:hover {
    color: #3B82F6;
}

.copyright {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-top: 20px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .seo-footer {
        padding: 30px 20px 20px;
        margin-top: 40px;
    }

    .seo-content h2 {
        font-size: 1.1em;
    }

    .seo-content p {
        font-size: 13px;
    }

    .seo-links {
        font-size: 13px;
    }
}

