/* ============================================================
   按钮基础样式
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    min-height: 2.25rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* ----- 主要按钮（蓝色背景） ----- */
.btn-primary {
    background: var(--primary) !important;
    color: var(--primary-foreground) !important;
    border-color: var(--primary) !important;
}
.btn-primary:hover {
    opacity: 0.9 !important;
}

/* ----- 轮廓按钮（透明背景） ----- */
.btn-outline {
    background: transparent !important;
    color: var(--foreground) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* ----- 幽灵按钮（完全透明） ----- */
.btn-ghost {
    background: transparent !important;
    color: var(--muted-foreground) !important;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--foreground) !important;
}

/* ----- 按钮尺寸变体 ----- */
.btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    min-height: 2rem;
}
.btn-lg {
    font-size: 1rem;
    padding: 0.75rem 2rem;
    min-height: 2.75rem;
}
.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
}

/* ----- 确保 .btn-primary 在所有地方都显示蓝色 ----- */
.btn-primary.btn-sm {
    background: var(--primary) !important;
    color: var(--primary-foreground) !important;
}
.btn-primary.btn-sm:hover {
    opacity: 0.9 !important;
}

/* ----- 详情按钮保持透明 ----- */
.btn-outline.btn-sm {
    background: transparent !important;
    color: var(--foreground) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
.btn-outline.btn-sm:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* ============================================================
   下拉选择器样式
   ============================================================ */
.select-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: transparent;
    padding: 0.5rem 1rem;
    min-height: 2.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 140px;
    color: var(--foreground);
}
.select-trigger:hover {
    border-color: var(--primary);
}
.select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.25rem;
    z-index: 50;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.select-dropdown.open {
    display: block;
}
.select-option {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.15s;
    color: var(--foreground);
}
.select-option:hover {
    background: var(--accent);
}
.select-option.active {
    background: var(--primary);
    color: var(--primary-foreground);
}

/* ============================================================
   Tab 切换样式
   ============================================================ */
.tab-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
}
.tab-btn:hover {
    color: var(--foreground);
}
.tab-btn.active {
    background: var(--card);
    color: var(--foreground);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   侧边栏链接样式
   ============================================================ */
.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--muted-foreground);
}
.sidebar-link:hover {
    background: var(--accent);
    color: var(--foreground);
}
.sidebar-link.active {
    background: rgba(43, 179, 238, 0.1);
    color: var(--primary);
    font-weight: 500;
}
.sidebar-link .count {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}
.sidebar-link.active .count {
    color: var(--primary);
}

/* ============================================================
   分类标签样式（移动端）
   ============================================================ */
.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid var(--border);
    color: var(--muted-foreground);
    background: transparent;
}
.category-tag:hover {
    border-color: var(--primary);
    color: var(--foreground);
}
.category-tag.active {
    border-color: var(--primary);
    background: rgba(43, 179, 238, 0.1);
    color: var(--primary);
}

/* ============================================================
   首页模块卡片样式
   ============================================================ */
.module-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(41, 44, 50, 0.4);
    background: rgba(20, 22, 26, 0.3);
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: left;
}
.module-card:hover {
    border-color: rgba(43, 179, 238, 0.3);
    background: rgba(20, 22, 26, 0.6);
    transform: translateY(-2px);
}
.module-card .icon-box {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(43, 179, 238, 0.1);
    color: var(--primary);
    transition: background 0.2s;
}
.module-card:hover .icon-box {
    background: rgba(43, 179, 238, 0.2);
}
.module-card .module-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
}
.module-card .module-desc {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* ============================================================
   用户菜单样式
   ============================================================ */
.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 14px;
    color: var(--foreground, #1e293b);
    cursor: pointer;
    transition: background 0.15s;
}
.user-menu-item:hover {
    background: var(--muted, #f1f5f9);
}
.user-menu-item.text-destructive {
    color: var(--destructive, #ef4444);
}
.user-menu-item.text-destructive:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* 社交登录按钮 */
.social-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--foreground, #1e293b);
}
.social-login-btn:hover {
    background: var(--muted, #f1f5f9);
    border-color: var(--primary, #3b82f6);
}

/* ============================================================
   响应式：移动端/桌面端切换
   ============================================================ */
@media (max-width: 768px) {
    .sidebar-desktop {
        display: none;
    }
    .sidebar-mobile {
        display: block;
    }
}
@media (min-width: 769px) {
    .sidebar-desktop {
        display: block;
    }
    .sidebar-mobile {
        display: none;
    }
}