/* 
 * 宝盘AI工具导航 - 主样式文件
 * 版本: 1.0
 */

/* ===== CSS变量 ===== */
:root {
    /* 主色调 */
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --accent: #FD79A8;
    
    /* 背景色 */
    --bg: #0F0F1A;
    --bg-card: #1A1A2E;
    --bg-card-hover: #252540;
    --bg-light: #2A2A44;
    
    /* 文字色 */
    --text: #E8E8F0;
    --text-muted: #8888AA;
    --text-dim: #555577;
    --text-light: #F8F8FF;
    
    /* 边框色 */
    --border: #2A2A44;
    --border-light: #3A3A54;
    
    /* 状态色 */
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E17055;
    --info: #74B9FF;
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    
    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
}

/* ===== 重置样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
}

/* ===== 布局容器 ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ===== 导航栏 ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(15, 15, 26, 0.85);
    border-bottom: 1px solid rgba(42, 42, 68, 0.4);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    height: 64px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-icon {
    font-size: 1.5rem;
    /* 图标保持原色，不受渐变文字影响 */
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.logo-domain {
    font-size: 0.75rem;
    font-weight: 400;
    -webkit-text-fill-color: var(--text-muted);
    margin-left: var(--space-sm);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: var(--space-sm) 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 1px;
}

/* ===== 导航分类下拉菜单 ===== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px;
    min-width: 520px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted) !important;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(108, 92, 231, 0.08);
    color: var(--primary-light) !important;
}

.dropdown-emoji {
    font-size: 1rem;
    flex-shrink: 0;
}

.dropdown-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.dropdown-footer a {
    font-size: 0.82rem;
    color: var(--primary-light) !important;
    font-weight: 500;
}

.dropdown-footer a:hover {
    text-decoration: underline;
}

/* 下拉菜单遮罩 */
.nav-dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    display: none;
}

.nav-dropdown-overlay.visible {
    display: block;
}

.nav-actions {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff !important;
    padding: 8px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-login {
    color: var(--text-muted) !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.btn-login:hover {
    border-color: var(--primary);
    color: var(--primary-light) !important;
    background: rgba(108, 92, 231, 0.08);
}

.btn-register {
    color: #fff !important;
    background: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.btn-register:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-user-center {
    display: flex !important;
    align-items: center;
    gap: 4px;
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--radius-md);
    border: none;
    transition: all 0.2s ease;
}

.btn-user-center:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ===== 用户下拉菜单 ===== */
.nav-user-dropdown {
    position: relative;
}

.user-avatar-btn {
    cursor: pointer;
}

.nav-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.nav-user-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-user-menu a {
    display: block;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.nav-user-menu a:hover {
    background: rgba(108, 92, 231, 0.08);
    color: var(--primary-light);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 2px;
    transition: all 0.25s ease;
}

/* ===== 移动端菜单 ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 2000;
    transition: right 0.3s ease;
    padding: 0;
    overflow-y: auto;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.mobile-close {
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
}

.mobile-close:hover {
    color: var(--text);
}

.mobile-menu-content {
    padding: var(--space-md);
}

.mobile-menu-search {
    padding: 0 var(--space-md) 12px;
}

.mobile-menu-search input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
}

.mobile-menu-search input:focus {
    border-color: var(--primary);
}

.mobile-menu-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px var(--space-md) 4px;
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px var(--space-md);
}

.mobile-menu-content a {
    display: block;
    padding: 12px var(--space-md);
    color: var(--text);
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.mobile-menu-content a:hover {
    background: rgba(108, 92, 231, 0.08);
}

.mobile-menu-content .mobile-submit {
    color: var(--primary-light) !important;
    font-weight: 600;
    margin-top: 4px;
}

.mobile-menu-content .mobile-login {
    color: var(--primary-light) !important;
    font-weight: 600;
}

.mobile-menu-content .mobile-register-link {
    color: var(--accent) !important;
    font-weight: 600;
}

/* ===== 面包屑导航 ===== */
.breadcrumb {
    padding: 16px 0;
    margin-top: 64px;
    background: transparent;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.82rem;
    color: var(--text-dim);
}

.breadcrumb a {
    color: var(--text-dim);
}

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

.breadcrumb .separator {
    margin: 0 6px;
    color: var(--text-dim);
}

/* ===== 主要内容区域 ===== */
.main {
    min-height: calc(100vh - 400px);
    padding: var(--space-xl) 0;
}

.section {
    margin-bottom: var(--space-xxl);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-lg);
}

/* ===== 区块标题行（标题 + 右侧CTA按钮） ===== */
.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: var(--space-lg);
}

.section-header-left .section-title {
    margin-bottom: var(--space-sm);
}

.section-header-left .section-desc {
    margin-bottom: 0;
}

.btn-contribute {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, rgba(108,92,231,.06), rgba(253,121,168,.05));
    border: 1px solid rgba(108,92,231,.2);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 0.88rem;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-contribute::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50px;
}

.btn-contribute-icon {
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.btn-contribute-text {
    position: relative;
    z-index: 1;
}

.btn-contribute-text em {
    font-weight: 700;
    font-style: normal;
    color: var(--primary-light);
    transition: color 0.3s ease;
}

.btn-contribute:hover {
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108,92,231,.3);
}

.btn-contribute:hover::before {
    opacity: 1;
}

.btn-contribute:hover .btn-contribute-text {
    color: #fff;
}

.btn-contribute:hover .btn-contribute-text em {
    color: #fff;
}

/* ===== 工具网格 ===== */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.tool-top {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.tool-info {
    flex: 1;
    min-width: 0;
}

.tool-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-tagline {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-meta {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.tool-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
}

.tool-rating .stars {
    color: var(--warning);
    letter-spacing: 1px;
}

.rating-value {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.tool-price {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.tool-price .free {
    color: var(--success);
    background: rgba(0, 184, 148, 0.1);
}

.tool-price .paid {
    color: var(--warning);
    background: rgba(253, 203, 110, 0.1);
}

.tool-stats {
    font-size: 0.72rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
}

.tool-stats .users {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: rgba(108, 92, 231, 0.06);
}

/* ===== 编辑精选 ===== */
.editor-picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
}

.editor-pick-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.25s ease;
    position: relative;
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.editor-pick-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.editor-pick-card.rank-1 {
    border-color: rgba(253, 203, 110, 0.3);
    background: linear-gradient(180deg, rgba(253, 203, 110, 0.08), var(--bg-card));
}

.editor-pick-card.rank-2 {
    border-color: rgba(136, 136, 170, 0.3);
}

.editor-pick-card.rank-3 {
    border-color: rgba(205, 127, 50, 0.3);
}

.pick-rank {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
}

.pick-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.pick-content {
    flex: 1;
}

.pick-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.pick-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pick-meta {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.pick-meta .rating {
    color: var(--warning);
}

.pick-meta .category {
    background: rgba(136, 136, 170, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* ===== 分类网格 ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.category-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.15);
}

.category-card .emoji {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.category-card .name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.category-card .count {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ===== 热门贡献者 ===== */
.contributor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.contributor-card {
    background: linear-gradient(135deg, rgba(108,92,231,.06), rgba(253,121,168,.03));
    border: 1px solid rgba(108,92,231,.15);
    border-radius: 16px;
    padding: 24px 16px 20px;
    text-align: center;
    transition: all .25s;
}

.contributor-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(108,92,231,.12);
}

.contributor-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
}

.contributor-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 1rem;
    background: rgba(255,255,255,.9);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    cursor: help;
}

.contributor-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 4px;
}

.contributor-role {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.contributor-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.contributor-stat {
    text-align: center;
}

.contributor-stat-num {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
}

.contributor-stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.contributor-cta {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(108,92,231,.08), rgba(253,121,168,.04));
    border: 1px dashed rgba(108,92,231,.25);
    border-radius: 16px;
}

.contributor-cta p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ===== 订阅部分 ===== */
.newsletter {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(253, 121, 168, 0.08));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xxl);
    text-align: center;
    margin: var(--space-xxl) auto;
    max-width: 700px;
}

.newsletter h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.newsletter p {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    gap: var(--space-md);
    max-width: 440px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.9rem;
}

.newsletter-form input:focus {
    border-color: var(--primary);
}

.newsletter-form button {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.newsletter-form button:hover {
    opacity: 0.9;
}

.newsletter-note {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: var(--space-md);
}

/* ===== 页脚 ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: var(--space-xxl) 0 var(--space-xl);
    background: var(--bg-card);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text);
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: var(--space-md) 0 var(--space-lg);
    line-height: 1.6;
}

.footer-stats {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.footer-stats .stat {
    text-align: center;
}

.footer-stats .stat-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 2px;
}

.footer-stats .stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.footer-section ul li {
    margin-bottom: var(--space-sm);
}

.footer-section ul li a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-light);
}

.footer-subscribe {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.subscribe-form {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.subscribe-form input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.82rem;
}

.subscribe-form input:focus {
    border-color: var(--primary);
}

.subscribe-form button {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.subscribe-form button:hover {
    opacity: 0.9;
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    color: var(--text-muted) !important;
    font-size: 0.82rem;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.social-link:hover {
    border-color: var(--primary);
    color: var(--primary-light) !important;
    background: rgba(108, 92, 231, 0.08);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.footer-bottom .copyright {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.footer-bottom .icp {
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

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

/* ===== 回到顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 90;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.35s ease;
    box-shadow: var(--shadow-md);
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(108, 92, 231, 0.3);
}

.back-to-top:hover::after {
    color: #fff;
}

/* ===== 工具提示 ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--bg-card);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* ===== 加载动画 ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: var(--space-sm);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: var(--space-xxl) var(--space-xl);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.empty-state p {
    font-size: 0.95rem;
    margin-bottom: var(--space-lg);
}

.empty-state-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-lg);
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.pagination-item {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.pagination-item:hover:not(.disabled) {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(108, 92, 231, 0.08);
}

.pagination-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .editor-picks-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .nav-links,
    .nav-actions {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-dropdown-menu {
        display: none !important;
    }
    
    .tool-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .back-to-top {
        bottom: var(--space-md);
        right: var(--space-md);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-stats {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .empty-state-actions {
        flex-direction: column;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .nav,
    .footer,
    .back-to-top,
    .mobile-menu-btn {
        display: none !important;
    }
    
    body {
        background: #fff;
        color: #000;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}



/* ===== 英雄区域样式（首页专用）===== */
.hero {
    background: linear-gradient(135deg, #0F0F1A, #1A1A2E);
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(108,92,231,.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}
.hero .gradient {
    background: linear-gradient(135deg, #6C5CE7, #FD79A8, #FDCB6E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 1.2rem;
    color: #8888AA;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}
.search-box {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}
.search-box input {
    width: 100%;
    padding: 18px 24px 18px 56px;
    background: #1A1A2E;
    border: 1px solid #2A2A44;
    border-radius: 16px;
    color: #E8E8F0;
    font-size: 1rem;
    outline: none;
    transition: border-color .3s, box-shadow .3s;
}
.search-box input:focus {
    border-color: #6C5CE7;
    box-shadow: 0 0 0 3px rgba(108,92,231,.2);
}
.search-box .icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #555577;
    pointer-events: none;
}
.hot-words-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.hot-words-row .hw {
    padding: 5px 12px;
    background: rgba(108,92,231,.08);
    border: 1px solid rgba(108,92,231,.15);
    border-radius: 8px;
    font-size: .78rem;
    color: #A29BFE;
    cursor: pointer;
    transition: all .2s;
}
.hot-words-row .hw:hover {
    background: #6C5CE7;
    color: #fff;
    border-color: #6C5CE7;
}
.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.5rem;
}
.stats div {
    text-align: center;
}
.stats .num {
    font-size: 1.8rem;
    font-weight: 700;
    color: #A29BFE;
}
.stats .label {
    font-size: .8rem;
    color: #555577;
    margin-top: 2px;
}
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    .stats {
        gap: 1.5rem;
    }
    .stats .num {
        font-size: 1.3rem;
    }
}

/* ===== 搜索建议框 ===== */
.search-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px;
    display: none;
    z-index: 50;
    box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.search-suggest.visible {
    display: block;
}
.search-suggest .suggest-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    padding: 6px 12px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.search-suggest .hot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 8px 8px;
}
.search-suggest .hot-tag {
    padding: 6px 14px;
    background: rgba(108,92,231,.1);
    border: 1px solid rgba(108,92,231,.2);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--primary-light);
    cursor: pointer;
    transition: all .2s;
}
.search-suggest .hot-tag:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.search-suggest .hot-tag .fire {
    margin-right: 4px;
}

/* ===== 场景推荐 ===== */
.scenes-section {
    background: linear-gradient(180deg, transparent, rgba(108,92,231,.05), transparent);
    padding: 60px 0;
}
.scene-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.scene-tab {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all .2s;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    user-select: none;
}
.scene-tab:hover,
.scene-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.scene-content {
    display: none;
}
.scene-content.active {
    display: block;
}
.scene-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ===== 工具卡片增强 ===== */
.tool-card .badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    z-index: 2;
}
.badge-hot {
    background: rgba(253,121,168,.15);
    color: var(--accent);
}
.badge-new {
    background: rgba(0,184,148,.15);
    color: var(--success);
}
.badge-free {
    background: rgba(116,185,255,.15);
    color: var(--info);
}
.tool-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.tool-tags .tag {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(136,136,170,.1);
    color: var(--text-muted);
    border: 1px solid rgba(136,136,170,.1);
}
.tool-tags .social-proof {
    font-size: 0.72rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(108,92,231,.06);
    margin-left: auto;
}
.tool-tags .social-proof .hot {
    color: var(--accent);
    font-weight: 600;
}
.tool-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tool-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}
.tool-cta {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    border: none;
    color: #fff;
    text-decoration: none !important;
    flex-shrink: 0;
}
.cta-free {
    background: linear-gradient(135deg, #00B894, #55EFC4);
}
.cta-free:hover {
    opacity: .9;
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0,184,148,.3);
}
.cta-paid {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}
.cta-paid:hover {
    opacity: .9;
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(108,92,231,.3);
}

/* ===== 每周精选 ===== */
.weekly-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.weekly-card {
    background: linear-gradient(135deg, rgba(108,92,231,.08), rgba(253,121,168,.04));
    border: 1px solid rgba(108,92,231,.2);
    border-radius: 16px;
    padding: 24px;
    display: grid;
    grid-template-columns: 48px 52px 1fr auto;
    align-items: center;
    gap: 20px;
    transition: all .25s;
}
.weekly-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108,92,231,.12);
}
.weekly-card.rank-1 {
    border-color: rgba(253,203,110,.3);
    background: linear-gradient(135deg, rgba(253,203,110,.08), rgba(108,92,231,.04));
}
.weekly-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    opacity: .4;
    text-align: center;
}
.weekly-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}
.weekly-info {
    min-width: 0;
}
.weekly-info h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    font-weight: 700;
}
.weekly-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.5;
}
.weekly-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-dim);
}
.weekly-rating {
    color: var(--warning);
}
.weekly-free {
    color: var(--success);
    font-weight: 600;
}
.weekly-cta {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: opacity .2s;
    white-space: nowrap;
    border: none;
    text-decoration: none !important;
    flex-shrink: 0;
}
.weekly-cta:hover {
    opacity: .9;
}

/* ===== 登录弹窗 ===== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.6);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    backdrop-filter: blur(4px);
}
.login-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.login-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    width: 380px;
    max-width: 90vw;
    text-align: center;
    position: relative;
    transform: translateY(20px) scale(.95);
    transition: transform .3s;
}
.login-overlay.visible .login-modal {
    transform: translateY(0) scale(1);
}
.login-close {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    line-height: 1;
}
.login-close:hover {
    color: var(--text);
}
.login-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}
.login-modal h2 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}
.login-sub {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 24px;
}
.login-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.login-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
    font-size: 0.92rem;
    color: var(--text);
}
.login-method:hover {
    border-color: var(--primary);
    background: rgba(108,92,231,.05);
}
.login-method-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.login-terms {
    color: var(--text-dim);
    font-size: 0.72rem;
    margin-top: 16px;
}
.login-terms a {
    color: var(--primary-light);
}

/* ===== 登录按钮已登录状态 ===== */
.btn-login.logged-in {
    border-color: var(--success) !important;
    color: var(--success) !important;
    background: rgba(0,184,148,.08);
}

/* ===== 响应式补充 ===== */
@media (max-width: 768px) {
    .weekly-card {
        grid-template-columns: 40px 44px 1fr;
        gap: 12px;
        padding: 16px;
    }
    .weekly-card .weekly-cta {
        grid-column: 2 / -1;
        justify-self: center;
        width: 100%;
        text-align: center;
        margin-top: 8px;
        display: none;
    }
    .weekly-num {
        font-size: 1.3rem;
    }
    .weekly-info h3 {
        font-size: 0.95rem;
    }
    .contributor-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .contributor-card {
        padding: 18px 12px 16px;
    }
    .tool-bottom {
        flex-wrap: wrap;
    }
    .tool-cta {
        width: 100%;
        margin-left: 0;
        text-align: center;
        margin-top: 8px;
    }
}